Revert "Update aosp/master libcxx rebase to r263688"
The world is burning.
This reverts commit c004fd909c006eec55077c52ee119e1fa338c9e9, reversing
changes made to 1418e4163da4bb0b9e3fe496e51c23a0dce399d9.
diff --git a/include/array b/include/array
index 719286d..2e02a43 100644
--- a/include/array
+++ b/include/array
@@ -34,7 +34,7 @@
// No explicit construct/copy/destroy for aggregate type
void fill(const T& u);
- void swap(array& a) noexcept(is_nothrow_swappable_v<T>);
+ void swap(array& a) noexcept(noexcept(swap(declval<T&>(), declval<T&>())));
// iterators:
iterator begin() noexcept;
@@ -89,13 +89,12 @@
void swap(array<T,N>& x, array<T,N>& y) noexcept(noexcept(x.swap(y)));
template <class T> class tuple_size;
-template <size_t I, class T> class tuple_element;
+template <int I, class T> class tuple_element;
template <class T, size_t N> struct tuple_size<array<T, N>>;
-template <size_t I, class T, size_t N> struct tuple_element<I, array<T, N>>;
-template <size_t I, class T, size_t N> T& get(array<T, N>&) noexcept; // constexpr in C++14
-template <size_t I, class T, size_t N> const T& get(const array<T, N>&) noexcept; // constexpr in C++14
-template <size_t I, class T, size_t N> T&& get(array<T, N>&&) noexcept; // constexpr in C++14
-template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexcept; // constexpr in C++14
+template <int I, class T, size_t N> struct tuple_element<I, array<T, N>>;
+template <int I, class T, size_t N> T& get(array<T, N>&) noexcept; // constexpr in C++14
+template <int I, class T, size_t N> const T& get(const array<T, N>&) noexcept; // constexpr in C++14
+template <int I, class T, size_t N> T&& get(array<T, N>&&) noexcept; // constexpr in C++14
} // std
@@ -141,15 +140,8 @@
_LIBCPP_INLINE_VISIBILITY void fill(const value_type& __u)
{_VSTD::fill_n(__elems_, _Size, __u);}
_LIBCPP_INLINE_VISIBILITY
- void swap(array& __a) _NOEXCEPT_(_Size == 0 || __is_nothrow_swappable<_Tp>::value)
- { __swap_dispatch((std::integral_constant<bool, _Size == 0>()), __a); }
-
- _LIBCPP_INLINE_VISIBILITY
- void __swap_dispatch(std::true_type, array&) {}
-
- _LIBCPP_INLINE_VISIBILITY
- void __swap_dispatch(std::false_type, array& __a)
- { _VSTD::swap_ranges(__elems_, __elems_ + _Size, __a.__elems_);}
+ void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
+ {_VSTD::swap_ranges(__elems_, __elems_ + _Size, __a.__elems_);}
// iterators:
_LIBCPP_INLINE_VISIBILITY
@@ -283,12 +275,11 @@
inline _LIBCPP_INLINE_VISIBILITY
typename enable_if
<
- _Size == 0 ||
__is_swappable<_Tp>::value,
void
>::type
-swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
- _NOEXCEPT_(noexcept(__x.swap(__y)))
+swap(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
+ _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
{
__x.swap(__y);
}
@@ -333,15 +324,6 @@
return _VSTD::move(__a.__elems_[_Ip]);
}
-template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-const _Tp&&
-get(const array<_Tp, _Size>&& __a) _NOEXCEPT
-{
- static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array &&)");
- return _VSTD::move(__a.__elems_[_Ip]);
-}
-
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_END_NAMESPACE_STD