[Bug c++/92633] [concepts] constrained lambda with placehoder syntax getting wrong substitution
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 2 01:38:27 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92633
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:c2449995ca36ea955e3c6d4ee7f0d401b512c897
commit r11-779-gc2449995ca36ea955e3c6d4ee7f0d401b512c897
Author: Patrick Palka <ppalka@redhat.com>
Date: Mon Jun 1 21:37:04 2020 -0400
c++: constrained lambda inside template [PR92633]
When regenerating a constrained lambda during instantiation of an
enclosing template, we are forgetting to substitute into the lambda's
constraints. Fix this by substituting through the constraints during
tsubst_lambda_expr.
gcc/cp/ChangeLog:
PR c++/92633
PR c++/92838
* pt.c (tsubst_function_decl): Don't do set_constraints when
regenerating a lambda.
(tsubst_lambda_expr): Substitute into the lambda's constraints
and do set_constraints here.
gcc/testsuite/ChangeLog:
PR c++/92633
PR c++/92838
* g++.dg/cpp2a/concepts-lambda11.C: New test.
* g++.dg/cpp2a/concepts-lambda12.C: New test.
More information about the Gcc-bugs
mailing list