TITLE: why not simply downcast from virtual base PROBLEM: Keith Whittingham I know the downcast from a virtual base class is illegal but why? RESPONSE: ark@research.att.com (Andrew Koenig), 16 Apr 96 Because there may be more than one derived class subobject of the same object with the same type and the same virtual base class object. In that case, there is no way to tell which of the derived class subobjects was intended. For example: class V { }; class B: public virtual V { }; class D: public B { } class E: public B, public D { }; Every object of class E now contains a B part and a D part. The D part contains a(nother) B part. Each B part refers to the same V object. So suppose we have: V* vp; B* bp = (B*) vp; where vp really points at the V part of an E object. The cast is ambiguous -- there is no way to tell which B was intended. Now, you may agree that this example should be illegal because the ambiguity is obvious. But suppose we deleted the definitions of classes D and E. Wouldn't that remove the ambiguity? Unfortunately, it wouldn't. For example, the definitions of D and E might have moved to a different translation unit entirely. Their mere existence in that translation unit renders the cast in this one ambiguous. That means that in general there is no way to determine at compile time whether any cast from a virtual base class to a derived class is ambiguous; C++ therefore prohibits them all.