aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index e00e56c..2b0695a 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -8753,6 +8753,14 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr)
/*template_arg_p=*/false,
&error_msg,
capture_token->location);
+
+ if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS))
+ {
+ cp_lexer_consume_token (parser->lexer);
+ capture_init_expr = make_pack_expansion (capture_init_expr);
+ }
+ else
+ check_for_bare_parameter_packs (capture_init_expr);
}
if (LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda_expr) != CPLD_NONE