From Jason Turner

[meta.trans.arr]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpx61i5re1/{from.md → to.md} +20 -8
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((is_same<remove_extent_t<int>, int>::value));
6
- assert((is_same<remove_extent_t<int[2]>, int>::value));
7
- assert((is_same<remove_extent_t<int[2][3]>, int[3]>::value));
8
- assert((is_same<remove_extent_t<int[][3]>, int[3]>::value));
9
  ```
10
 
 
 
 
 
11
  ``` cpp
12
  // the following assertions hold:
13
- assert((is_same<remove_all_extents_t<int>, int>::value));
14
- assert((is_same<remove_all_extents_t<int[2]>, int>::value));
15
- assert((is_same<remove_all_extents_t<int[2][3]>, int>::value));
16
- assert((is_same<remove_all_extents_t<int[][3]>, int>::value));
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
+