[Bug c++/87685] [8 Regression] Calling a static method from inside a generic lambda requires to capture 'this'
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 26 04:55:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87685
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:b6136084ea86ab0d3fac54be83e50817a3db74a9
commit r8-10075-gb6136084ea86ab0d3fac54be83e50817a3db74a9
Author: Jason Merrill <jason@redhat.com>
Date: Tue Feb 25 13:37:18 2020 -0500
PR c++/87685 - generic lambda 'this' capture error.
The standard says that in a generic lambda we should speculatively capture
'this' if we see a call to an overload set that contains a non-static
member
function, but it seems wrong to reject the program if we can't capture,
since it might not actually be needed.
gcc/cp/ChangeLog
2020-02-25 Jason Merrill <jason@redhat.com>
PR c++/87685 - generic lambda 'this' capture error.
* lambda.c (lambda_expr_this_capture): Change add_capture_p to int.
(maybe_generic_this_capture): Pass -1.
More information about the Gcc-bugs
mailing list