]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: lambda this capture and requires [PR120123]
authorJason Merrill <jason@redhat.com>
Fri, 30 May 2025 22:27:45 +0000 (18:27 -0400)
committerJason Merrill <jason@redhat.com>
Mon, 2 Jun 2025 15:40:51 +0000 (11:40 -0400)
commit8bdbd3b73464f7b12b7d31af91660381be2b5e17
tree08f37703e19de3119999f836601a6f1d73c5d8e7
parent42fd3cc43061f924d09a9952468cbc67e3cd8815
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.
gcc/cp/lambda.cc
gcc/testsuite/g++.dg/cpp2a/concepts-lambda24.C [new file with mode: 0644]