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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2015-03-03
                 CC|                            |manu at gcc dot gnu.org
         Resolution|INVALID                     |---
            Summary|protected using constructor |mention that default
                   |default arguments not       |arguments of constructors
                   |recognized                  |are not inherited
     Ever confirmed|0                           |1

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #2)
> The C++ standard says that B inherits a constructor taking a single int, the
> default argument is not inherited, so B has no default constructor, and G++
> is correct to reject the program.

This is the key information. Couldn't g++ say something like?

b.h:7:12: note: B::B(int)
   using A::A;
            ^
b.h:7:12: note:   candidate expects 1 argument, 0 provided (default arguments
are not inherited)

BTW, clang rejects the 'using':

10 : error: using declaration cannot refer to a constructor

Reply via email to