https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120123
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:c096341a0809b322ece478f67c5d7be6923a0169 commit r15-9757-gc096341a0809b322ece478f67c5d7be6923a0169 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.