[meta.trans.arr]

# 21 Metaprogramming library [[meta]](./#meta)

## 21.3 Metaprogramming and type traits [[type.traits]](type.traits#meta.trans.arr)

### 21.3.9 Transformations between types [[meta.trans]](meta.trans#arr)

#### 21.3.9.5 Array modifications [meta.trans.arr]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/meta.tex#L2149)

The templates specified in Table [60](#tab:meta.trans.arr "Table 60: Array modifications") modify array types[.](#1.sentence-1)

Table [60](#tab:meta.trans.arr) — Array modifications [[tab:meta.trans.arr]](./tab:meta.trans.arr)  

| [ð](#tab:meta.trans.arr-row-1)<br>**Template** | **Comments** |
| --- | --- |
| [ð](#tab:meta.trans.arr-row-2)<br>template<class T>   struct remove_extent; | If T is a type âarray of Uâ,  the member typedef type denotes U,  otherwise T[.](#tab:meta.trans.arr-row-2-column-2-sentence-1)<br>[*Note [1](#tab:meta.trans.arr-row-2-column-2-note-1)*:<br>For multidimensional arrays, only the first array dimension is  removed[.](#tab:meta.trans.arr-row-2-column-2-sentence-2)<br>For a type âarray of const Uâ, the resulting type is  const U[.](#tab:meta.trans.arr-row-2-column-2-sentence-3) â *end note*] |
| [ð](#tab:meta.trans.arr-row-3)<br>template<class T>   struct remove_all_extents; | If T is âmultidimensional array of Uâ, the resulting member  typedef type denotes U, otherwise T[.](#tab:meta.trans.arr-row-3-column-2-sentence-1) |

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/meta.tex#L2182)

[*Example [1](#example-1)*: // the following assertions hold:static_assert(is_same_v<remove_extent_t<int>, int>);static_assert(is_same_v<remove_extent_t<int[2]>, int>);static_assert(is_same_v<remove_extent_t<int[2][3]>, int[3]>);static_assert(is_same_v<remove_extent_t<int[][3]>, int[3]>); â *end example*]

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/meta.tex#L2193)

[*Example [2](#example-2)*: // the following assertions hold:static_assert(is_same_v<remove_all_extents_t<int>, int>);static_assert(is_same_v<remove_all_extents_t<int[2]>, int>);static_assert(is_same_v<remove_all_extents_t<int[2][3]>, int>);static_assert(is_same_v<remove_all_extents_t<int[][3]>, int>); â *end example*]
