Created on 2013-09-06.00:00:00 last changed 121 months ago
[Moved to DR at the February, 2014 meeting.]
Proposed resolution (January, 2014):
Change 6.8 [basic.types] paragraph 10 as follows:
...ScalarCv-unqualified scalar types, trivially copyable class types ( Clause 11 [class]), arrays of such types, and non-volatile const-qualified versions of these types (6.8.5 [basic.type.qualifier]) are collectively called trivially copyable types...
According to 6.8 [basic.types] paragraph 9,
Arithmetic types (6.8.2 [basic.fundamental]), enumeration types, pointer types, pointer to member types (6.8.4 [basic.compound]), std::nullptr_t, and cv-qualified versions of these types (6.8.5 [basic.type.qualifier]) are collectively called scalar types... Scalar types, trivially copyable class types ( Clause 11 [class]), arrays of such types, and non-volatile const-qualified versions of these types (6.8.5 [basic.type.qualifier]) are collectively called trivially copyable types.
This is confusing, because “scalar types” include volatile-qualified types, but the intent of the definition of “trivially copyable type” appears to be to exclude volatile-qualified types. Perhaps the second quoted sentence should read something like,
A non-volatile type T or an array of such T is called a trivially copyable type if T is either a scalar type or a trivially copyable class type.
(Note that the following sentence, defining “trivial type,” has a similar formal issue, although it has no actual significance because all cv-qualifiers are permitted.)
(See also issue 496.)History | |||
---|---|---|---|
Date | User | Action | Args |
2014-11-24 00:00:00 | admin | set | status: dr -> c++14 |
2014-03-03 00:00:00 | admin | set | messages: + msg4932 |
2014-03-03 00:00:00 | admin | set | status: tentatively ready -> dr |
2014-01-20 00:00:00 | admin | set | messages: + msg4721 |
2014-01-20 00:00:00 | admin | set | status: open -> tentatively ready |
2013-09-06 00:00:00 | admin | create |