aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-04-02 11:05:46 -0400
committerJason Merrill <jason@redhat.com>2021-04-02 12:46:54 -0400
commit2a26351b598242c2fbce95d2a0baacce0084aec6 (patch)
tree5eee86e5ccc2ea0657eeec2543dce1913473296c /gcc/d
parentf4e05eebd6aac6118cbd9e0a04c011b6ed682826 (diff)
downloadgcc-2a26351b598242c2fbce95d2a0baacce0084aec6.zip
gcc-2a26351b598242c2fbce95d2a0baacce0084aec6.tar.gz
gcc-2a26351b598242c2fbce95d2a0baacce0084aec6.tar.bz2
c++: lambda pack init-capture within generic lambda
We represent the type of a pack init-capture as auto... with packs from the initializer stuck into PACK_EXPANSION_PARAMETER_PACKS so that expanding it produces the right number of elements. But when partially instantiating the auto..., we were changing PACK_EXPANSION_PARAMETER_PACKS to refer to only the auto itself. Fixed thus. gcc/cp/ChangeLog: PR c++/97938 * cp-tree.h (PACK_EXPANSION_AUTO_P): New. * lambda.c (add_capture): Set it. * pt.c (tsubst_pack_expansion): Handle it. gcc/testsuite/ChangeLog: PR c++/97938 * g++.dg/cpp2a/lambda-pack-init6.C: New test.
Diffstat (limited to 'gcc/d')
0 files changed, 0 insertions, 0 deletions