[Bug c++/89305] CWG DR 253 is not implemented
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 12 15:34:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89305
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-02-12
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The resolution to the DR goes a bit further than the rule GCC has been using:
A class type T is const-default-constructible if default-initialization of T
would invoke a user-provided constructor of T (not inherited from a base class)
or if
- each direct non-variant non-static data member M of T has a default member
initializer or, if M is of class type X (or array thereof), X is
const-default-constructible,
- if T is a union with at least one non-static data member, exactly one
variant member has a default member initializer,
- if T is a not a union, for each anonymous union member with at least one
non-static data member (if any), exactly one non-static data member has a
default member initializer, and
- each potentially constructed base class of T is
const-default-constructible.
More information about the Gcc-bugs
mailing list