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
According standard docs,
Section 5.2.9 - 9, for Static Cast,
Hence, it is not possible and you should use
dynamic_cast
...