Title
Member initializers and aggregates
Status
cd2
Section
9.4.2 [dcl.init.aggr]
Submitter
Daniel Krügler

Created on 2009-05-05.00:00:00 last changed 178 months ago

Messages

Date: 2010-03-15.00:00:00

[Voted into WP at March, 2010 meeting.]

Date: 2009-11-15.00:00:00

Proposed resolution (November, 2009):

Change 9.4.2 [dcl.init.aggr] paragraph 1 as follows:

An aggregate is an array or a class (Clause 11 [class]) with no user-provided constructors (11.4.5 [class.ctor]), no brace-or-equal-initializers for non-static data members (11.4 [class.mem]), no private or protected non-static data members (11.8 [class.access]), no base classes (11.7 [class.derived]), and no virtual functions (11.7.3 [class.virtual]).
Date: 2009-08-03.00:00:00

The current wording of 9.4.2 [dcl.init.aggr] paragraph 1 does not consider brace-or-equal-initializers on members as affecting whether a class type is an aggregate or not. Because in-class member initializers are essentially syntactic sugar for mem-initializers, and the presence of a user-provided constructor disqualifies a class from being an aggregate, presumably the same should hold true of member initializers.

History
Date User Action Args
2010-03-29 00:00:00adminsetmessages: + msg2711
2010-03-29 00:00:00adminsetstatus: tentatively ready -> cd2
2010-02-16 00:00:00adminsetmessages: + msg2502
2010-02-16 00:00:00adminsetstatus: drafting -> tentatively ready
2009-08-03 00:00:00adminsetstatus: open -> drafting
2009-05-05 00:00:00admincreate