static_cast example
Example 1: how to static_cast
struct B { };
struct D : B { };
D d;
B& br = d;
static_cast<D&>(br); // lvalue denoting the original d object
Example 2: static cast char c++
static_cast<char>(expression);
struct B { };
struct D : B { };
D d;
B& br = d;
static_cast<D&>(br); // lvalue denoting the original d object
static_cast<char>(expression);