tmp/tmpacbdyh3e/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Variant <a id="depr.variant">[[depr.variant]]</a>
|
| 2 |
+
|
| 3 |
+
The header `<variant>` has the following additions:
|
| 4 |
+
|
| 5 |
+
``` cpp
|
| 6 |
+
namespace std {
|
| 7 |
+
template<class T> struct variant_size<volatile T>;
|
| 8 |
+
template<class T> struct variant_size<const volatile T>;
|
| 9 |
+
|
| 10 |
+
template<size_t I, class T> struct variant_alternative<I, volatile T>;
|
| 11 |
+
template<size_t I, class T> struct variant_alternative<I, const volatile T>;
|
| 12 |
+
}
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
``` cpp
|
| 16 |
+
template<class T> class variant_size<volatile T>;
|
| 17 |
+
template<class T> class variant_size<const volatile T>;
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
Let `VS` denote `variant_size<T>` of the cv-unqualified type `T`. Then
|
| 21 |
+
specializations of each of the two templates meet the
|
| 22 |
+
*Cpp17UnaryTypeTrait* requirements with a base characteristic of
|
| 23 |
+
`integral_constant<size_t, VS::value>`.
|
| 24 |
+
|
| 25 |
+
``` cpp
|
| 26 |
+
template<size_t I, class T> class variant_alternative<I, volatile T>;
|
| 27 |
+
template<size_t I, class T> class variant_alternative<I, const volatile T>;
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
Let `VA` denote `variant_alternative<I, T>` of the cv-unqualified type
|
| 31 |
+
`T`. Then specializations of each of the two templates meet the
|
| 32 |
+
*Cpp17TransformationTrait* requirements with a member typedef `type`
|
| 33 |
+
that names the following type:
|
| 34 |
+
|
| 35 |
+
- for the first specialization, `add_volatile_t<VA::type>`, and
|
| 36 |
+
- for the second specialization, `add_cv_t<VA::type>`.
|
| 37 |
+
|