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

2024-04-18


1355. Aggregates and “user-provided” constructors

Section: 9.5.2  [dcl.fct.def.default]     Status: CD3     Submitter: Sean Hunt     Date: 2011-08-16

[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]

The definition of “user-provided” given in 9.5.2 [dcl.fct.def.default] paragraph 4 applies only to special member functions, while the definition of an aggregate in 9.4.2 [dcl.init.aggr] paragraph 1 relies on that term in identifying constructors that make a class a non-aggregate. As a result, a class with a non-special constructor is considered an aggregate.

Proposed resolution (August, 2011):

Change 9.5.2 [dcl.fct.def.default] paragraph 4 as follows:

A special member function is user-provided if it is user-declared and not explicitly defaulted or deleted on its first declaration...

[Drafting note: This makes a class with only a deleted initializer-list constructor an aggregate.]