23 Containers library [containers]

23.3 Sequence containers [sequences]

23.3.3 Class template array [array]

23.3.3.6 Array creation functions [array.creation]

template<class T, size_t N> constexpr array<remove_cv_t<T>, N> to_array(T (&a)[N]);
Mandates: is_array_v<T> is false and is_constructible_v<remove_cv_t<T>, T&> is true.
Preconditions: T meets the Cpp17CopyConstructible requirements.
Returns: {{ a[0], , a[N - 1] }}.
template<class T, size_t N> constexpr array<remove_cv_t<T>, N> to_array(T (&&a)[N]);
Mandates: is_array_v<T> is false and is_constructible_v<remove_cv_t<T>, T> is true.
Preconditions: T meets the Cpp17MoveConstructible requirements.
Returns: {{ std​::​move(a[0]), , std​::​move(a[N - 1]) }}.