tmp/tmpx61i5re1/{from.md → to.md}
RENAMED
|
@@ -1,18 +1,30 @@
|
|
| 1 |
#### Array modifications <a id="meta.trans.arr">[[meta.trans.arr]]</a>
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
``` cpp
|
| 4 |
// the following assertions hold:
|
| 5 |
-
assert((
|
| 6 |
-
assert((
|
| 7 |
-
assert((
|
| 8 |
-
assert((
|
| 9 |
```
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
``` cpp
|
| 12 |
// the following assertions hold:
|
| 13 |
-
assert((
|
| 14 |
-
assert((
|
| 15 |
-
assert((
|
| 16 |
-
assert((
|
| 17 |
```
|
| 18 |
|
|
|
|
|
|
|
|
|
| 1 |
#### Array modifications <a id="meta.trans.arr">[[meta.trans.arr]]</a>
|
| 2 |
|
| 3 |
+
[*Note 1*: For multidimensional arrays, only the first array dimension
|
| 4 |
+
is removed. For a type “array of `const U`”, the resulting type is
|
| 5 |
+
`const U`. — *end note*]
|
| 6 |
+
|
| 7 |
+
[*Example 1*:
|
| 8 |
+
|
| 9 |
``` cpp
|
| 10 |
// the following assertions hold:
|
| 11 |
+
assert((is_same_v<remove_extent_t<int>, int>));
|
| 12 |
+
assert((is_same_v<remove_extent_t<int[2]>, int>));
|
| 13 |
+
assert((is_same_v<remove_extent_t<int[2][3]>, int[3]>));
|
| 14 |
+
assert((is_same_v<remove_extent_t<int[][3]>, int[3]>));
|
| 15 |
```
|
| 16 |
|
| 17 |
+
— *end example*]
|
| 18 |
+
|
| 19 |
+
[*Example 2*:
|
| 20 |
+
|
| 21 |
``` cpp
|
| 22 |
// the following assertions hold:
|
| 23 |
+
assert((is_same_v<remove_all_extents_t<int>, int>));
|
| 24 |
+
assert((is_same_v<remove_all_extents_t<int[2]>, int>));
|
| 25 |
+
assert((is_same_v<remove_all_extents_t<int[2][3]>, int>));
|
| 26 |
+
assert((is_same_v<remove_all_extents_t<int[][3]>, int>));
|
| 27 |
```
|
| 28 |
|
| 29 |
+
— *end example*]
|
| 30 |
+
|