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
This commit is contained in:
parent
1d03ff3ff1
commit
fc186cbd1c
3 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
4
gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic19.C
Normal file
4
gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic19.C
Normal file
|
@ -0,0 +1,4 @@
|
|||
// PR c++/86728
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
auto c = [](auto x ...) { };
|
Loading…
Add table
Reference in a new issue