Lines Matching refs:array
2 //===---------------------------- array -----------------------------------===//
14 array synopsis
19 struct array
36 void swap(array& a) noexcept(is_nothrow_swappable_v<T>); // constexpr in C++20
75 array(T, U...) -> array<T, 1 + sizeof...(U)>; // C++17
78 bool operator==(const array<T,N>& x, const array<T,N>& y); // constexpr in C++20
80 bool operator!=(const array<T,N>& x, const array<T,N>& y); // constexpr in C++20
82 bool operator<(const array<T,N>& x, const array<T,N>& y); // constexpr in C++20
84 bool operator>(const array<T,N>& x, const array<T,N>& y); // constexpr in C++20
86 bool operator<=(const array<T,N>& x, const array<T,N>& y); // constexpr in C++20
88 bool operator>=(const array<T,N>& x, const array<T,N>& y); // constexpr in C++20
91 void swap(array<T,N>& x, array<T,N>& y) noexcept(noexcept(x.swap(y))); // constexpr in C++20
94 constexpr array<remove_cv_t<T>, N> to_array(T (&a)[N]); // C++20
96 constexpr array<remove_cv_t<T>, N> to_array(T (&&a)[N]); // C++20
100 template <class T, size_t N> struct tuple_size<array<T, N>>;
101 template <size_t I, class T, size_t N> struct tuple_element<I, array<T, N>>;
102 template <size_t I, class T, size_t N> T& get(array<T, N>&) noexcept; // constexpr in…
103 template <size_t I, class T, size_t N> const T& get(const array<T, N>&) noexcept; // constexpr in…
104 template <size_t I, class T, size_t N> T&& get(array<T, N>&&) noexcept; // constexpr in…
105 template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexcept; // constexpr in…
129 struct _LIBCPP_TEMPLATE_VIS array
132 typedef array __self;
154 void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) {
197 _LIBCPP_ASSERT(__n < _Size, "out-of-bounds access in std::array<T, N>");
202 _LIBCPP_ASSERT(__n < _Size, "out-of-bounds access in std::array<T, N>");
209 __throw_out_of_range("array::at");
216 __throw_out_of_range("array::at");
232 struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
235 typedef array __self;
263 "cannot fill zero-sized array of type 'const T'");
267 void swap(array&) _NOEXCEPT {
269 "cannot swap zero-sized array of type 'const T'");
311 _LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
317 _LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
323 __throw_out_of_range("array<T, 0>::at");
329 __throw_out_of_range("array<T, 0>::at");
335 _LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
341 _LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
347 _LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
353 _LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
363 array(_Tp, _Args...)
364 -> array<_Tp, 1 + sizeof...(_Args)>;
370 operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
378 operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
386 operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
395 operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
403 operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
411 operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
424 swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
431 struct _LIBCPP_TEMPLATE_VIS tuple_size<array<_Tp, _Size> >
435 struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
437 static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::array)");
444 get(array<_Tp, _Size>& __a) _NOEXCEPT
446 static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array)");
453 get(const array<_Tp, _Size>& __a) _NOEXCEPT
455 static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array)");
462 get(array<_Tp, _Size>&& __a) _NOEXCEPT
464 static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array &&)");
471 get(const array<_Tp, _Size>&& __a) _NOEXCEPT
473 static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array &&)");
480 _LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
486 _LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
492 _LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
496 "[array.creation]/1: to_array does not accept multidimensional arrays.");
499 "[array.creation]/1: to_array requires copy constructible elements.");
504 _LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
508 "[array.creation]/4: to_array does not accept multidimensional arrays.");
511 "[array.creation]/4: to_array requires move constructible elements.");