[Bug c++/90212] [8/9/10/11 Regression] by-ref capture of constexpr class object rejected

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 25 22:06:09 GMT 2020


--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill


commit r10-8183-gaa613a81831bdc044840a95a7a7803a235608503
Author: Jason Merrill <jason@redhat.com>
Date:   Mon May 25 18:04:39 2020 -0400

    c++: constexpr and lambda capture [PR90212]

    This is the same issue as PR86429, just in potential_constant_expression_1
    rather than cxx_eval_constant_expression.  As in that case, when we're
    trying to evaluate a constant expression within a lambda, we don't have a
    constant closure object to refer to, but we can try to refer directly to
    captured variable.

    2020-05-05  Jason Merrill  <jason@redhat.com>

            PR c++/90212
            * constexpr.c (potential_constant_expression_1): In a lambda
            function, consider a captured variable directly.

More information about the Gcc-bugs mailing list