:
class W { public: void f(); };
class A : private virtual W { };
class B : public virtual W { };
class C : public A, public B {
void f() { W::f(); }
};
Since
W::f()
is available to
C::f()
along the public path through
B,
access is allowed
. —
end example