]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: defaulted ctor vs template ctor [PR125135]
authorJason Merrill <jason@redhat.com>
Fri, 22 May 2026 16:57:09 +0000 (12:57 -0400)
committerJason Merrill <jason@redhat.com>
Sat, 23 May 2026 04:25:42 +0000 (00:25 -0400)
commitfe059756ddc4ec4e357a73d6385fd93db202c66e
tree13339f100c30b60caf898abf6290d12160b6f29a
parent25e1ceebd373c7bb5076c9db2d9b77ac0bd274dc
c++: defaulted ctor vs template ctor [PR125135]

Here we were getting into a CWG1092 cycle again through
check_non_deducible_conversions, trying to lazily declare the RE move
constructor, looking for a constructor to move A, considering the
constructor template which takes RE&, and so trying to lazily declare the RE
constructors again.

Let's break the cycle in the same way.

PR c++/125135

gcc/cp/ChangeLog:

* pt.cc (check_non_deducible_conversions): Handle LOOKUP_DEFAULTED.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/implicit18.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp0x/implicit18.C [new file with mode: 0644]