Skip to content
Snippets Groups Projects
Commit 1a150f1f authored by Patrick Palka's avatar Patrick Palka
Browse files

c++: generic lambda, implicit 'this' capture, xobj memfn [PR119038]


When a generic lambda calls an overload set containing an iobj member
function we speculatively capture 'this'.  We need to do the same
for an xobj member function.

	PR c++/119038

gcc/cp/ChangeLog:

	* lambda.cc (maybe_generic_this_capture): Consider xobj
	member functions as well, not just iobj.  Update function
	comment.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp23/explicit-obj-lambda15.C: New test.

Reviewed-by: default avatarJason Merrill <jason@redhat.com>
parent 815f1f27
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment