tmp/tmp7dgyroqa/{from.md → to.md}
RENAMED
|
@@ -1,7 +1,15 @@
|
|
| 1 |
#### Tuple helper classes <a id="tuple.helper">[[tuple.helper]]</a>
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
``` cpp
|
| 4 |
template <class... Types>
|
| 5 |
class tuple_size<tuple<Types...> >
|
| 6 |
: public integral_constant<size_t, sizeof...(Types)> { };
|
| 7 |
```
|
|
@@ -29,11 +37,11 @@ template <class T> class tuple_size<const volatile T>;
|
|
| 29 |
Let *TS* denote `tuple_size<T>` of the cv-unqualified type `T`. Then
|
| 30 |
each of the three templates shall meet the `UnaryTypeTrait`
|
| 31 |
requirements ([[meta.rqmts]]) with a `BaseCharacteristic` of
|
| 32 |
|
| 33 |
``` cpp
|
| 34 |
-
integral_constant<
|
| 35 |
```
|
| 36 |
|
| 37 |
``` cpp
|
| 38 |
template <size_t I, class T> class tuple_element<I, const T>;
|
| 39 |
template <size_t I, class T> class tuple_element<I, volatile T>;
|
|
@@ -43,10 +51,9 @@ template <size_t I, class T> class tuple_element<I, const volatile T>;
|
|
| 43 |
Let *TE* denote `tuple_element<I, T>` of the cv-unqualified type `T`.
|
| 44 |
Then each of the three templates shall meet the `TransformationTrait`
|
| 45 |
requirements ([[meta.rqmts]]) with a member typedef `type` that names
|
| 46 |
the following type:
|
| 47 |
|
| 48 |
-
- for the first specialization, `
|
| 49 |
-
- for the second specialization, `
|
| 50 |
-
|
| 51 |
-
- for the third specialization, `add_cv<`*`TE`*`::type>::type`.
|
| 52 |
|
|
|
|
| 1 |
#### Tuple helper classes <a id="tuple.helper">[[tuple.helper]]</a>
|
| 2 |
|
| 3 |
+
``` cpp
|
| 4 |
+
template <class T> struct tuple_size;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Remarks:* All specializations of `tuple_size<T>` shall meet the
|
| 8 |
+
`UnaryTypeTrait` requirements ([[meta.rqmts]]) with a
|
| 9 |
+
`BaseCharacteristic` of `integral_constant<size_t, N>` for some `N`.
|
| 10 |
+
|
| 11 |
``` cpp
|
| 12 |
template <class... Types>
|
| 13 |
class tuple_size<tuple<Types...> >
|
| 14 |
: public integral_constant<size_t, sizeof...(Types)> { };
|
| 15 |
```
|
|
|
|
| 37 |
Let *TS* denote `tuple_size<T>` of the cv-unqualified type `T`. Then
|
| 38 |
each of the three templates shall meet the `UnaryTypeTrait`
|
| 39 |
requirements ([[meta.rqmts]]) with a `BaseCharacteristic` of
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
+
integral_constant<size_t, TS::value>
|
| 43 |
```
|
| 44 |
|
| 45 |
``` cpp
|
| 46 |
template <size_t I, class T> class tuple_element<I, const T>;
|
| 47 |
template <size_t I, class T> class tuple_element<I, volatile T>;
|
|
|
|
| 51 |
Let *TE* denote `tuple_element<I, T>` of the cv-unqualified type `T`.
|
| 52 |
Then each of the three templates shall meet the `TransformationTrait`
|
| 53 |
requirements ([[meta.rqmts]]) with a member typedef `type` that names
|
| 54 |
the following type:
|
| 55 |
|
| 56 |
+
- for the first specialization, `add_const_t<`*`TE`*`::type>`,
|
| 57 |
+
- for the second specialization, `add_volatile_t<`*`TE`*`::type>`, and
|
| 58 |
+
- for the third specialization, `add_cv_t<`*`TE`*`::type>`.
|
|
|
|
| 59 |
|