<div dir="ltr"><div style>The attached patch implements DR7 [*], disallowing deriving from classes that have private virtual base classes except in instances where the deriving would be able to cast itself to the private virtual base via a different derivation.</div>
<div style><br></div><div style>To demonstrate:</div><div style><br></div><div style><div>class Foo { public: Foo() {}  ~Foo() {} };</div><div>class Bar : virtual private Foo { public: Bar() {}  ~Bar() {} };</div><div>class Qux : public Bar { public: Qux() {}  ~Qux() {} };<br>
</div><div>class GreaterQux : public Bar, virtual public Foo { public: GreaterQux() {}  ~GreaterQux() {} };<br></div><div><br></div><div>[*] <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#7">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#7</a></div>
<div><br></div><div>-- </div><div style>David Majnemer</div></div></div>