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++17 class deduction issues US 19/20


wg21.link/p0512r0 proposes resolutions for some issues with class
template argument deduction raised in national body comments against
the C++17 draft; the paper hasn't been accepted yet, but the proposals
seem sensible, so I'm implementing them here.

The first makes deduction guides take priority over constructors, to
make deduction guides more useful.

The second clarifies the "forwarding reference" rules to not apply to
class template argument deduction; we don't want a constructor like
A(T&&) to lead to deduction of A<int&>.

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

Attachment: p0512r0.diff
Description: Text document


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