[array.special]

# 23 Containers library [[containers]](./#containers)

## 23.3 Sequence containers [[sequences]](sequences#array.special)

### 23.3.3 Class template array [[array]](array#special)

#### 23.3.3.4 Specialized algorithms [array.special]

[ð](#lib:array,swap)

`template<class T, size_t N>
  constexpr void swap(array<T, N>& x, array<T, N>& y) noexcept(noexcept(x.swap(y)));
`

[1](#1)

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

*Constraints*: N == 0 or is_swappable_v<T> is true[.](#1.sentence-1)

[2](#2)

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

*Effects*: As if by x.swap(y)[.](#2.sentence-1)

[3](#3)

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

*Complexity*: Linear in N[.](#3.sentence-1)
