Created on 2015-03-06.00:00:00 last changed 81 months ago
[Moved to DR at the November, 2016 meeting.]
Proposed resolution (June, 2016):
Change 6.8 [basic.types] paragraph 9 as follows:
...called POD types. Cv-unqualified scalar types, trivially copyable class types (Clause 11 [class]), arrays of such types, andnon-volatile const-qualifiedcv-qualified versions of these types (6.8.5 [basic.type.qualifier]) are collectively called trivially copyable types. Scalar types...
Delete bullet 12.2 of 11.4.5.3 [class.copy.ctor]:
A copy/move constructor for class X is trivial if it is not user-provided, its parameter-type-list is equivalent to the parameter-type-list of an implicit declaration, and if
...
class X has no non-static data members of volatile-qualified type, and...
Delete bullet 25.2 of 11.4.5.3 [class.copy.ctor]:
A copy/move assignment operator for class X is trivial if it is not user-provided, its parameter-type-list is equivalent to the parameter-type-list of an implicit declaration, and if
...
class X has no non-static data members of volatile-qualified type, and
Notes from the February, 2016 meeting:
CWG agreed with the suggested direction for the changes in 11.4.5.3 [class.copy.ctor]; the use of “trivial” will be dealt with separately and not as part of the resolution of this issue.
The resolution of issue 496 included the addition of 11.4.5.3 [class.copy.ctor] paragraph 25. 2, making a class's copy/move constructor non-trivial if it has a non-static data member of volatile-qualified type. This change breaks the IA-64 ABI, so it has been requested that CWG reconsider this aspect of the resolution.
On a related note, the resolution of issue 496 also changed 6.8 [basic.types] paragraph 9, which makes volatile-qualified scalar types “trivial” but not “trivially copyable.” It is not clear why there is a distinction made here; the only actual use of “trivial type” in the Standard appears to be in the description of qsort, which should probably use “trivially copyable.” (See also issue 1746.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2018-02-27 00:00:00 | admin | set | messages: + msg6167 |
2018-02-27 00:00:00 | admin | set | status: dr -> c++17 |
2017-02-06 00:00:00 | admin | set | messages: + msg6091 |
2017-02-06 00:00:00 | admin | set | messages: + msg6090 |
2017-02-06 00:00:00 | admin | set | status: open -> dr |
2015-03-06 00:00:00 | admin | create |