]> gcc.gnu.org Git - gcc.git/commit
c++: "perfect" implicitly deleted move [PR100644]
authorJason Merrill <jason@redhat.com>
Tue, 18 May 2021 16:06:36 +0000 (12:06 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 18 May 2021 19:43:52 +0000 (15:43 -0400)
commitf71ca97def69b8aeb046d716eaea2367736f505e
tree88b68e43f8096d9e174ee4505e6eef639ae0661f
parentcd323d97d0592135ca4345701ef051659d8d4507
c++: "perfect" implicitly deleted move [PR100644]

Here we were ignoring the template constructor because the implicit move
constructor had all perfect conversions.  But CWG1402 says that an
implicitly deleted move constructor is ignored by overload resolution; we
implement that instead by preferring any other candidate in joust, to get
better diagnostics, but that means we need to handle that case here as well.

gcc/cp/ChangeLog:

PR c++/100644
* call.c (perfect_candidate_p): An implicitly deleted move
is not perfect.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/implicit-delete1.C: New test.
gcc/cp/call.c
gcc/testsuite/g++.dg/cpp0x/implicit-delete1.C [new file with mode: 0644]
This page took 0.064057 seconds and 6 git commands to generate.