https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120123
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:6e10db3be0193514d8a67d1367d8fbe639e03b6a commit r14-11823-g6e10db3be0193514d8a67d1367d8fbe639e03b6a Author: Jason Merrill <ja...@redhat.com> Date: Fri May 30 18:27:45 2025 -0400 c++: lambda this capture and requires [PR120123] We shouldn't need to be within the lambda body to look through it to the enclosing non-static member function. This change is a small subset of r16-970. PR c++/120123 gcc/cp/ChangeLog: * lambda.cc (nonlambda_method_basetype): Look through lambdas even when current_class_ref is null. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-lambda24.C: New test.