tmp/tmpldfvq7xz/{from.md → to.md}
RENAMED
|
@@ -9,32 +9,33 @@ Each of these templates shall be a *Cpp17UnaryTypeTrait* [[meta.rqmts]]
|
|
| 9 |
with a base characteristic of `true_type` if the corresponding condition
|
| 10 |
is `true`, otherwise `false_type`.
|
| 11 |
|
| 12 |
#### Primary type categories <a id="meta.unary.cat">[[meta.unary.cat]]</a>
|
| 13 |
|
| 14 |
-
The primary type categories
|
| 15 |
-
subclause [[basic.types]] of the C++
|
|
|
|
| 16 |
|
| 17 |
For any given type `T`, the result of applying one of these templates to
|
| 18 |
`T` and to cv `T` shall yield the same result.
|
| 19 |
|
| 20 |
[*Note 1*: For any given type `T`, exactly one of the primary type
|
| 21 |
categories has a `value` member that evaluates to `true`. — *end note*]
|
| 22 |
|
| 23 |
#### Composite type traits <a id="meta.unary.comp">[[meta.unary.comp]]</a>
|
| 24 |
|
| 25 |
-
|
| 26 |
-
categories, corresponding to the
|
| 27 |
-
[[basic.types]].
|
| 28 |
|
| 29 |
For any given type `T`, the result of applying one of these templates to
|
| 30 |
`T` and to cv `T` shall yield the same result.
|
| 31 |
|
| 32 |
#### Type properties <a id="meta.unary.prop">[[meta.unary.prop]]</a>
|
| 33 |
|
| 34 |
-
|
| 35 |
-
of types.
|
| 36 |
|
| 37 |
It is unspecified whether the library defines any full or partial
|
| 38 |
specializations of any of these templates.
|
| 39 |
|
| 40 |
For all of the class templates `X` declared in this subclause,
|
|
@@ -120,20 +121,21 @@ effects such as the instantiation of class template specializations and
|
|
| 120 |
function template specializations, the generation of implicitly-defined
|
| 121 |
functions, and so on. Such side effects are not in the “immediate
|
| 122 |
context” and can result in the program being ill-formed. — *end note*]
|
| 123 |
|
| 124 |
The predicate condition for a template specialization
|
| 125 |
-
`has_unique_object_representations<T>` shall be satisfied if and only
|
| 126 |
-
if:
|
| 127 |
|
| 128 |
- `T` is trivially copyable, and
|
| 129 |
- any two objects of type `T` with the same value have the same object
|
| 130 |
-
representation, where
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
|
|
|
|
|
|
| 135 |
|
| 136 |
The set of scalar types for which this condition holds is
|
| 137 |
*implementation-defined*.
|
| 138 |
|
| 139 |
[*Note 4*: If a type has padding bits, the condition does not hold;
|
|
|
|
| 9 |
with a base characteristic of `true_type` if the corresponding condition
|
| 10 |
is `true`, otherwise `false_type`.
|
| 11 |
|
| 12 |
#### Primary type categories <a id="meta.unary.cat">[[meta.unary.cat]]</a>
|
| 13 |
|
| 14 |
+
The primary type categories specified in [[meta.unary.cat]] correspond
|
| 15 |
+
to the descriptions given in subclause [[basic.types]] of the C++
|
| 16 |
+
standard.
|
| 17 |
|
| 18 |
For any given type `T`, the result of applying one of these templates to
|
| 19 |
`T` and to cv `T` shall yield the same result.
|
| 20 |
|
| 21 |
[*Note 1*: For any given type `T`, exactly one of the primary type
|
| 22 |
categories has a `value` member that evaluates to `true`. — *end note*]
|
| 23 |
|
| 24 |
#### Composite type traits <a id="meta.unary.comp">[[meta.unary.comp]]</a>
|
| 25 |
|
| 26 |
+
The templates specified in [[meta.unary.comp]] provide convenient
|
| 27 |
+
compositions of the primary type categories, corresponding to the
|
| 28 |
+
descriptions given in subclause [[basic.types]].
|
| 29 |
|
| 30 |
For any given type `T`, the result of applying one of these templates to
|
| 31 |
`T` and to cv `T` shall yield the same result.
|
| 32 |
|
| 33 |
#### Type properties <a id="meta.unary.prop">[[meta.unary.prop]]</a>
|
| 34 |
|
| 35 |
+
The templates specified in [[meta.unary.prop]] provide access to some of
|
| 36 |
+
the more important properties of types.
|
| 37 |
|
| 38 |
It is unspecified whether the library defines any full or partial
|
| 39 |
specializations of any of these templates.
|
| 40 |
|
| 41 |
For all of the class templates `X` declared in this subclause,
|
|
|
|
| 121 |
function template specializations, the generation of implicitly-defined
|
| 122 |
functions, and so on. Such side effects are not in the “immediate
|
| 123 |
context” and can result in the program being ill-formed. — *end note*]
|
| 124 |
|
| 125 |
The predicate condition for a template specialization
|
| 126 |
+
`has_unique_object_representations<T>` shall be satisfied if and only if
|
|
|
|
| 127 |
|
| 128 |
- `T` is trivially copyable, and
|
| 129 |
- any two objects of type `T` with the same value have the same object
|
| 130 |
+
representation, where
|
| 131 |
+
- two objects of array or non-union class type are considered to have
|
| 132 |
+
the same value if their respective sequences of direct subobjects
|
| 133 |
+
have the same values, and
|
| 134 |
+
- two objects of union type are considered to have the same value if
|
| 135 |
+
they have the same active member and the corresponding members have
|
| 136 |
+
the same value.
|
| 137 |
|
| 138 |
The set of scalar types for which this condition holds is
|
| 139 |
*implementation-defined*.
|
| 140 |
|
| 141 |
[*Note 4*: If a type has padding bits, the condition does not hold;
|