https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117602
Bug ID: 117602 Summary: bogus error with nested lambda Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- This should compile in C++20: ``` void g () { [&](decltype([&](decltype([=](decltype([&](decltype([&]() {})) {})) {})) {})){}; [&](decltype([&](decltype([&](decltype([&](decltype([&]() {})) {})) {})) {})){}; [=](decltype([=](decltype([=](decltype([=](decltype([&]() {})) {})) {})) {})){}; } ``` but we say: error: non-local lambda expression cannot have a capture-default