This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/65300] If one more constructor is defined, default params on using not passed from parent class
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Mar 2015 16:50:06 +0000
- Subject: [Bug c++/65300] If one more constructor is defined, default params on using not passed from parent class
- Auto-submitted: auto-generated
- References: <bug-65300-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65300
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
[class.inhctor]/3:
For each non-template constructor in the candidate set of inherited
constructors other than a constructor having no parameters or a copy/move
constructor having a single parameter, a constructor is implicitly declared
with the same constructor characteristics unless there is a user-declared
constructor with the same
signature in the complete class where the using-declaration appears or the
constructor would be a default, copy, or move constructor for that class.
So inheriting constructors can't declare default, copy or move constructors,
and the presence of another constructor in the class suppresses the implicit
declaration of a default constructor.