aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 421685c..b0fd6ec 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -606,8 +606,11 @@ add_capture (tree lambda, tree id, tree orig_init, bool by_reference_p,
parameter pack in this context. We will want as many fields as we
have elements in the expansion of the initializer, so use its packs
instead. */
- PACK_EXPANSION_PARAMETER_PACKS (type)
- = uses_parameter_packs (initializer);
+ {
+ PACK_EXPANSION_PARAMETER_PACKS (type)
+ = uses_parameter_packs (initializer);
+ PACK_EXPANSION_AUTO_P (type) = true;
+ }
}
/* Make member variable. */