diff --git a/libcxx/include/__debug b/libcxx/include/__debug --- a/libcxx/include/__debug +++ b/libcxx/include/__debug @@ -54,7 +54,7 @@ __libcpp_debug_info(const char* __f, int __l, const char* __p, const char* __m) : __file_(__f), __line_(__l), __pred_(__p), __msg_(__m) {} - _LIBCPP_FUNC_VIS std::string what() const; + _LIBCPP_FUNC_VIS string what() const; const char* __file_; int __line_; diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -120,7 +120,7 @@ size_t __next_hash_pow2(size_t __n) { - return __n < 2 ? __n : (size_t(1) << (std::numeric_limits::digits - __libcpp_clz(__n-1))); + return __n < 2 ? __n : (size_t(1) << (numeric_limits::digits - __libcpp_clz(__n-1))); } @@ -1036,7 +1036,7 @@ _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { - return std::min( + return _VSTD::min( __node_traits::max_size(__node_alloc()), numeric_limits::max() ); diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base --- a/libcxx/include/__mutex_base +++ b/libcxx/include/__mutex_base @@ -379,12 +379,12 @@ using __ratio = ratio_divide<_Period, nano>; using __ns_rep = nanoseconds::rep; - __ns_rep __result_max = std::numeric_limits<__ns_rep>::max(); + __ns_rep __result_max = numeric_limits<__ns_rep>::max(); if (__d.count() > 0 && __d.count() > __result_max / __ratio::num) { return nanoseconds::max(); } - __ns_rep __result_min = std::numeric_limits<__ns_rep>::min(); + __ns_rep __result_min = numeric_limits<__ns_rep>::min(); if (__d.count() < 0 && __d.count() < __result_min / __ratio::num) { return nanoseconds::min(); } diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -266,7 +266,7 @@ >::type __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last) { - _ConstructTransaction __tx(&this->__end_, std::distance(__first, __last)); + _ConstructTransaction __tx(&this->__end_, _VSTD::distance(__first, __last)); for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, ++__first) { __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_), *__first); diff --git a/libcxx/include/__string b/libcxx/include/__string --- a/libcxx/include/__string +++ b/libcxx/include/__string @@ -92,7 +92,7 @@ _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \ - _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, std::allocator<_CharType> const&)) \ + _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, allocator<_CharType> const&)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::~basic_string()) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \ @@ -108,7 +108,7 @@ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \ - _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, std::allocator<_CharType> const&)) \ + _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \ _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \ @@ -158,7 +158,7 @@ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \ - _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, std::allocator<_CharType> const&)) \ + _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \ _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \ _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \ diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -967,7 +967,7 @@ template #ifndef _LIBCPP_CXX03_LANG - _LIBCPP_DIAGNOSE_WARNING(!std::__invokable<_Compare const&, _Tp const&, _Tp const&>::value, + _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value, "the specified comparator type does not provide a viable const call operator") #endif int __diagnose_non_const_comparator(); @@ -1120,7 +1120,7 @@ _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT - {return std::min( + {return _VSTD::min( __node_traits::max_size(__node_alloc()), numeric_limits::max());} diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -2708,12 +2708,12 @@ template _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX11 -std::pair<_ForwardIterator, _ForwardIterator> +pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value, "std::minmax_element requires a ForwardIterator"); - std::pair<_ForwardIterator, _ForwardIterator> __result(__first, __first); + pair<_ForwardIterator, _ForwardIterator> __result(__first, __first); if (__first != __last) { if (++__first != __last) @@ -2759,7 +2759,7 @@ template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 -std::pair<_ForwardIterator, _ForwardIterator> +pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last) { return _VSTD::minmax_element(__first, __last, @@ -2798,7 +2798,7 @@ typedef typename initializer_list<_Tp>::const_iterator _Iter; _Iter __first = __t.begin(); _Iter __last = __t.end(); - std::pair<_Tp, _Tp> __result(*__first, *__first); + pair<_Tp, _Tp> __result(*__first, *__first); ++__first; if (__t.size() % 2 == 0) @@ -3074,7 +3074,7 @@ if (_Rp == 0) return static_cast(_Eng(__g, _Dt)()); size_t __w = _Dt - __libcpp_clz(_Rp) - 1; - if ((_Rp & (std::numeric_limits<_UIntType>::max() >> (_Dt - __w))) != 0) + if ((_Rp & (numeric_limits<_UIntType>::max() >> (_Dt - __w))) != 0) ++__w; _Eng __e(__g, __w); _UIntType __u; diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -142,8 +142,8 @@ 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 @@ _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 @@ 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; diff --git a/libcxx/include/barrier b/libcxx/include/barrier --- a/libcxx/include/barrier +++ b/libcxx/include/barrier @@ -288,7 +288,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY barrier(ptrdiff_t __count, _CompletionF __completion = _CompletionF()) - : __b(__count, std::move(__completion)) { + : __b(__count, _VSTD::move(__completion)) { } barrier(barrier const&) = delete; @@ -302,7 +302,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void wait(arrival_token&& __phase) const { - __b.wait(std::move(__phase)); + __b.wait(_VSTD::move(__phase)); } _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void arrive_and_wait() diff --git a/libcxx/include/bit b/libcxx/include/bit --- a/libcxx/include/bit +++ b/libcxx/include/bit @@ -343,7 +343,7 @@ unsigned __bit_log2(_Tp __t) _NOEXCEPT { static_assert(__bitop_unsigned_integer<_Tp>::value, "__bit_log2 requires unsigned"); - return std::numeric_limits<_Tp>::digits - 1 - __countl_zero(__t); + return numeric_limits<_Tp>::digits - 1 - __countl_zero(__t); } template diff --git a/libcxx/include/bitset b/libcxx/include/bitset --- a/libcxx/include/bitset +++ b/libcxx/include/bitset @@ -380,7 +380,7 @@ __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const { unsigned long long __r = __first_[0]; - for (std::size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i) + for (size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i) __r |= static_cast(__first_[__i]) << (sizeof(__storage_type) * CHAR_BIT); return __r; } diff --git a/libcxx/include/cmath b/libcxx/include/cmath --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -660,8 +660,8 @@ template _LIBCPP_INLINE_VISIBILITY _IntT __clamp_to_integral(_RealT __r) _NOEXCEPT { - using _Lim = std::numeric_limits<_IntT>; - const _IntT _MaxVal = std::__max_representable_int_for_float<_IntT, _RealT>(); + using _Lim = numeric_limits<_IntT>; + const _IntT _MaxVal = __max_representable_int_for_float<_IntT, _RealT>(); if (__r >= ::nextafter(static_cast<_RealT>(_MaxVal), INFINITY)) { return _Lim::max(); } else if (__r <= _Lim::lowest()) { diff --git a/libcxx/include/compare b/libcxx/include/compare --- a/libcxx/include/compare +++ b/libcxx/include/compare @@ -701,8 +701,8 @@ template constexpr _ClassifyCompCategory -__compute_comp_type(std::array<_ClassifyCompCategory, _Size> __types) { - std::array __seen = {}; +__compute_comp_type(array<_ClassifyCompCategory, _Size> __types) { + array __seen = {}; for (auto __type : __types) ++__seen[__type]; if (__seen[_None]) diff --git a/libcxx/include/complex b/libcxx/include/complex --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -950,7 +950,7 @@ complex<_Tp> proj(const complex<_Tp>& __c) { - std::complex<_Tp> __r = __c; + complex<_Tp> __r = __c; if (__libcpp_isinf_or_builtin(__c.real()) || __libcpp_isinf_or_builtin(__c.imag())) __r = complex<_Tp>(INFINITY, copysign(_Tp(0), __c.imag())); return __r; diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -1393,7 +1393,7 @@ size_type size() const _NOEXCEPT {return __base::size();} _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT - {return std::min( + {return _VSTD::min( __alloc_traits::max_size(__base::__alloc()), numeric_limits::max());} void resize(size_type __n); @@ -1586,7 +1586,7 @@ #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES template::value_type>, + class _Alloc = allocator::value_type>, class = typename enable_if<__is_allocator<_Alloc>::value, void>::type > deque(_InputIterator, _InputIterator) diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -994,8 +994,8 @@ _LIBCPP_INLINE_VISIBILITY operator string_type() const { return __pn_; } - _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; } - _LIBCPP_INLINE_VISIBILITY std::string u8string() const { return __pn_; } + _LIBCPP_INLINE_VISIBILITY _VSTD::string string() const { return __pn_; } + _LIBCPP_INLINE_VISIBILITY _VSTD::string u8string() const { return __pn_; } #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) template , @@ -1010,20 +1010,20 @@ return __s; } - _LIBCPP_INLINE_VISIBILITY std::wstring wstring() const { + _LIBCPP_INLINE_VISIBILITY _VSTD::wstring wstring() const { return string(); } - _LIBCPP_INLINE_VISIBILITY std::u16string u16string() const { + _LIBCPP_INLINE_VISIBILITY _VSTD::u16string u16string() const { return string(); } - _LIBCPP_INLINE_VISIBILITY std::u32string u32string() const { + _LIBCPP_INLINE_VISIBILITY _VSTD::u32string u32string() const { return string(); } #endif // generic format observers - std::string generic_string() const { return __pn_; } - std::string generic_u8string() const { return __pn_; } + _VSTD::string generic_string() const { return __pn_; } + _VSTD::string generic_u8string() const { return __pn_; } #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) template , @@ -1033,9 +1033,9 @@ return string<_ECharT, _Traits, _Allocator>(__a); } - std::wstring generic_wstring() const { return string(); } - std::u16string generic_u16string() const { return string(); } - std::u32string generic_u32string() const { return string(); } + _VSTD::wstring generic_wstring() const { return string(); } + _VSTD::u16string generic_u16string() const { return string(); } + _VSTD::u32string generic_u32string() const { return string(); } #endif private: @@ -1147,7 +1147,7 @@ is_same<_Traits, char_traits >::value, basic_ostream<_CharT, _Traits>&>::type operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) { - __os << std::__quoted(__p.native()); + __os << _VSTD::__quoted(__p.native()); return __os; } @@ -1157,7 +1157,7 @@ !is_same<_Traits, char_traits >::value, basic_ostream<_CharT, _Traits>&>::type operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) { - __os << std::__quoted(__p.string<_CharT, _Traits>()); + __os << _VSTD::__quoted(__p.string<_CharT, _Traits>()); return __os; } @@ -1249,7 +1249,7 @@ typedef bidirectional_iterator_tag iterator_category; typedef path value_type; - typedef std::ptrdiff_t difference_type; + typedef ptrdiff_t difference_type; typedef const path* pointer; typedef const path& reference; @@ -1393,7 +1393,7 @@ _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY #ifndef _LIBCPP_NO_EXCEPTIONS void __throw_filesystem_error(_Args&&... __args) { - throw filesystem_error(std::forward<_Args>(__args)...); + throw filesystem_error(_VSTD::forward<_Args>(__args)...); } #else void __throw_filesystem_error(_Args&&...) { @@ -2223,7 +2223,7 @@ _LIBCPP_INLINE_VISIBILITY void __assign_iter_entry(_Path&& __p, __cached_data __dt) { - __p_ = std::move(__p); + __p_ = _VSTD::move(__p); __data_ = __dt; } @@ -2524,10 +2524,10 @@ class recursive_directory_iterator { public: using value_type = directory_entry; - using difference_type = std::ptrdiff_t; + using difference_type = ptrdiff_t; using pointer = directory_entry const*; using reference = directory_entry const&; - using iterator_category = std::input_iterator_tag; + using iterator_category = input_iterator_tag; public: // constructors and destructor diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -758,7 +758,7 @@ {return base::__before_begin()->__next_ == nullptr;} _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { - return std::min( + return _VSTD::min( __node_traits::max_size(base::__alloc()), numeric_limits::max()); } @@ -871,7 +871,7 @@ #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES template::value_type>, + class _Alloc = allocator::value_type>, class = typename enable_if<__is_allocator<_Alloc>::value, void>::type > forward_list(_InputIterator, _InputIterator) diff --git a/libcxx/include/functional b/libcxx/include/functional --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -1592,7 +1592,7 @@ const _Target& __target() const { return __f_; } _LIBCPP_INLINE_VISIBILITY - explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {} + explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {} _LIBCPP_INLINE_VISIBILITY explicit __default_alloc_func(const _Target& __f) : __f_(__f) {} @@ -1799,7 +1799,7 @@ template ::type, __value_func>::value>::type> _LIBCPP_INLINE_VISIBILITY explicit __value_func(_Fp&& __f) - : __value_func(std::forward<_Fp>(__f), allocator<_Fp>()) {} + : __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {} _LIBCPP_INLINE_VISIBILITY __value_func(const __value_func& __f) @@ -2517,7 +2517,7 @@ function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT { - __f_ = std::move(__f.__f_); + __f_ = _VSTD::move(__f.__f_); return *this; } diff --git a/libcxx/include/future b/libcxx/include/future --- a/libcxx/include/future +++ b/libcxx/include/future @@ -1055,7 +1055,7 @@ _LIBCPP_INLINE_VISIBILITY future& operator=(future&& __rhs) _NOEXCEPT { - future(std::move(__rhs)).swap(*this); + future(_VSTD::move(__rhs)).swap(*this); return *this; } @@ -1142,7 +1142,7 @@ _LIBCPP_INLINE_VISIBILITY future& operator=(future&& __rhs) _NOEXCEPT { - future(std::move(__rhs)).swap(*this); + future(_VSTD::move(__rhs)).swap(*this); return *this; } @@ -1224,7 +1224,7 @@ _LIBCPP_INLINE_VISIBILITY future& operator=(future&& __rhs) _NOEXCEPT { - future(std::move(__rhs)).swap(*this); + future(_VSTD::move(__rhs)).swap(*this); return *this; } @@ -1291,7 +1291,7 @@ _LIBCPP_INLINE_VISIBILITY promise& operator=(promise&& __rhs) _NOEXCEPT { - promise(std::move(__rhs)).swap(*this); + promise(_VSTD::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; @@ -1436,7 +1436,7 @@ _LIBCPP_INLINE_VISIBILITY promise& operator=(promise&& __rhs) _NOEXCEPT { - promise(std::move(__rhs)).swap(*this); + promise(_VSTD::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; @@ -1562,7 +1562,7 @@ _LIBCPP_INLINE_VISIBILITY promise& operator=(promise&& __rhs) _NOEXCEPT { - promise(std::move(__rhs)).swap(*this); + promise(_VSTD::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; @@ -2252,7 +2252,7 @@ _LIBCPP_INLINE_VISIBILITY shared_future& operator=(shared_future&& __rhs) _NOEXCEPT { - shared_future(std::move(__rhs)).swap(*this); + shared_future(_VSTD::move(__rhs)).swap(*this); return *this; } @@ -2322,7 +2322,7 @@ _LIBCPP_INLINE_VISIBILITY shared_future& operator=(shared_future&& __rhs) _NOEXCEPT { - shared_future(std::move(__rhs)).swap(*this); + shared_future(_VSTD::move(__rhs)).swap(*this); return *this; } @@ -2392,7 +2392,7 @@ _LIBCPP_INLINE_VISIBILITY shared_future& operator=(shared_future&& __rhs) _NOEXCEPT { - shared_future(std::move(__rhs)).swap(*this); + shared_future(_VSTD::move(__rhs)).swap(*this); return *this; } diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip --- a/libcxx/include/iomanip +++ b/libcxx/include/iomanip @@ -514,7 +514,7 @@ } template -std::basic_ostream<_CharT, _Traits> & +basic_ostream<_CharT, _Traits> & __quoted_output ( basic_ostream<_CharT, _Traits> &__os, _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape ) { diff --git a/libcxx/include/iterator b/libcxx/include/iterator --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -495,12 +495,11 @@ private: struct __two {char __lx; char __lxx;}; template static __two __test(...); - template static char __test(typename std::__void_t::type* = 0, - typename std::__void_t::type* = 0, - typename std::__void_t::type* = 0, - typename std::__void_t::type* = 0, - typename std::__void_t::type* = 0 - ); + template static char __test(typename __void_t::type* = 0, + typename __void_t::type* = 0, + typename __void_t::type* = 0, + typename __void_t::type* = 0, + typename __void_t::type* = 0); public: static const bool value = sizeof(__test<_Tp>(0,0,0,0,0)) == 1; }; diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -735,7 +735,7 @@ #ifndef _LIBCPP_CXX03_LANG template inline __list_imp<_Tp, _Alloc>::__list_imp(__node_allocator&& __a) _NOEXCEPT - : __size_alloc_(0, std::move(__a)) {} + : __size_alloc_(0, _VSTD::move(__a)) {} #endif template @@ -799,9 +799,9 @@ __libcpp_db* __db = __get_db(); __c_node* __cn1 = __db->__find_c_and_lock(this); __c_node* __cn2 = __db->__find_c(&__c); - std::swap(__cn1->beg_, __cn2->beg_); - std::swap(__cn1->end_, __cn2->end_); - std::swap(__cn1->cap_, __cn2->cap_); + _VSTD::swap(__cn1->beg_, __cn2->beg_); + _VSTD::swap(__cn1->end_, __cn2->end_); + _VSTD::swap(__cn1->cap_, __cn2->cap_); for (__i_node** __p = __cn1->end_; __p != __cn1->beg_;) { --__p; @@ -937,7 +937,7 @@ _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { - return std::min( + return _VSTD::min( base::__node_alloc_max_size(), numeric_limits::max()); } @@ -1144,7 +1144,7 @@ #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES template::value_type>, + class _Alloc = allocator::value_type>, class = typename enable_if<__is_allocator<_Alloc>::value, void>::type > list(_InputIterator, _InputIterator) diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -1027,7 +1027,7 @@ template <> struct __to_address_helper { template - using __return_type = decltype(pointer_traits<_Pointer>::to_address(std::declval())); + using __return_type = decltype(pointer_traits<_Pointer>::to_address(_VSTD::declval())); template _LIBCPP_CONSTEXPR @@ -1062,7 +1062,7 @@ template _LIBCPP_CONSTEXPR static __return_type<_Pointer> - __do_it(const _Pointer &__p) _NOEXCEPT { return std::__to_address(__p.operator->()); } + __do_it(const _Pointer &__p) _NOEXCEPT { return _VSTD::__to_address(__p.operator->()); } }; @@ -1332,7 +1332,7 @@ template struct __has_destroy<_Alloc, _Pointer, typename __void_t< decltype(_VSTD::declval<_Alloc>().destroy(_VSTD::declval<_Pointer>())) ->::type> : std::true_type {}; +>::type> : true_type {}; template struct __has_max_size @@ -1373,9 +1373,9 @@ > struct __is_cpp17_move_insertable; template -struct __is_cpp17_move_insertable<_Alloc, true> : std::true_type {}; +struct __is_cpp17_move_insertable<_Alloc, true> : true_type {}; template -struct __is_cpp17_move_insertable<_Alloc, false> : std::is_move_constructible {}; +struct __is_cpp17_move_insertable<_Alloc, false> : is_move_constructible {}; template ::value && !__is_default_allocator<_Alloc>::value @@ -1385,7 +1385,7 @@ struct __is_cpp17_copy_insertable<_Alloc, true> : __is_cpp17_move_insertable<_Alloc> {}; template struct __is_cpp17_copy_insertable<_Alloc, false> : integral_constant::value && + is_copy_constructible::value && __is_cpp17_move_insertable<_Alloc>::value> {}; @@ -1842,8 +1842,8 @@ #if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp))) { - std::align_val_t __al = - std::align_val_t(std::alignment_of<_Tp>::value); + align_val_t __al = + align_val_t(alignment_of<_Tp>::value); __r.first = static_cast<_Tp*>(::operator new( __n * sizeof(_Tp), __al, nothrow)); } else { @@ -2045,7 +2045,7 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __compressed_pair(_U1&& __t1, _U2&& __t2) - : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {} + : _Base1(_VSTD::forward<_U1>(__t1)), _Base2(_VSTD::forward<_U2>(__t2)) {} #ifndef _LIBCPP_CXX03_LANG template @@ -2083,7 +2083,7 @@ _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) { - using std::swap; + using _VSTD::swap; swap(first(), __x.first()); swap(second(), __x.second()); } @@ -3081,7 +3081,7 @@ try { #endif for (; __first != __last; (void)++__idx, ++__first) - ::new((void*)_VSTD::addressof(*__idx)) _Vt(std::move(*__first)); + ::new((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first)); return __idx; #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { @@ -3101,7 +3101,7 @@ try { #endif for (; __n > 0; ++__idx, (void)++__first, --__n) - ::new((void*)_VSTD::addressof(*__idx)) _Vt(std::move(*__first)); + ::new((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first)); return {__first, __idx}; #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { @@ -4972,7 +4972,7 @@ : __size_(__size), __align_(__align) {} void operator()(void* p) const _NOEXCEPT { - std::__libcpp_deallocate(p, __size_, __align_); + _VSTD::__libcpp_deallocate(p, __size_, __align_); } private: @@ -4983,13 +4983,13 @@ typedef unique_ptr __holder_t; static __holder_t __allocate_bytes(size_t __s, size_t __align) { - return __holder_t(std::__libcpp_allocate(__s, __align), + return __holder_t(_VSTD::__libcpp_allocate(__s, __align), __builtin_new_deleter(__s, __align)); } static void __deallocate_bytes(void* __p, size_t __s, size_t __align) _NOEXCEPT { - std::__libcpp_deallocate(__p, __s, __align); + _VSTD::__libcpp_deallocate(__p, __s, __align); } template diff --git a/libcxx/include/numbers b/libcxx/include/numbers --- a/libcxx/include/numbers +++ b/libcxx/include/numbers @@ -100,7 +100,7 @@ template inline constexpr T phi_v = __illformed{}; template -concept __floating_point = std::is_floating_point_v; +concept __floating_point = is_floating_point_v; template <__floating_point T> inline constexpr T e_v = 2.718281828459045235360287471352662; template <__floating_point T> inline constexpr T log2e_v = 1.442695040888963407359924681001892; diff --git a/libcxx/include/numeric b/libcxx/include/numeric --- a/libcxx/include/numeric +++ b/libcxx/include/numeric @@ -377,7 +377,7 @@ _OutputIterator __result, _BinaryOp __b) { if (__first != __last) { - typename std::iterator_traits<_InputIterator>::value_type __init = *__first; + typename iterator_traits<_InputIterator>::value_type __init = *__first; *__result++ = __init; if (++__first != __last) return _VSTD::inclusive_scan(__first, __last, __result, __b, __init); @@ -391,7 +391,7 @@ _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { - return _VSTD::inclusive_scan(__first, __last, __result, std::plus<>()); + return _VSTD::inclusive_scan(__first, __last, __result, _VSTD::plus<>()); } template ::value_type __init = __u(*__first); + typename iterator_traits<_InputIterator>::value_type __init = __u(*__first); *__result++ = __init; if (++__first != __last) return _VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init); @@ -576,8 +576,8 @@ midpoint(_Tp __a, _Tp __b) noexcept _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK { - using _Up = std::make_unsigned_t<_Tp>; - constexpr _Up __bitshift = std::numeric_limits<_Up>::digits - 1; + using _Up = make_unsigned_t<_Tp>; + constexpr _Up __bitshift = numeric_limits<_Up>::digits - 1; _Up __diff = _Up(__b) - _Up(__a); _Up __sign_bit = __b < __a; diff --git a/libcxx/include/random b/libcxx/include/random --- a/libcxx/include/random +++ b/libcxx/include/random @@ -4660,7 +4660,7 @@ { __s_ = _VSTD::sqrt(__mean_); __d_ = 6 * __mean_ * __mean_; - __l_ = std::trunc(__mean_ - 1.1484); + __l_ = _VSTD::trunc(__mean_ - 1.1484); __omega_ = .3989423 / __s_; double __b1_ = .4166667E-1 / __mean_; double __b2_ = .3 * __b1_ * __b1_; @@ -4692,13 +4692,13 @@ double __u; if (__g > 0) { - __tx = std::trunc(__g); + __tx = _VSTD::trunc(__g); if (__tx >= __pr.__l_) - return std::__clamp_to_integral(__tx); + return _VSTD::__clamp_to_integral(__tx); __difmuk = __pr.__mean_ - __tx; __u = __urd(__urng); if (__pr.__d_ * __u >= __difmuk * __difmuk * __difmuk) - return std::__clamp_to_integral(__tx); + return _VSTD::__clamp_to_integral(__tx); } exponential_distribution __edist; for (bool __using_exp_dist = false; true; __using_exp_dist = true) @@ -4714,7 +4714,7 @@ __u += __u - 1; __t = 1.8 + (__u < 0 ? -__e : __e); } while (__t <= -.6744); - __tx = std::trunc(__pr.__mean_ + __pr.__s_ * __t); + __tx = _VSTD::trunc(__pr.__mean_ + __pr.__s_ * __t); __difmuk = __pr.__mean_ - __tx; __using_exp_dist = true; } @@ -4758,7 +4758,7 @@ } } } - return std::__clamp_to_integral(__tx); + return _VSTD::__clamp_to_integral(__tx); } template diff --git a/libcxx/include/regex b/libcxx/include/regex --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -2475,7 +2475,7 @@ { const bool __in_neg_mask = __traits_.isctype(__ch, __neg_mask_); const bool __in_neg_chars = - std::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) != + _VSTD::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) != __neg_chars_.end(); if (!(__in_neg_mask || __in_neg_chars)) { @@ -4153,7 +4153,7 @@ __first != __last && ( __val = __traits_.value(*__first, 10)) != -1; ++__first) { - if (__c >= std::numeric_limits::max() / 10) + if (__c >= numeric_limits::max() / 10) __throw_regex_error(); __c *= 10; __c += __val; @@ -4417,7 +4417,7 @@ for (++__first; __first != __last && '0' <= *__first && *__first <= '9'; ++__first) { - if (__v >= std::numeric_limits::max() / 10) + if (__v >= numeric_limits::max() / 10) __throw_regex_error(); __v = 10 * __v + *__first - '0'; } @@ -5590,7 +5590,7 @@ '0' <= __fmt_first[1] && __fmt_first[1] <= '9') { ++__fmt_first; - if (__idx >= std::numeric_limits::max() / 10) + if (__idx >= numeric_limits::max() / 10) __throw_regex_error(); __idx = 10 * __idx + *__fmt_first - '0'; } @@ -6401,7 +6401,7 @@ regex_constants::match_flag_type __m = regex_constants::match_default); #if _LIBCPP_STD_VER > 11 - template + template regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, const regex_type&& __re, diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -236,7 +236,7 @@ _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY basic_string_view(const _CharT* __s) - : __data(__s), __size(std::__char_traits_length_checked<_Traits>(__s)) {} + : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {} // [string.view.iterators], iterators _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -514,7 +514,7 @@ false_type __sfinae_test_impl(...); template