Created on 2018-07-10.00:00:00 last changed 47 months ago
Proposed resolution (November, 2018):
Change 11.4.5.2 [class.default.ctor] bullet 2.4 as follows:
A defaulted default constructor for class X is defined as deleted if:
...
any non-variant non-static data member of const-qualified type (or array thereof) with no brace-or-equal-initializer
does not have a user-provided default constructoris not const-default-constructible (9.4 [dcl.init]) ,...
[Accepted as a DR at the February, 2019 meeting.]
After the changes for comment RU 1 in P0490R0, a defaulted default constructor is acceptable for default initialization of a const object under certain circumstances; for example,
struct A {}; const A a;
is well-formed. However, default-initialization of such a class member still requires a user-provided constructor:
struct B { const A a; };
B b; //error
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-12-15 00:00:00 | admin | set | messages: + msg6407 |
2018-07-10 00:00:00 | admin | create |