tmp/tmpgnizu8qa/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Tuple <a id="depr.tuple">[[depr.tuple]]</a>
|
| 2 |
+
|
| 3 |
+
The header `<tuple>` has the following additions:
|
| 4 |
+
|
| 5 |
+
``` cpp
|
| 6 |
+
namespace std {
|
| 7 |
+
template<class T> class tuple_size<volatile T>;
|
| 8 |
+
template<class T> class tuple_size<const volatile T>;
|
| 9 |
+
|
| 10 |
+
template<size_t I, class T> class tuple_element<I, volatile T>;
|
| 11 |
+
template<size_t I, class T> class tuple_element<I, const volatile T>;
|
| 12 |
+
}
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
``` cpp
|
| 16 |
+
template<class T> class tuple_size<volatile T>;
|
| 17 |
+
template<class T> class tuple_size<const volatile T>;
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
Let `TS` denote `tuple_size<T>` of the cv-unqualified type `T`. If the
|
| 21 |
+
expression `TS::value` is well-formed when treated as an unevaluated
|
| 22 |
+
operand, then specializations of each of the two templates meet the
|
| 23 |
+
*Cpp17TransformationTrait* requirements with a base characteristic of
|
| 24 |
+
`integral_constant<size_t, TS::value>`. Otherwise, they have no member
|
| 25 |
+
`value`.
|
| 26 |
+
|
| 27 |
+
Access checking is performed as if in a context unrelated to `TS` and
|
| 28 |
+
`T`. Only the validity of the immediate context of the expression is
|
| 29 |
+
considered.
|
| 30 |
+
|
| 31 |
+
In addition to being available via inclusion of the `<tuple>` header,
|
| 32 |
+
the two templates are available when any of the headers `<array>`,
|
| 33 |
+
`<ranges>`, or `<utility>` are included.
|
| 34 |
+
|
| 35 |
+
``` cpp
|
| 36 |
+
template<size_t I, class T> class tuple_element<I, volatile T>;
|
| 37 |
+
template<size_t I, class T> class tuple_element<I, const volatile T>;
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
Let `TE` denote `tuple_element_t<I, T>` of the cv-unqualified type `T`.
|
| 41 |
+
Then specializations of each of the two templates meet the
|
| 42 |
+
*Cpp17TransformationTrait* requirements with a member typedef `type`
|
| 43 |
+
that names the following type:
|
| 44 |
+
|
| 45 |
+
- for the first specialization, `add_volatile_t<TE>`, and
|
| 46 |
+
- for the second specialization, `add_cv_t<TE>`.
|
| 47 |
+
|
| 48 |
+
In addition to being available via inclusion of the `<tuple>` header,
|
| 49 |
+
the two templates are available when any of the headers `<array>`,
|
| 50 |
+
`<ranges>`, or `<utility>` are included.
|
| 51 |
+
|