Created on 2010-06-01.00:00:00 last changed 130 months ago
[Voted into the WP at the November, 2010 meeting.]
Proposed resolution (August, 2010):
Delete 9.4.5 [dcl.init.list] bullet 3.2, includeing the example:
Change 9.4.2 [dcl.init.aggr] paragraph 7 as follows:
If there are fewer initializer-clauses in the list than there are members in the aggregate, then each member not explicitly initialized shall bevalue-initialized (9.4 [dcl.init])initialized from an empty initializer list (9.4.5 [dcl.init.list]).
Otherwise, if the initializer list has no elements and T is an aggregate, each of the members of T is initialized from an empty initializer list. [Example:...
A better way to handle this would be to delete that bullet and change 9.4.2 [dcl.init.aggr] paragraph 7 as follows:
If there are fewer initializer-clauses in the list than there are members in the aggregate, then each member not explicitly initialized shall bevalue-initialized (9.4 [dcl.init])initialized from an empty initializer list (9.4.5 [dcl.init.list]).
This makes { } less of a special case and makes the following example work:
struct A { A(std::initializer_list<int>); }; struct B { int i; A a; }; B b = { 1 };
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | status: dr -> fdis |
2010-11-29 00:00:00 | admin | set | messages: + msg3177 |
2010-11-29 00:00:00 | admin | set | status: ready -> dr |
2010-08-23 00:00:00 | admin | set | messages: + msg2785 |
2010-06-01 00:00:00 | admin | create |