[
Example 8:
The following example shows a function that does not have a unique final
overrider:
struct A {
virtual void f();
};
struct VB1 : virtual A {
void f();
};
struct VB2 : virtual A {
void f();
};
struct Error : VB1, VB2 {
};
struct Okay : VB1, VB2 {
void f();
};
Both
VB1::f and
VB2::f override
A::f but there
is no overrider of both of them in class
Error. This example is
therefore ill-formed
. Class
Okay is well-formed, however,
because
Okay::f is a final overrider
. —
end example]