c++: generic lambda fn parm pack [PR104624]
commit65735d21ac410463126114c572999682f987972c
authorJason Merrill <jason@redhat.com>
Thu, 21 Apr 2022 21:24:07 +0000 (21 17:24 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 26 Apr 2022 03:54:02 +0000 (25 23:54 -0400)
tree44f743f3468b3ce2611a1c6c52181b3cf7b86bd2
parentc83b9c54d9dee2dce5d8268472a745b013d166cc
c++: generic lambda fn parm pack [PR104624]

Parameter packs from the enclosing context can be used unexpanded in a
lambda that is itself part of a pack expansion, but not packs that are part
of the lambda itself.  We already check for capture packs; we also need to
check for function parameter packs of the lambda call operator.

PR c++/104624

gcc/cp/ChangeLog:

* pt.cc (check_for_bare_parameter_packs): Check for lambda
function parameter pack.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1y/lambda-generic-variadic22.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic22.C [new file with mode: 0644]