mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 12:00:11 -05:00
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.
8 lines
139 B
C
8 lines
139 B
C
// PR c++/101717
|
|
// { dg-do compile { target c++14 } }
|
|
|
|
struct x {
|
|
static void f() { }
|
|
void (*_)() = [] { [=](auto) { f(); }(0); };
|
|
};
|