When derived is cast back into base.
By safe, I mean it works properly for known c++ compiler.
It seems to be working for VIsual C++ 2008.
E.g
class zero
{
virtual int v()=0;
}
class a: public zero
{
public:
int value;
a(int vin)
{
value =vin;
}
int v()
{
return value;
}
}
zero *e1= new a(3);
cout << e1->v();
It is safe and fully correct behaviour. That is the reason why you have virtual or pure virtual methods. Most of the time you will want to hide implementation details and manipulate objects through their interface (or pure virtual class). That is standard and all C++ compilers must support it.