Created on 2012-06-01.00:00:00 last changed 130 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (February, 2013):
Change 9.4 [dcl.init] paragraph 7 as follows:
To default-initialize an object of type T means:
if T is a (possibly cv-qualified) class type ( Clause 11 [class]), the default constructor (11.4.5 [class.ctor]) for T is called (and the initialization is ill-formed if T has no
accessible default constructordefault constructor or overload resolution (12.2 [over.match]) results in an ambiguity or in a function that is deleted or inaccessible from the context of the initialization);...
Change 9.4 [dcl.init] paragraph 8 as follows:
To value-initialize an object of type T means:
...
if T is a (possibly cv-qualified) non-union class type without a user-provided or deleted default constructor, then the object is zero-initialized and the semantic constraints for default-initialization are checked, and if T has a non-trivial default constructor, the object is default-initialized;
...
According to 9.4 [dcl.init] paragraph 7, a trivial default constructor is not used in value initialization, so the following example would appear to be well-formed:
struct A { private: A() = default; }; int main() { A(); }
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
2013-05-03 00:00:00 | admin | set | messages: + msg4408 |
2013-05-03 00:00:00 | admin | set | status: tentatively ready -> dr |
2013-03-18 00:00:00 | admin | set | messages: + msg4247 |
2013-03-18 00:00:00 | admin | set | status: drafting -> tentatively ready |
2012-11-03 00:00:00 | admin | set | status: open -> drafting |
2012-06-01 00:00:00 | admin | create |