C++ cannot convert from base A to derived type B via virtual base A
I have three classes: class A {}; class B : virtual public A {}; class C : virtual public A {}; class D: public B, public C {}; Attempting a static cast from A* to B* I get the below error: cannot convert from base A to derived type B via virtual base A In order to understand the cast system you need to dive in the object model. The classic representation of a simple hierarchy model is containment: that if B derives from A then the B object will in fact contain a A subobject alongside its own attributes. With this model, downcasting is a simple pointer manipulation, by an offset known at