This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2023-01-15


886. Member initializers and aggregates

Section: 9.4.2  [dcl.init.aggr]     Status: CD2     Submitter: Daniel Krügler     Date: 5 May, 2009

[Voted into WP at March, 2010 meeting.]

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.

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]).