Created on2012-04-25.00:00:00 last changed109 months ago
Proposed resolution (October, 2015):
Change Clause 11 [class] paragraph 6 as follows:
Atrivial class is a class thathas a defaultconstructor (11.4.5 [class.ctor]), has no non-trivialdefault constructors, andis trivially copyableand has one or more default constructors(11.4.5 [class.ctor]), all of which are either trivialor deleted and at least one of which is notdeleted. [Note: In particular, a triviallycopyable or trivial class does not have virtual functions orvirtual base classes. —end note]
Notes from the September, 2013 meeting:
It was decided to resolveissue 1344separately from this issue, so this issue now requires its ownresolution.
Notes from the October, 2012 meeting:
It was observed that this issue was related toissue 1344, as the current specification allows addinga default constructor by adding default arguments to the definition ofa constructor. The resolution of that issue should also resolve thisone.
[Adopted at the February, 2016 meeting.]
A default constructor that is defined as deleted is trivial, accordingto 11.4.5 [class.ctor] paragraph 5. This means that, accordingto Clause 11 [class] paragraph 6, such a class can be trivial.If, however, the class has no default constructor because it has auser-declared constructor, the class is not trivial. Since both casesprevent default construction of the class, it is not clear why there isa difference in triviality between the cases.
(See alsoissue 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 | |