[Bug c++/114219] [11/12/13/14 Regression] [expr.const] lvalue-to-rvalue conversion is not diagnosed to disqualify constant expressions for empty classes
janschultke at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Sun Mar 3 18:08:57 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114219
Jan Schultke <janschultke at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #5 from Jan Schultke <janschultke at googlemail dot com> ---
Looks like the existing comments were right.
Lvalue-to-rvalue conversion very rarely takes place for class types, and if it
does, that may be a wording bug.
Instead of lvalue-to-rvalue conversion, this case calls the implicitly-defined
copy constructor, which can be used in constant expressions.
More information about the Gcc-bugs
mailing list