This is the mail archive of the gcc-patches@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]

C++ PATCH for c++/79503 (inherited ctor taking base class)


In the old inheriting constructor scheme, copy constructors were not
inherited.  In the new scheme we needed a rule to get a similar
effect; I proposed that an inherited constructor should not be viable
if it has a single parameter of a type reference-related to the
derived type.  Richard Smith proposed a further refinement that this
would apply only if the base type is also reference-related to the
parameter type.  This testcase demonstrates why this refinement is
needed.

Tested x86_64-pc-linux-gnu, applying to trunk.

Attachment: 79503.diff
Description: Text document


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