struct A {};
struct B : A {};
struct C {};
int main()
{
A* a = new A;
int i = 10;
a = (A*) (&i); // NO ERROR! FAIL!
//a = static_cast<A*>(&i); ERROR! SMART!
A* b = new B;
B* b2 = static_cast<B*>(b); // NO ERROR! SMART!
C* c = (C*)(b); // NO ERROR! FAIL!
//C* c = static_cast<C*>(b); ERROR! SMART!
}