23 Containers library [containers]

23.3 Sequence containers [sequences]

23.3.7 Class template array [array]

23.3.7.7 array::swap [array.swap]

void swap(array& y) noexcept(is_nothrow_swappable_v<T>);

Effects: As if by swap_ranges(begin(), end(), y.begin()).

Throws: Nothing unless one of the element-wise swap calls throws an exception.

Note: Unlike the swap function for other containers, array::swap takes linear time, may exit via an exception, and does not cause iterators to become associated with the other container.