Such conversions are possible and don't even require a pointer cast. A publicly derived class is a kind-of its base class. By implication, the upward conversion is perfectly safe, and is quite common. For example, a pointer to a Car is in fact already pointing at a Vehicle, since a Car is a kind-of a Vehicle. class Vehicle { }; class Car : public Vehicle { }; void f(Vehicle* v) throw(); void g(Car* c) throw() { f(c); //Perfectly safe; no cast needed } |