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

            Bug ID: 82821
           Summary: g++ states that ctor of class is inaccessible just
                    because I have inherited privately from it
           Product: gcc
           Version: 5.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gene at genethomas dot com
  Target Milestone: ---

Created attachment 42541
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42541&action=edit
c++ source file that reproduces the error

Just because I have privately inherited from a class should not mean that it's
ctor is inaccessible to me.

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
(in Ubuntu Linux 16.04.3 LTS)

to reproduce:
g++ g++-base-inaccessible.cpp

output:
g++-base-inaccessible.cpp: In member function ‘void MyAnotherString::method()’:
g++-base-inaccessible.cpp:2:16: error: ‘class MyString MyString::MyString’ is
inaccessible
 class MyString {
                ^
g++-base-inaccessible.cpp:11:9: error: within this context
         MyString s; // fails

Reply via email to