Created on 2012-04-25.00:00:00 last changed 94 months ago
Proposed resolution (October, 2015):
Change Clause 11 [class] paragraph 6 as follows:
A trivial class is a class thathas a default constructor (11.4.5 [class.ctor]), has no non-trivial default constructors, andis trivially copyable and has one or more default constructors (11.4.5 [class.ctor]), all of which are either trivial or deleted and at least one of which is not deleted. [Note: In particular, a trivially copyable or trivial class does not have virtual functions or virtual base classes. —end note]
Notes from the September, 2013 meeting:
It was decided to resolve issue 1344 separately from this issue, so this issue now requires its own resolution.
Notes from the October, 2012 meeting:
It was observed that this issue was related to issue 1344, as the current specification allows adding a default constructor by adding default arguments to the definition of a constructor. The resolution of that issue should also resolve this one.
[Adopted at the February, 2016 meeting.]
A default constructor that is defined as deleted is trivial, according to 11.4.5 [class.ctor] paragraph 5. This means that, according to Clause 11 [class] paragraph 6, such a class can be trivial. If, however, the class has no default constructor because it has a user-declared constructor, the class is not trivial. Since both cases prevent default construction of the class, it is not clear why there is a difference in triviality between the cases.
(See also issue 1928.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-02-06 00:00:00 | admin | set | status: tentatively ready -> cd4 |
2015-11-10 00:00:00 | admin | set | messages: + msg5603 |
2015-11-10 00:00:00 | admin | set | status: drafting -> tentatively ready |
2013-10-14 00:00:00 | admin | set | messages: + msg4626 |
2012-11-03 00:00:00 | admin | set | messages: + msg4098 |
2012-11-03 00:00:00 | admin | set | status: open -> drafting |
2012-04-25 00:00:00 | admin | create |