See the code below.
a) Does, in this case (simple inheritance, no virtual members), the static cast in B::df() have any overhead (whatsoever)? I found some conflicti
static_cast<T>(e) is equivalent to creating an invented temporary variable v in the following way:
static_cast<T>(e)
T v(e); //where T is an arbitrary type and e is an arbitrary expression.
The runtime cost of a static_cast is exactly the cost of the above statement