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

            Bug ID: 79401
           Summary: [7 Regression] Protected inheriting ctor
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

class B
{
protected:
  B (int, int);
};
class C : public B
{
protected:
  using B::B;
};
class A : public C
{
  A (char *);
};
A::A (char *) : C (0, 0)
{
}

is rejected starting with r241765 :
rh1419687.C: In constructor ‘A::A(char*)’:
rh1419687.C:15:24: error: ‘B::B(int, int)’ is protected within this context
 A::A (char *) : C (0, 0)
                        ^
rh1419687.C:4:3: note: declared protected here
   B (int, int);
   ^
it is accepted with -fno-new-inheriting-ctors
clang++ 4.0.0 (trunk 291659) accepts it and claims to implement P0136R1.

Reply via email to