https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62240

            Bug ID: 62240
           Summary: A using-declaration within a class can publish a
                    public base of a private base.
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rohan at rohanlean dot de

Created attachment 33384
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33384&action=edit
small testcase

Suppose that three classes are related by inheritance (B ---> A : B inherits
from A) as follows:

  C ---private--> B ---public--> A

Then C can publish A via

  using B::A;

I think that the correct behaviour is to reject such a program.

Reply via email to