[Bug c++/122318] [14/15/16 Regression] ICE on CTAD for alias template with lambda
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 17 22:06:03 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122318
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:bd7a7af6c708e1196ba0f5d44b2670041961dfaa
commit r15-10837-gbd7a7af6c708e1196ba0f5d44b2670041961dfaa
Author: Patrick Palka <ppalka@redhat.com>
Date: Tue Feb 17 11:21:42 2026 -0500
c++: unifying LAMBDA_EXPR [PR122318]
This patch makes the default case of unify accept LAMBDA_EXPR P/A pairs,
which we can legitimately hit during alias CTAD guide overload resolution.
We can also less legimitately hit this during partial specialization
matching (likely IFNDR).
I'm not totally sure if we want to handle them like any other non-deducible
expression vs handling them separately (returning success iff they're ==).
I couldn't come up with a testcase for which it mattered so I went the
simpler route.
PR c++/122318
PR c++/101670
gcc/cp/ChangeLog:
* pt.cc (unify) <default>: Accept LAMBDA_EXPR.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/lambda-targ20.C: New test.
* g++.dg/cpp2a/lambda-targ21.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
(cherry picked from commit 9fe46ba8eb3f2cf41744cf8490b025f0876b9c86)
More information about the Gcc-bugs
mailing list