https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113563

--- Comment #20 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Jason Merrill
<[email protected]>:

https://gcc.gnu.org/g:058c68a524e2b9fd4e35fd45f73f49555cb59a43

commit r16-8956-g058c68a524e2b9fd4e35fd45f73f49555cb59a43
Author: Jason Merrill <[email protected]>
Date:   Sat May 23 00:26:30 2026 -0400

    c++: this capture in template [PR125384]

    The r16-1019 change to special-case 'this' capture handling dropped the
    'const' qualifier from the capture proxy, so the call to rvalue in
    finish_this_expr no longer built a NOP_EXPR to express dropping that
    'const'.

            PR c++/125384
            PR c++/113563

    gcc/cp/ChangeLog:

            * lambda.cc (build_capture_proxy): 'this' capture proxy is const.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/lambda/lambda-this23.C: New test.

    (cherry picked from commit 4491ee5688d0bcd69956af4126e9e4643d951178)

Reply via email to