tmp/tmpu79kljwr/{from.md → to.md}
RENAMED
|
@@ -1,26 +1,28 @@
|
|
| 1 |
#### Array modifications <a id="meta.trans.arr">[[meta.trans.arr]]</a>
|
| 2 |
|
|
|
|
|
|
|
| 3 |
[*Example 1*:
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
// the following assertions hold:
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
```
|
| 12 |
|
| 13 |
— *end example*]
|
| 14 |
|
| 15 |
[*Example 2*:
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
// the following assertions hold:
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
```
|
| 24 |
|
| 25 |
— *end example*]
|
| 26 |
|
|
|
|
| 1 |
#### Array modifications <a id="meta.trans.arr">[[meta.trans.arr]]</a>
|
| 2 |
|
| 3 |
+
The templates specified in [[meta.trans.arr]] modify array types.
|
| 4 |
+
|
| 5 |
[*Example 1*:
|
| 6 |
|
| 7 |
``` cpp
|
| 8 |
// the following assertions hold:
|
| 9 |
+
static_assert(is_same_v<remove_extent_t<int>, int>);
|
| 10 |
+
static_assert(is_same_v<remove_extent_t<int[2]>, int>);
|
| 11 |
+
static_assert(is_same_v<remove_extent_t<int[2][3]>, int[3]>);
|
| 12 |
+
static_assert(is_same_v<remove_extent_t<int[][3]>, int[3]>);
|
| 13 |
```
|
| 14 |
|
| 15 |
— *end example*]
|
| 16 |
|
| 17 |
[*Example 2*:
|
| 18 |
|
| 19 |
``` cpp
|
| 20 |
// the following assertions hold:
|
| 21 |
+
static_assert(is_same_v<remove_all_extents_t<int>, int>);
|
| 22 |
+
static_assert(is_same_v<remove_all_extents_t<int[2]>, int>);
|
| 23 |
+
static_assert(is_same_v<remove_all_extents_t<int[2][3]>, int>);
|
| 24 |
+
static_assert(is_same_v<remove_all_extents_t<int[][3]>, int>);
|
| 25 |
```
|
| 26 |
|
| 27 |
— *end example*]
|
| 28 |
|