Files
gcc-reflection/gcc/testsuite/g++.dg/cpp1y/lambda-generic-this4.C
Jason Merrill 8e4339f502 c++: nested generic lambda in DMI [PR101717]
We were already checking COMPLETE_TYPE_P to recognize instantiation of a
generic lambda, but didn't consider that we might be nested in a non-generic
lambda.

	PR c++/101717

gcc/cp/ChangeLog:

	* lambda.cc (lambda_expr_this_capture): Check all enclosing
	lambdas for completeness.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1y/lambda-generic-this4.C: New test.
2022-04-06 23:25:56 -04:00

8 lines
139 B
C

// PR c++/101717
// { dg-do compile { target c++14 } }
struct x {
static void f() { }
void (*_)() = [] { [=](auto) { f(); }(0); };
};