Title
Triviality vs multiple default constructors
Status
cd3
Section
Clause [11] [class]
Submitter
Sean Hunt

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

Messages

Date: 2012-10-15.00:00:00

[Moved to DR at the October, 2012 meeting.]

Date: 2012-02-15.00:00:00

Proposed resolution (February, 2012):

Change Clause 11 [class] paragraph 6 as follows:

...A trivial class is a class that has a trivial default constructor (11.4.5 [class.ctor]), has no non-trivial default constructors, and is trivially copyable...
Date: 2020-12-15.00:00:00

The requirements for a trivial class include having “a trivial default constructor” (Clause 11 [class] paragraph 6). However, with an explicitly-defaulted default constructor and other constructors with default arguments, it is possible to have multiple default constructors. Such a class cannot be default-initialized and thus should probably be considered non-trivial.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2013-05-03 00:00:00adminsetstatus: dr -> drwp
2012-11-03 00:00:00adminsetmessages: + msg4151
2012-11-03 00:00:00adminsetstatus: ready -> dr
2012-02-27 00:00:00adminsetmessages: + msg3727
2012-02-27 00:00:00adminsetstatus: drafting -> ready
2011-08-16 00:00:00admincreate