Files
2025-10-25 03:02:53 +03:00

759 B
Raw Permalink Blame History

[class.paths]

11 Classes [class]

11.8 Member access control [class.access]

11.8.7 Multiple access [class.paths]

1

#

If a declaration can be reached by several paths through a multiple inheritance graph, the access is that of the path that gives most access.

[Example 1: 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(); } // OK};

SinceW::f() is available toC::f() along the public path throughB, access is allowed.

— end example]