This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/65300] If one more constructor is defined, default params on using not passed from parent class


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]