[PATCH] Implement DR7
Richard Smith
richard at metafoo.co.uk
Thu Jun 6 04:20:05 PDT 2013
LGTM, thanks!
It would be good to also regenerate cxx_dr_status.html, but I'll do
that in a while if you don't.
On Thu, Jun 6, 2013 at 3:51 AM, David Majnemer <david.majnemer at gmail.com> wrote:
> 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.
>
> To demonstrate:
>
> class Foo { public: Foo() {} ~Foo() {} };
> class Bar : virtual private Foo { public: Bar() {} ~Bar() {} };
> class Qux : public Bar { public: Qux() {} ~Qux() {} };
> class GreaterQux : public Bar, virtual public Foo { public: GreaterQux() {}
> ~GreaterQux() {} };
>
> [*] http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#7
>
> --
> David Majnemer
More information about the cfe-commits
mailing list