From b60736ec1405bb0a8dd40989f67ef4c93da068ab Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 16 Feb 2021 21:13:02 +0100 Subject: Vendor import of llvm-project main 8e464dd76bef, the last commit before the upstream release/12.x branch was created. --- libcxx/include/array | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'libcxx/include/array') diff --git a/libcxx/include/array b/libcxx/include/array index e73bbe7fea5f..9a479f7cd1f7 100644 --- a/libcxx/include/array +++ b/libcxx/include/array @@ -142,8 +142,8 @@ struct _LIBCPP_TEMPLATE_VIS array typedef const value_type* const_pointer; typedef size_t size_type; typedef ptrdiff_t difference_type; - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; + typedef _VSTD::reverse_iterator reverse_iterator; + typedef _VSTD::reverse_iterator const_reverse_iterator; _Tp __elems_[_Size]; @@ -155,7 +155,7 @@ struct _LIBCPP_TEMPLATE_VIS array _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) { - std::swap_ranges(data(), data() + _Size, __a.data()); + _VSTD::swap_ranges(data(), data() + _Size, __a.data()); } // iterators: @@ -245,8 +245,8 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> typedef const value_type* const_pointer; typedef size_t size_type; typedef ptrdiff_t difference_type; - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; + typedef _VSTD::reverse_iterator reverse_iterator; + typedef _VSTD::reverse_iterator const_reverse_iterator; typedef typename conditional::value, const char, char>::type _CharType; @@ -459,8 +459,6 @@ get(const array<_Tp, _Size>& __a) _NOEXCEPT return __a.__elems_[_Ip]; } -#ifndef _LIBCPP_CXX03_LANG - template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _Tp&& @@ -479,8 +477,6 @@ get(const array<_Tp, _Size>&& __a) _NOEXCEPT return _VSTD::move(__a.__elems_[_Ip]); } -#endif // !_LIBCPP_CXX03_LANG - #if _LIBCPP_STD_VER > 17 template @@ -504,7 +500,7 @@ to_array(_Tp (&__arr)[_Size]) noexcept(is_nothrow_constructible_v<_Tp, _Tp&>) { static_assert( is_constructible_v<_Tp, _Tp&>, "[array.creation]/1: to_array requires copy constructible elements."); - return __to_array_lvalue_impl(__arr, make_index_sequence<_Size>()); + return _VSTD::__to_array_lvalue_impl(__arr, make_index_sequence<_Size>()); } template @@ -516,8 +512,8 @@ to_array(_Tp(&&__arr)[_Size]) noexcept(is_nothrow_move_constructible_v<_Tp>) { static_assert( is_move_constructible_v<_Tp>, "[array.creation]/4: to_array requires move constructible elements."); - return __to_array_rvalue_impl(_VSTD::move(__arr), - make_index_sequence<_Size>()); + return _VSTD::__to_array_rvalue_impl(_VSTD::move(__arr), + make_index_sequence<_Size>()); } #endif // _LIBCPP_STD_VER > 17 -- cgit v1.3