c++: lambda in default type template-argument [PR100091]
authorJason Merrill <jason@redhat.com>
Thu, 15 Apr 2021 16:16:48 +0000 (12:16 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 15 Apr 2021 16:42:15 +0000 (12:42 -0400)
commit432f60c90dfb27f77e6f437bf1148f37bf73d70e
treef8e409d8c88ea197ca40b7ccad595dd6fd20c20c
parent6c0c7fc6236470a533675cd3cd1ebb1cc3dd112c
c++: lambda in default type template-argument [PR100091]

My patch for 99478 relied on local_variables_forbidden_p for distinguishing
between a template parameter and its default argument, but that flag wasn't
set for a default type template-argument.

gcc/cp/ChangeLog:

PR c++/100091
PR c++/99478
* parser.c (cp_parser_default_type_template_argument): Set
parser->local_variables_forbidden_p.

gcc/testsuite/ChangeLog:

PR c++/100091
* g++.dg/cpp2a/lambda-uneval15.C: New test.
gcc/cp/parser.c
gcc/testsuite/g++.dg/cpp2a/lambda-uneval15.C [new file with mode: 0644]