Files
gcc-reflection/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic15.C
Jason Merrill e62d673d78 PR c++/84801 - ICE with unexpanded pack in lambda.
We avoid complaining about unexpanded packs when inside a lambda,
	since the lambda as a whole could be part of a pack expansion.
	But that can only be true if the lambda is in a template context.

   	* pt.c (check_for_bare_parameter_packs): Don't return early for a
	lambda in non-template context.

From-SVN: r258548
2018-03-14 23:49:07 -04:00

6 lines
137 B
C

// PR c++/84801
// { dg-do compile { target c++14 } }
int v;
int main() { [](auto... c) { v = c; }(1); } // { dg-error "not expanded" }