c++: Fix lambda in atomic constraint.
authorJason Merrill <jason@redhat.com>
Sat, 15 Feb 2020 13:48:08 +0000 (14:48 +0100)
committerJason Merrill <jason@redhat.com>
Sat, 15 Feb 2020 13:59:32 +0000 (14:59 +0100)
commit1e166191ef330f3491d405bf3eb09b2b796c9b0e
tree3c7f342cbc19b7cd380c94f786b955ffc31417ad
parentd71365427670a791c5b54bfec6e3d41210844a8a
c++: Fix lambda in atomic constraint.

find_template_parameters needs to find the mention of T in the lambda.
Fixing that leaves this as a hard error, which may be surprising but is
consistent with lambdas in other SFINAE contexts like template argument
deduction.

gcc/cp/ChangeLog
2020-02-15  Jason Merrill  <jason@redhat.com>

PR c++/92556
* pt.c (any_template_parm_r): Look into lambda body.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C [new file with mode: 0644]