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

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

https://gcc.gnu.org/g:8fda2c274ac66d60c1dfc1349e9efb4e8c2a3580

commit r10-6416-g8fda2c274ac66d60c1dfc1349e9efb4e8c2a3580
Author: Jason Merrill <ja...@redhat.com>
Date:   Mon Feb 3 11:11:55 2020 -0500

    c++: Allow parm of empty class type in constexpr.

    Since copying a class object is defined in terms of the copy constructor,
    copying an empty class is OK even if it would otherwise not be usable in a
    constant expression.  Relatedly, using a parameter as an lvalue is no more
    problematic than a local variable, and calling a member function uses the
    object as an lvalue.

        PR c++/91953
        * constexpr.c (potential_constant_expression_1) [PARM_DECL]: Allow
        empty class type.
        [COMPONENT_REF]: A member function reference doesn't use the object
        as an rvalue.

Reply via email to