17-01-2014, 04:48 PM
There shall be no more than one definition of each virtual function on each path through the inheritance hierarchy.
If I'm interpreting this rule correctly, once you define a virtual function for a derived class with the virtual base class as an ancestor, no more derivations in the chain can override the first definition.
This would seem to cripple a key advantage of using classes and an object-oriented design.
Isn't it pretty common to override a virtual member function in a child class even if the parent class has provided a different definition? Please explain.
If I'm interpreting this rule correctly, once you define a virtual function for a derived class with the virtual base class as an ancestor, no more derivations in the chain can override the first definition.
This would seem to cripple a key advantage of using classes and an object-oriented design.
Isn't it pretty common to override a virtual member function in a child class even if the parent class has provided a different definition? Please explain.
<t></t>