Title
Aggregates and “user-provided” constructors
Status
cd3
Section
9.5.2 [dcl.fct.def.default]
Submitter
Sean Hunt

Created on 2011-08-16.00:00:00 last changed 90 months ago

Messages

Date: 2012-02-15.00:00:00

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

Date: 2011-08-15.00:00:00

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

Date: 2011-08-16.00:00:00

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.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2012-11-03 00:00:00adminsetstatus: dr -> drwp
2012-02-27 00:00:00adminsetmessages: + msg3813
2012-02-27 00:00:00adminsetstatus: ready -> dr
2011-09-06 00:00:00adminsetmessages: + msg3465
2011-08-16 00:00:00admincreate