8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic6.C
Jason Merrill fe23b12a23 PR c++/84160 - ICE with nested variadic capture.
* lambda.c (is_capture_proxy_with_ref): New.
	(insert_capture_proxy): Don't set DECL_CAPTURED_VARIABLE from a
	COMPONENT_REF.
	* expr.c (mark_use): Use is_capture_proxy_with_ref.
	* constexpr.c (potential_constant_expression_1): Likewise.
	* semantics.c (process_outer_var_ref): Likewise.

From-SVN: r257325
2018-02-01 21:07:09 -05:00

13 lines
164 B
C

// PR c++/84160
// { dg-do compile { target c++11 } }
template < typename ... T > void f (T ... a)
{
[a ...] { [a ...] {}; };
}
void g ()
{
f < int > (0);
}