https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121292
--- Comment #1 from Jireh Guo <jirehguo at tju dot edu.cn> --- The source code above is invalid. Here is the correct code: ------------------------ #include<iostream> template <class T> struct S { void foo(){ auto f = [&] { f(); }; f(); } }; int main() { S<float> test; // test.foo(); }