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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The standard says:

"If there is no user-declared constructor for class X, a non-explicit
constructor having no parameters is implicitly declared as defaulted"

An inherited constructor is not user-declared, so D still gets an
implicitly-declared:

  D() = default;

This is public, and can call the protected B() constructor.

So G++ is correct.

Reply via email to