Virtual inheritance is a must-have feature in all languages that feature multiple inheritance. Although it's possible that all inheritance cases are virtual, but this has:
- additional costs
- not always the expected result
It's because virtual inheritance is a special case of inheritance, where the inherited is the directive of direct derivation of the class, not the class itself. In result, every base class that derives another class virtually, provides this virtual base as a direct base class to every next derived class. Of course, if more than one base class provides the same virtual base class, it results in being once derived by the deriving class, but it's because these multiple base classes provide multiple derivation directives, but one class (in contrast to normal inheritance, in which case base classes would provide multiple subobjects of base classes).
The consequence of the fact that it's always a direct base class is the requirement of it being constructed explicitly in every next derived class. Of course, default constructor rules apply, but C++ is not even consequent in this rule - the code where the base class initializes the virtual base is accepted; the only rejected case is when the virtual base is "competitively initialized" in multiple base classes - in this case you have to "resolve the conflict" by providing your construction specification.
Please do not bang me for lame self-promotion, but I've described this topic in more details here:
https://sektorvanskijlen.wordpress.com/2010/12/08/multiple-inheritance-considered-nice