* parser.c (cp_parser_parameter_declaration): Don't turn 'auto' into
a pack if it's followed by a declarator-id.
From-SVN: r263484
+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
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
--- /dev/null
+// PR c++/86728
+// { dg-do compile { target c++14 } }
+
+auto c = [](auto x ...) { };