Implement P0780R2, pack expansion in lambda init-capture.
commite771eb36d40e1ad0345fa990cfe83405439e6159
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Nov 2018 04:34:59 +0000 (13 04:34 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Nov 2018 04:34:59 +0000 (13 04:34 +0000)
treefdac1a45bf4f122160441c7d94517023f003fdf0
parent4daed3b3d5561c30ad430f35a260fbcdf06e397d
Implement P0780R2, pack expansion in lambda init-capture.

Mostly this was straightforward; the tricky bit was finding, in the
instantiation, the set of capture proxies built when instantiating the
init-capture.  The comment in lookup_init_capture_pack goes into detail.

* parser.c (cp_parser_lambda_introducer): Parse pack init-capture.
* pt.c (tsubst_pack_expansion): Handle init-capture packs.
(lookup_init_capture_pack): New.
(tsubst_expr) [DECL_EXPR]: Use it.
(tsubst_lambda_expr): Remember field pack expansions for
init-captures.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266052 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C [new file with mode: 0644]