c++: variadic lambda template and empty pack [PR97246]
authorJason Merrill <jason@redhat.com>
Fri, 12 Feb 2021 00:45:22 +0000 (19:45 -0500)
committerJason Merrill <jason@redhat.com>
Fri, 12 Feb 2021 02:30:24 +0000 (21:30 -0500)
commitac001ddd0cb635dec0145bf577ac796894bda398
treeb2dd09bcb741231c42f1e6065a6d61c9ed0b566d
parent3e2f329e94830e7c1861c590f661c25f7465bb7c
c++: variadic lambda template and empty pack [PR97246]

In get<0>, Is is empty, so the first parameter pack of the lambda is empty,
but after the fix for PR94546 we were wrongly associating it with the
partial instantiation of 'v'.

gcc/cp/ChangeLog:

PR c++/97246
PR c++/94546
* pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
(register_parameter_specializations): Not here.

gcc/testsuite/ChangeLog:

PR c++/97246
* g++.dg/cpp2a/lambda-generic-variadic21.C: New test.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic21.C [new file with mode: 0644]