Created on 2004-12-15.00:00:00 last changed 197 months ago
[Voted into WP at April, 2007 meeting.]
Proposed resolution (October, 2005):
This issue is resolved by the resolution of issue 413.
The current wording of 9.4.2 [dcl.init.aggr] paragraph 8 requires that
An initializer for an aggregate member that is an empty class shall have the form of an empty initializer-list {}.
This is overly constraining. There is no reason that the following should be ill-formed:
struct S { }; S s; S arr[1] = { s };
Mike Miller: The wording of 9.4.2 [dcl.init.aggr] paragraph 8 is unclear. “An aggregate member” would most naturally mean “a member of an aggregate.” In context, however, I think it must mean “a member [of an aggregate] that is an aggregate”, that is, a subaggregate. Members of aggregates need not themselves be aggregates (cf paragraph 13 and 11.9.2 [class.expl.init]); it cannot be the case that an object of an empty class with a user-declared constructor must be initialized with {} when it is a member of an aggregate. This wording should be clarified, regardless of the decision on Nathan's point.
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2007-08-05 00:00:00 | admin | set | status: dr -> wp |
2007-05-06 00:00:00 | admin | set | messages: + msg1502 |
2007-05-06 00:00:00 | admin | set | status: ready -> dr |
2006-11-05 00:00:00 | admin | set | status: review -> ready |
2005-10-22 00:00:00 | admin | set | messages: + msg1238 |
2005-10-22 00:00:00 | admin | set | status: drafting -> review |
2005-05-01 00:00:00 | admin | set | status: open -> drafting |
2004-12-15 00:00:00 | admin | create |