Commit fc186cbd by Jason Merrill Committed by Jason Merrill

PR c++/86728 - C variadic generic lambda.

	* parser.c (cp_parser_parameter_declaration): Don't turn 'auto' into
	a pack if it's followed by a declarator-id.

From-SVN: r263484
parent 1d03ff3f
2018-08-10 Jason Merrill <jason@redhat.com>
PR c++/86728 - C variadic generic lambda.
* parser.c (cp_parser_parameter_declaration): Don't turn 'auto' into
a pack if it's followed by a declarator-id.
2018-08-08 Jakub Jelinek <jakub@redhat.com>
P0595R1 - is_constant_evaluated
......
......@@ -21722,7 +21722,8 @@ cp_parser_parameter_declaration (cp_parser *parser,
parameter was introduced during cp_parser_parameter_declaration,
change any implicit parameters introduced into packs. */
if (parser->implicit_template_parms
&& (token->type == CPP_ELLIPSIS
&& ((token->type == CPP_ELLIPSIS
&& declarator_can_be_parameter_pack (declarator))
|| (declarator && declarator->parameter_pack_p)))
{
int latest_template_parm_idx = TREE_VEC_LENGTH
// PR c++/86728
// { dg-do compile { target c++14 } }
auto c = [](auto x ...) { };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment