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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:eb59e58dcc4cdf36b8b2d4e1654fe4fa062b5bef

commit r16-2490-geb59e58dcc4cdf36b8b2d4e1654fe4fa062b5bef
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Jul 24 14:07:11 2025 -0400

    c++: lambda convop in C++23 [PR114632]

    The lambda conversion was ICEing for two C++23 features, static op() and
    explicit object parameters.  The issue with the former seems like a more
    general issue: tsubst_function_decl recursing to substitute the parameters
    was affected by cp_unevaluated_operand from the decltype that refers to the
    declaration.  Various places already make a point of clearing
    cp_unevaluated_operand ahead of PARM_DECL tsubsting; doing it here makes
the
    PR101233 fix redundant.

    For explicit object lambdas, we want to implement CWG2561 and
    just not declare the conversion.

            PR c++/114632
            PR c++/101233

    gcc/cp/ChangeLog:

            * lambda.cc (maybe_add_lambda_conv_op): Not for xobj lambda.
            * pt.cc (tsubst_function_decl): Add cp_evaluated.
            (alias_ctad_tweaks): Revert PR101233 fix.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp23/explicit-obj-lambda18.C: New test.
            * g++.dg/cpp23/static-operator-call7.C: New test.

Reply via email to