diff --git a/libcxx/include/__algorithm/adjacent_find.h b/libcxx/include/__algorithm/adjacent_find.h --- a/libcxx/include/__algorithm/adjacent_find.h +++ b/libcxx/include/__algorithm/adjacent_find.h @@ -38,7 +38,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator adjacent_find(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type __v; - return _VSTD::adjacent_find(__first, __last, __equal_to<__v>()); + return std::adjacent_find(__first, __last, __equal_to<__v>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/binary_search.h b/libcxx/include/__algorithm/binary_search.h --- a/libcxx/include/__algorithm/binary_search.h +++ b/libcxx/include/__algorithm/binary_search.h @@ -26,7 +26,7 @@ bool __binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { - __first = _VSTD::__lower_bound<_Compare>(__first, __last, __value_, __comp); + __first = std::__lower_bound<_Compare>(__first, __last, __value_, __comp); return __first != __last && !__comp(__value_, *__first); } @@ -37,7 +37,7 @@ binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__binary_search<_Comp_ref>(__first, __last, __value_, __comp); + return std::__binary_search<_Comp_ref>(__first, __last, __value_, __comp); } template @@ -46,7 +46,7 @@ bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) { - return _VSTD::binary_search(__first, __last, __value_, + return std::binary_search(__first, __last, __value_, __less::value_type, _Tp>()); } diff --git a/libcxx/include/__algorithm/clamp.h b/libcxx/include/__algorithm/clamp.h --- a/libcxx/include/__algorithm/clamp.h +++ b/libcxx/include/__algorithm/clamp.h @@ -37,7 +37,7 @@ const _Tp& clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi) { - return _VSTD::clamp(__v, __lo, __hi, __less<_Tp>()); + return std::clamp(__v, __lo, __hi, __less<_Tp>()); } #endif diff --git a/libcxx/include/__algorithm/comp.h b/libcxx/include/__algorithm/comp.h --- a/libcxx/include/__algorithm/comp.h +++ b/libcxx/include/__algorithm/comp.h @@ -17,7 +17,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -// I'd like to replace these with _VSTD::equal_to, but can't because: +// I'd like to replace these with std::equal_to, but can't because: // * That only works with C++14 and later, and // * We haven't included here. template diff --git a/libcxx/include/__algorithm/copy.h b/libcxx/include/__algorithm/copy.h --- a/libcxx/include/__algorithm/copy.h +++ b/libcxx/include/__algorithm/copy.h @@ -38,7 +38,7 @@ _OutputIterator __copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { - return _VSTD::__copy_constexpr(__first, __last, __result); + return std::__copy_constexpr(__first, __last, __result); } template @@ -53,7 +53,7 @@ { const size_t __n = static_cast(__last - __first); if (__n > 0) - _VSTD::memmove(__result, __first, __n * sizeof(_Up)); + std::memmove(__result, __first, __n * sizeof(_Up)); return __result + __n; } @@ -63,12 +63,12 @@ copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { if (__libcpp_is_constant_evaluated()) { - return _VSTD::__copy_constexpr(__first, __last, __result); + return std::__copy_constexpr(__first, __last, __result); } else { - return _VSTD::__rewrap_iter(__result, - _VSTD::__copy(_VSTD::__unwrap_iter(__first), - _VSTD::__unwrap_iter(__last), - _VSTD::__unwrap_iter(__result))); + return std::__rewrap_iter(__result, + std::__copy(std::__unwrap_iter(__first), + std::__unwrap_iter(__last), + std::__unwrap_iter(__result))); } } diff --git a/libcxx/include/__algorithm/copy_backward.h b/libcxx/include/__algorithm/copy_backward.h --- a/libcxx/include/__algorithm/copy_backward.h +++ b/libcxx/include/__algorithm/copy_backward.h @@ -36,7 +36,7 @@ _OutputIterator __copy_backward(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) { - return _VSTD::__copy_backward_constexpr(__first, __last, __result); + return std::__copy_backward_constexpr(__first, __last, __result); } template @@ -53,7 +53,7 @@ if (__n > 0) { __result -= __n; - _VSTD::memmove(__result, __first, __n * sizeof(_Up)); + std::memmove(__result, __first, __n * sizeof(_Up)); } return __result; } @@ -65,12 +65,12 @@ _BidirectionalIterator2 __result) { if (__libcpp_is_constant_evaluated()) { - return _VSTD::__copy_backward_constexpr(__first, __last, __result); + return std::__copy_backward_constexpr(__first, __last, __result); } else { - return _VSTD::__rewrap_iter(__result, - _VSTD::__copy_backward(_VSTD::__unwrap_iter(__first), - _VSTD::__unwrap_iter(__last), - _VSTD::__unwrap_iter(__result))); + return std::__rewrap_iter(__result, + std::__copy_backward(std::__unwrap_iter(__first), + std::__unwrap_iter(__last), + std::__unwrap_iter(__result))); } } diff --git a/libcxx/include/__algorithm/copy_n.h b/libcxx/include/__algorithm/copy_n.h --- a/libcxx/include/__algorithm/copy_n.h +++ b/libcxx/include/__algorithm/copy_n.h @@ -30,7 +30,7 @@ >::type copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) { - typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; + typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize; _IntegralSize __n = __orig_n; if (__n > 0) { @@ -56,9 +56,9 @@ copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator>::difference_type difference_type; - typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; + typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize; _IntegralSize __n = __orig_n; - return _VSTD::copy(__first, __first + difference_type(__n), __result); + return std::copy(__first, __first + difference_type(__n), __result); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/equal.h b/libcxx/include/__algorithm/equal.h --- a/libcxx/include/__algorithm/equal.h +++ b/libcxx/include/__algorithm/equal.h @@ -35,7 +35,7 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { typedef typename iterator_traits<_InputIterator1>::value_type __v1; typedef typename iterator_traits<_InputIterator2>::value_type __v2; - return _VSTD::equal(__first1, __last1, __first2, __equal_to<__v1, __v2>()); + return std::equal(__first1, __last1, __first2, __equal_to<__v1, __v2>()); } #if _LIBCPP_STD_VER > 11 @@ -54,9 +54,9 @@ __equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _RandomAccessIterator2 __first2, _RandomAccessIterator2 __last2, _BinaryPredicate __pred, random_access_iterator_tag, random_access_iterator_tag) { - if (_VSTD::distance(__first1, __last1) != _VSTD::distance(__first2, __last2)) + if (std::distance(__first1, __last1) != std::distance(__first2, __last2)) return false; - return _VSTD::equal<_RandomAccessIterator1, _RandomAccessIterator2, + return std::equal<_RandomAccessIterator1, _RandomAccessIterator2, _BinaryPredicate&>(__first1, __last1, __first2, __pred); } @@ -64,7 +64,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __pred) { - return _VSTD::__equal<_BinaryPredicate&>( + return std::__equal<_BinaryPredicate&>( __first1, __last1, __first2, __last2, __pred, typename iterator_traits<_InputIterator1>::iterator_category(), typename iterator_traits<_InputIterator2>::iterator_category()); } @@ -74,7 +74,7 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { typedef typename iterator_traits<_InputIterator1>::value_type __v1; typedef typename iterator_traits<_InputIterator2>::value_type __v2; - return _VSTD::__equal(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>(), + return std::__equal(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>(), typename iterator_traits<_InputIterator1>::iterator_category(), typename iterator_traits<_InputIterator2>::iterator_category()); } diff --git a/libcxx/include/__algorithm/equal_range.h b/libcxx/include/__algorithm/equal_range.h --- a/libcxx/include/__algorithm/equal_range.h +++ b/libcxx/include/__algorithm/equal_range.h @@ -28,12 +28,12 @@ __equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type; - difference_type __len = _VSTD::distance(__first, __last); + difference_type __len = std::distance(__first, __last); while (__len != 0) { - difference_type __l2 = _VSTD::__half_positive(__len); + difference_type __l2 = std::__half_positive(__len); _ForwardIterator __m = __first; - _VSTD::advance(__m, __l2); + std::advance(__m, __l2); if (__comp(*__m, __value_)) { __first = ++__m; @@ -49,8 +49,8 @@ _ForwardIterator __mp1 = __m; return pair<_ForwardIterator, _ForwardIterator> ( - _VSTD::__lower_bound<_Compare>(__first, __m, __value_, __comp), - _VSTD::__upper_bound<_Compare>(++__mp1, __last, __value_, __comp) + std::__lower_bound<_Compare>(__first, __m, __value_, __comp), + std::__upper_bound<_Compare>(++__mp1, __last, __value_, __comp) ); } } @@ -64,7 +64,7 @@ equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__equal_range<_Comp_ref>(__first, __last, __value_, __comp); + return std::__equal_range<_Comp_ref>(__first, __last, __value_, __comp); } template @@ -73,7 +73,7 @@ pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) { - return _VSTD::equal_range(__first, __last, __value_, + return std::equal_range(__first, __last, __value_, __less::value_type, _Tp>()); } diff --git a/libcxx/include/__algorithm/fill.h b/libcxx/include/__algorithm/fill.h --- a/libcxx/include/__algorithm/fill.h +++ b/libcxx/include/__algorithm/fill.h @@ -34,7 +34,7 @@ void __fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value_, random_access_iterator_tag) { - _VSTD::fill_n(__first, __last - __first, __value_); + std::fill_n(__first, __last - __first, __value_); } template @@ -42,7 +42,7 @@ void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) { - _VSTD::__fill(__first, __last, __value_, typename iterator_traits<_ForwardIterator>::iterator_category()); + std::__fill(__first, __last, __value_, typename iterator_traits<_ForwardIterator>::iterator_category()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/fill_n.h b/libcxx/include/__algorithm/fill_n.h --- a/libcxx/include/__algorithm/fill_n.h +++ b/libcxx/include/__algorithm/fill_n.h @@ -34,7 +34,7 @@ _OutputIterator fill_n(_OutputIterator __first, _Size __n, const _Tp& __value_) { - return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value_); + return std::__fill_n(__first, std::__convert_to_integral(__n), __value_); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/find_end.h b/libcxx/include/__algorithm/find_end.h --- a/libcxx/include/__algorithm/find_end.h +++ b/libcxx/include/__algorithm/find_end.h @@ -132,7 +132,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) { - return _VSTD::__find_end<_BinaryPredicate&>( + return std::__find_end<_BinaryPredicate&>( __first1, __last1, __first2, __last2, __pred, typename iterator_traits<_ForwardIterator1>::iterator_category(), typename iterator_traits<_ForwardIterator2>::iterator_category()); } @@ -142,7 +142,7 @@ find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { typedef typename iterator_traits<_ForwardIterator1>::value_type __v1; typedef typename iterator_traits<_ForwardIterator2>::value_type __v2; - return _VSTD::find_end(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>()); + return std::find_end(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/find_first_of.h b/libcxx/include/__algorithm/find_first_of.h --- a/libcxx/include/__algorithm/find_first_of.h +++ b/libcxx/include/__algorithm/find_first_of.h @@ -36,7 +36,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1 find_first_of(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) { - return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred); + return std::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred); } template @@ -44,7 +44,7 @@ _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { typedef typename iterator_traits<_ForwardIterator1>::value_type __v1; typedef typename iterator_traits<_ForwardIterator2>::value_type __v2; - return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>()); + return std::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/for_each_n.h b/libcxx/include/__algorithm/for_each_n.h --- a/libcxx/include/__algorithm/for_each_n.h +++ b/libcxx/include/__algorithm/for_each_n.h @@ -25,7 +25,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator for_each_n(_InputIterator __first, _Size __orig_n, _Function __f) { - typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; + typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize; _IntegralSize __n = __orig_n; while (__n > 0) { __f(*__first); diff --git a/libcxx/include/__algorithm/generate_n.h b/libcxx/include/__algorithm/generate_n.h --- a/libcxx/include/__algorithm/generate_n.h +++ b/libcxx/include/__algorithm/generate_n.h @@ -23,7 +23,7 @@ _OutputIterator generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen) { - typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize; + typedef decltype(std::__convert_to_integral(__orig_n)) _IntegralSize; _IntegralSize __n = __orig_n; for (; __n > 0; ++__first, (void) --__n) *__first = __gen(); diff --git a/libcxx/include/__algorithm/in_in_result.h b/libcxx/include/__algorithm/in_in_result.h --- a/libcxx/include/__algorithm/in_in_result.h +++ b/libcxx/include/__algorithm/in_in_result.h @@ -34,7 +34,7 @@ template requires convertible_to<_I1, _II1> && convertible_to<_I2, _II2> _LIBCPP_HIDE_FROM_ABI constexpr - operator in_in_result<_II1, _II2>() && { return {_VSTD::move(in1), _VSTD::move(in2)}; } + operator in_in_result<_II1, _II2>() && { return {std::move(in1), std::move(in2)}; } }; } // namespace ranges diff --git a/libcxx/include/__algorithm/in_out_result.h b/libcxx/include/__algorithm/in_out_result.h --- a/libcxx/include/__algorithm/in_out_result.h +++ b/libcxx/include/__algorithm/in_out_result.h @@ -40,7 +40,7 @@ requires convertible_to<_InputIterator, _InputIterator2> && convertible_to<_OutputIterator, _OutputIterator2> _LIBCPP_HIDE_FROM_ABI constexpr operator in_out_result<_InputIterator2, _OutputIterator2>() && { - return {_VSTD::move(in), _VSTD::move(out)}; + return {std::move(in), std::move(out)}; } }; diff --git a/libcxx/include/__algorithm/includes.h b/libcxx/include/__algorithm/includes.h --- a/libcxx/include/__algorithm/includes.h +++ b/libcxx/include/__algorithm/includes.h @@ -43,7 +43,7 @@ _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__includes<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); + return std::__includes<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); } template @@ -52,7 +52,7 @@ bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { - return _VSTD::includes(__first1, __last1, __first2, __last2, + return std::includes(__first1, __last1, __first2, __last2, __less::value_type, typename iterator_traits<_InputIterator2>::value_type>()); } diff --git a/libcxx/include/__algorithm/inplace_merge.h b/libcxx/include/__algorithm/inplace_merge.h --- a/libcxx/include/__algorithm/inplace_merge.h +++ b/libcxx/include/__algorithm/inplace_merge.h @@ -60,18 +60,18 @@ { if (__first2 == __last2) { - _VSTD::move(__first1, __last1, __result); + std::move(__first1, __last1, __result); return; } if (__comp(*__first2, *__first1)) { - *__result = _VSTD::move(*__first2); + *__result = std::move(*__first2); ++__first2; } else { - *__result = _VSTD::move(*__first1); + *__result = std::move(*__first1); ++__first1; } } @@ -92,18 +92,18 @@ { value_type* __p = __buff; for (_BidirectionalIterator __i = __first; __i != __middle; __d.template __incr(), (void) ++__i, (void) ++__p) - ::new ((void*)__p) value_type(_VSTD::move(*__i)); - _VSTD::__half_inplace_merge<_Compare>(__buff, __p, __middle, __last, __first, __comp); + ::new ((void*)__p) value_type(std::move(*__i)); + std::__half_inplace_merge<_Compare>(__buff, __p, __middle, __last, __first, __comp); } else { value_type* __p = __buff; for (_BidirectionalIterator __i = __middle; __i != __last; __d.template __incr(), (void) ++__i, (void) ++__p) - ::new ((void*)__p) value_type(_VSTD::move(*__i)); + ::new ((void*)__p) value_type(std::move(*__i)); typedef reverse_iterator<_BidirectionalIterator> _RBi; typedef reverse_iterator _Rv; typedef __invert<_Compare> _Inverted; - _VSTD::__half_inplace_merge<_Inverted>(_Rv(__p), _Rv(__buff), + std::__half_inplace_merge<_Inverted>(_Rv(__p), _Rv(__buff), _RBi(__middle), _RBi(__first), _RBi(__last), _Inverted(__comp)); } @@ -123,7 +123,7 @@ if (__len2 == 0) return; if (__len1 <= __buff_size || __len2 <= __buff_size) - return _VSTD::__buffered_inplace_merge<_Compare> + return std::__buffered_inplace_merge<_Compare> (__first, __middle, __last, __comp, __len1, __len2, __buff); // shrink [__first, __middle) as much as possible (with no moves), returning if it shrinks to 0 for (; true; ++__first, (void) --__len1) @@ -150,9 +150,9 @@ { // __len >= 1, __len2 >= 2 __len21 = __len2 / 2; __m2 = __middle; - _VSTD::advance(__m2, __len21); - __m1 = _VSTD::__upper_bound<_Compare>(__first, __middle, *__m2, __comp); - __len11 = _VSTD::distance(__first, __m1); + std::advance(__m2, __len21); + __m1 = std::__upper_bound<_Compare>(__first, __middle, *__m2, __comp); + __len11 = std::distance(__first, __m1); } else { @@ -165,21 +165,21 @@ // __len1 >= 2, __len2 >= 1 __len11 = __len1 / 2; __m1 = __first; - _VSTD::advance(__m1, __len11); - __m2 = _VSTD::__lower_bound<_Compare>(__middle, __last, *__m1, __comp); - __len21 = _VSTD::distance(__middle, __m2); + std::advance(__m1, __len11); + __m2 = std::__lower_bound<_Compare>(__middle, __last, *__m1, __comp); + __len21 = std::distance(__middle, __m2); } difference_type __len12 = __len1 - __len11; // distance(__m1, __middle) difference_type __len22 = __len2 - __len21; // distance(__m2, __last) // [__first, __m1) [__m1, __middle) [__middle, __m2) [__m2, __last) // swap middle two partitions - __middle = _VSTD::rotate(__m1, __middle, __m2); + __middle = std::rotate(__m1, __middle, __m2); // __len12 and __len21 now have swapped meanings // merge smaller range with recursive call and larger with tail recursion elimination if (__len11 + __len21 < __len12 + __len22) { - _VSTD::__inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); -// _VSTD::__inplace_merge<_Compare>(__middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); + std::__inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); +// std::__inplace_merge<_Compare>(__middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); __first = __middle; __middle = __m2; __len1 = __len12; @@ -187,8 +187,8 @@ } else { - _VSTD::__inplace_merge<_Compare>(__middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); -// _VSTD::__inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); + std::__inplace_merge<_Compare>(__middle, __m2, __last, __comp, __len12, __len22, __buff, __buff_size); +// std::__inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size); __last = __middle; __middle = __m1; __len1 = __len11; @@ -205,13 +205,13 @@ { typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; - difference_type __len1 = _VSTD::distance(__first, __middle); - difference_type __len2 = _VSTD::distance(__middle, __last); - difference_type __buf_size = _VSTD::min(__len1, __len2); - pair __buf = _VSTD::get_temporary_buffer(__buf_size); + difference_type __len1 = std::distance(__first, __middle); + difference_type __len2 = std::distance(__middle, __last); + difference_type __buf_size = std::min(__len1, __len2); + pair __buf = std::get_temporary_buffer(__buf_size); unique_ptr __h(__buf.first); typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __comp, __len1, __len2, + return std::__inplace_merge<_Comp_ref>(__first, __middle, __last, __comp, __len1, __len2, __buf.first, __buf.second); } @@ -220,7 +220,7 @@ void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last) { - _VSTD::inplace_merge(__first, __middle, __last, + std::inplace_merge(__first, __middle, __last, __less::value_type>()); } diff --git a/libcxx/include/__algorithm/is_heap.h b/libcxx/include/__algorithm/is_heap.h --- a/libcxx/include/__algorithm/is_heap.h +++ b/libcxx/include/__algorithm/is_heap.h @@ -28,7 +28,7 @@ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__is_heap_until<_Comp_ref>(__first, __last, __comp) == __last; + return std::__is_heap_until<_Comp_ref>(__first, __last, __comp) == __last; } template @@ -37,7 +37,7 @@ bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { - return _VSTD::is_heap(__first, __last, __less::value_type>()); + return std::is_heap(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/is_heap_until.h b/libcxx/include/__algorithm/is_heap_until.h --- a/libcxx/include/__algorithm/is_heap_until.h +++ b/libcxx/include/__algorithm/is_heap_until.h @@ -52,14 +52,14 @@ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__is_heap_until<_Comp_ref>(__first, __last, __comp); + return std::__is_heap_until<_Comp_ref>(__first, __last, __comp); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) { - return _VSTD::__is_heap_until(__first, __last, __less::value_type>()); + return std::__is_heap_until(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/is_permutation.h b/libcxx/include/__algorithm/is_permutation.h --- a/libcxx/include/__algorithm/is_permutation.h +++ b/libcxx/include/__algorithm/is_permutation.h @@ -35,10 +35,10 @@ // __first1 != __last1 && *__first1 != *__first2 typedef typename iterator_traits<_ForwardIterator1>::difference_type _D1; - _D1 __l1 = _VSTD::distance(__first1, __last1); + _D1 __l1 = std::distance(__first1, __last1); if (__l1 == _D1(1)) return false; - _ForwardIterator2 __last2 = _VSTD::next(__first2, __l1); + _ForwardIterator2 __last2 = std::next(__first2, __l1); // For each element in [f1, l1) see if there are the same number of // equal elements in [f2, l2) for (_ForwardIterator1 __i = __first1; __i != __last1; ++__i) { @@ -57,7 +57,7 @@ return false; // Count number of *__i in [__i, l1) (we can start with 1) _D1 __c1 = 1; - for (_ForwardIterator1 __j = _VSTD::next(__i); __j != __last1; ++__j) + for (_ForwardIterator1 __j = std::next(__i); __j != __last1; ++__j) if (__pred(*__i, *__j)) ++__c1; if (__c1 != __c2) @@ -72,7 +72,7 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { typedef typename iterator_traits<_ForwardIterator1>::value_type __v1; typedef typename iterator_traits<_ForwardIterator2>::value_type __v2; - return _VSTD::is_permutation(__first1, __last1, __first2, __equal_to<__v1, __v2>()); + return std::is_permutation(__first1, __last1, __first2, __equal_to<__v1, __v2>()); } #if _LIBCPP_STD_VER > 11 @@ -90,10 +90,10 @@ return false; typedef typename iterator_traits<_ForwardIterator1>::difference_type _D1; - _D1 __l1 = _VSTD::distance(__first1, __last1); + _D1 __l1 = std::distance(__first1, __last1); typedef typename iterator_traits<_ForwardIterator2>::difference_type _D2; - _D2 __l2 = _VSTD::distance(__first2, __last2); + _D2 __l2 = std::distance(__first2, __last2); if (__l1 != __l2) return false; @@ -115,7 +115,7 @@ return false; // Count number of *__i in [__i, l1) (we can start with 1) _D1 __c1 = 1; - for (_ForwardIterator1 __j = _VSTD::next(__i); __j != __last1; ++__j) + for (_ForwardIterator1 __j = std::next(__i); __j != __last1; ++__j) if (__pred(*__i, *__j)) ++__c1; if (__c1 != __c2) @@ -130,9 +130,9 @@ _RandomAccessIterator1 __first2, _RandomAccessIterator2 __last2, _BinaryPredicate __pred, random_access_iterator_tag, random_access_iterator_tag) { - if (_VSTD::distance(__first1, __last1) != _VSTD::distance(__first2, __last2)) + if (std::distance(__first1, __last1) != std::distance(__first2, __last2)) return false; - return _VSTD::is_permutation<_RandomAccessIterator1, _RandomAccessIterator2, + return std::is_permutation<_RandomAccessIterator1, _RandomAccessIterator2, _BinaryPredicate&>(__first1, __last1, __first2, __pred); } @@ -140,7 +140,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) { - return _VSTD::__is_permutation<_BinaryPredicate&>( + return std::__is_permutation<_BinaryPredicate&>( __first1, __last1, __first2, __last2, __pred, typename iterator_traits<_ForwardIterator1>::iterator_category(), typename iterator_traits<_ForwardIterator2>::iterator_category()); } @@ -151,7 +151,7 @@ _ForwardIterator2 __last2) { typedef typename iterator_traits<_ForwardIterator1>::value_type __v1; typedef typename iterator_traits<_ForwardIterator2>::value_type __v2; - return _VSTD::__is_permutation(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>(), + return std::__is_permutation(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>(), typename iterator_traits<_ForwardIterator1>::iterator_category(), typename iterator_traits<_ForwardIterator2>::iterator_category()); } diff --git a/libcxx/include/__algorithm/is_sorted.h b/libcxx/include/__algorithm/is_sorted.h --- a/libcxx/include/__algorithm/is_sorted.h +++ b/libcxx/include/__algorithm/is_sorted.h @@ -28,7 +28,7 @@ is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp) == __last; + return std::__is_sorted_until<_Comp_ref>(__first, __last, __comp) == __last; } template @@ -37,7 +37,7 @@ bool is_sorted(_ForwardIterator __first, _ForwardIterator __last) { - return _VSTD::is_sorted(__first, __last, __less::value_type>()); + return std::is_sorted(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/is_sorted_until.h b/libcxx/include/__algorithm/is_sorted_until.h --- a/libcxx/include/__algorithm/is_sorted_until.h +++ b/libcxx/include/__algorithm/is_sorted_until.h @@ -42,14 +42,14 @@ is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp); + return std::__is_sorted_until<_Comp_ref>(__first, __last, __comp); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) { - return _VSTD::is_sorted_until(__first, __last, __less::value_type>()); + return std::is_sorted_until(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h --- a/libcxx/include/__algorithm/lexicographical_compare.h +++ b/libcxx/include/__algorithm/lexicographical_compare.h @@ -43,7 +43,7 @@ _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); + return std::__lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp); } template @@ -53,7 +53,7 @@ lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { - return _VSTD::lexicographical_compare(__first1, __last1, __first2, __last2, + return std::lexicographical_compare(__first1, __last1, __first2, __last2, __less::value_type, typename iterator_traits<_InputIterator2>::value_type>()); } diff --git a/libcxx/include/__algorithm/lower_bound.h b/libcxx/include/__algorithm/lower_bound.h --- a/libcxx/include/__algorithm/lower_bound.h +++ b/libcxx/include/__algorithm/lower_bound.h @@ -25,12 +25,12 @@ __lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type; - difference_type __len = _VSTD::distance(__first, __last); + difference_type __len = std::distance(__first, __last); while (__len != 0) { - difference_type __l2 = _VSTD::__half_positive(__len); + difference_type __l2 = std::__half_positive(__len); _ForwardIterator __m = __first; - _VSTD::advance(__m, __l2); + std::advance(__m, __l2); if (__comp(*__m, __value_)) { __first = ++__m; @@ -48,7 +48,7 @@ _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { - return _VSTD::__lower_bound<_Compare&>(__first, __last, __value_, __comp); + return std::__lower_bound<_Compare&>(__first, __last, __value_, __comp); } template @@ -57,7 +57,7 @@ _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) { - return _VSTD::lower_bound(__first, __last, __value_, + return std::lower_bound(__first, __last, __value_, __less::value_type, _Tp>()); } diff --git a/libcxx/include/__algorithm/make_heap.h b/libcxx/include/__algorithm/make_heap.h --- a/libcxx/include/__algorithm/make_heap.h +++ b/libcxx/include/__algorithm/make_heap.h @@ -32,7 +32,7 @@ // start from the first parent, there is no need to consider children for (difference_type __start = (__n - 2) / 2; __start >= 0; --__start) { - _VSTD::__sift_down<_Compare>(__first, __comp, __n, __first + __start); + std::__sift_down<_Compare>(__first, __comp, __n, __first + __start); } } } @@ -43,7 +43,7 @@ make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - _VSTD::__make_heap<_Comp_ref>(__first, __last, __comp); + std::__make_heap<_Comp_ref>(__first, __last, __comp); } template @@ -51,7 +51,7 @@ void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { - _VSTD::make_heap(__first, __last, __less::value_type>()); + std::make_heap(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/max.h b/libcxx/include/__algorithm/max.h --- a/libcxx/include/__algorithm/max.h +++ b/libcxx/include/__algorithm/max.h @@ -39,7 +39,7 @@ const _Tp& max(const _Tp& __a, const _Tp& __b) { - return _VSTD::max(__a, __b, __less<_Tp>()); + return std::max(__a, __b, __less<_Tp>()); } #ifndef _LIBCPP_CXX03_LANG @@ -51,7 +51,7 @@ max(initializer_list<_Tp> __t, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return *_VSTD::__max_element<_Comp_ref>(__t.begin(), __t.end(), __comp); + return *std::__max_element<_Comp_ref>(__t.begin(), __t.end(), __comp); } template @@ -60,7 +60,7 @@ _Tp max(initializer_list<_Tp> __t) { - return *_VSTD::max_element(__t.begin(), __t.end(), __less<_Tp>()); + return *std::max_element(__t.begin(), __t.end(), __less<_Tp>()); } #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__algorithm/max_element.h b/libcxx/include/__algorithm/max_element.h --- a/libcxx/include/__algorithm/max_element.h +++ b/libcxx/include/__algorithm/max_element.h @@ -41,7 +41,7 @@ max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__max_element<_Comp_ref>(__first, __last, __comp); + return std::__max_element<_Comp_ref>(__first, __last, __comp); } @@ -49,7 +49,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last) { - return _VSTD::max_element(__first, __last, + return std::max_element(__first, __last, __less::value_type>()); } diff --git a/libcxx/include/__algorithm/merge.h b/libcxx/include/__algorithm/merge.h --- a/libcxx/include/__algorithm/merge.h +++ b/libcxx/include/__algorithm/merge.h @@ -30,7 +30,7 @@ for (; __first1 != __last1; ++__result) { if (__first2 == __last2) - return _VSTD::copy(__first1, __last1, __result); + return std::copy(__first1, __last1, __result); if (__comp(*__first2, *__first1)) { *__result = *__first2; @@ -42,7 +42,7 @@ ++__first1; } } - return _VSTD::copy(__first2, __last2, __result); + return std::copy(__first2, __last2, __result); } template @@ -52,7 +52,7 @@ _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); + return std::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); } template @@ -63,7 +63,7 @@ { typedef typename iterator_traits<_InputIterator1>::value_type __v1; typedef typename iterator_traits<_InputIterator2>::value_type __v2; - return _VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<__v1, __v2>()); + return std::merge(__first1, __last1, __first2, __last2, __result, __less<__v1, __v2>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/min.h b/libcxx/include/__algorithm/min.h --- a/libcxx/include/__algorithm/min.h +++ b/libcxx/include/__algorithm/min.h @@ -39,7 +39,7 @@ const _Tp& min(const _Tp& __a, const _Tp& __b) { - return _VSTD::min(__a, __b, __less<_Tp>()); + return std::min(__a, __b, __less<_Tp>()); } #ifndef _LIBCPP_CXX03_LANG @@ -51,7 +51,7 @@ min(initializer_list<_Tp> __t, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return *_VSTD::__min_element<_Comp_ref>(__t.begin(), __t.end(), __comp); + return *std::__min_element<_Comp_ref>(__t.begin(), __t.end(), __comp); } template @@ -60,7 +60,7 @@ _Tp min(initializer_list<_Tp> __t) { - return *_VSTD::min_element(__t.begin(), __t.end(), __less<_Tp>()); + return *std::min_element(__t.begin(), __t.end(), __less<_Tp>()); } #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__algorithm/min_element.h b/libcxx/include/__algorithm/min_element.h --- a/libcxx/include/__algorithm/min_element.h +++ b/libcxx/include/__algorithm/min_element.h @@ -41,14 +41,14 @@ min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__min_element<_Comp_ref>(__first, __last, __comp); + return std::__min_element<_Comp_ref>(__first, __last, __comp); } template _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator min_element(_ForwardIterator __first, _ForwardIterator __last) { - return _VSTD::min_element(__first, __last, + return std::min_element(__first, __last, __less::value_type>()); } diff --git a/libcxx/include/__algorithm/minmax.h b/libcxx/include/__algorithm/minmax.h --- a/libcxx/include/__algorithm/minmax.h +++ b/libcxx/include/__algorithm/minmax.h @@ -36,7 +36,7 @@ pair minmax(const _Tp& __a, const _Tp& __b) { - return _VSTD::minmax(__a, __b, __less<_Tp>()); + return std::minmax(__a, __b, __less<_Tp>()); } #ifndef _LIBCPP_CXX03_LANG @@ -85,7 +85,7 @@ pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t) { - return _VSTD::minmax(__t, __less<_Tp>()); + return std::minmax(__t, __less<_Tp>()); } #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__algorithm/minmax_element.h b/libcxx/include/__algorithm/minmax_element.h --- a/libcxx/include/__algorithm/minmax_element.h +++ b/libcxx/include/__algorithm/minmax_element.h @@ -76,7 +76,7 @@ pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last) { - return _VSTD::minmax_element(__first, __last, + return std::minmax_element(__first, __last, __less::value_type>()); } diff --git a/libcxx/include/__algorithm/mismatch.h b/libcxx/include/__algorithm/mismatch.h --- a/libcxx/include/__algorithm/mismatch.h +++ b/libcxx/include/__algorithm/mismatch.h @@ -37,7 +37,7 @@ mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { typedef typename iterator_traits<_InputIterator1>::value_type __v1; typedef typename iterator_traits<_InputIterator2>::value_type __v2; - return _VSTD::mismatch(__first1, __last1, __first2, __equal_to<__v1, __v2>()); + return std::mismatch(__first1, __last1, __first2, __equal_to<__v1, __v2>()); } #if _LIBCPP_STD_VER > 11 @@ -58,7 +58,7 @@ mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { typedef typename iterator_traits<_InputIterator1>::value_type __v1; typedef typename iterator_traits<_InputIterator2>::value_type __v2; - return _VSTD::mismatch(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>()); + return std::mismatch(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>()); } #endif diff --git a/libcxx/include/__algorithm/move.h b/libcxx/include/__algorithm/move.h --- a/libcxx/include/__algorithm/move.h +++ b/libcxx/include/__algorithm/move.h @@ -30,7 +30,7 @@ __move_constexpr(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { for (; __first != __last; ++__first, (void) ++__result) - *__result = _VSTD::move(*__first); + *__result = std::move(*__first); return __result; } @@ -39,7 +39,7 @@ _OutputIterator __move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { - return _VSTD::__move_constexpr(__first, __last, __result); + return std::__move_constexpr(__first, __last, __result); } template @@ -54,7 +54,7 @@ { const size_t __n = static_cast(__last - __first); if (__n > 0) - _VSTD::memmove(__result, __first, __n * sizeof(_Up)); + std::memmove(__result, __first, __n * sizeof(_Up)); return __result + __n; } @@ -64,12 +64,12 @@ move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { if (__libcpp_is_constant_evaluated()) { - return _VSTD::__move_constexpr(__first, __last, __result); + return std::__move_constexpr(__first, __last, __result); } else { - return _VSTD::__rewrap_iter(__result, - _VSTD::__move(_VSTD::__unwrap_iter(__first), - _VSTD::__unwrap_iter(__last), - _VSTD::__unwrap_iter(__result))); + return std::__rewrap_iter(__result, + std::__move(std::__unwrap_iter(__first), + std::__unwrap_iter(__last), + std::__unwrap_iter(__result))); } } diff --git a/libcxx/include/__algorithm/move_backward.h b/libcxx/include/__algorithm/move_backward.h --- a/libcxx/include/__algorithm/move_backward.h +++ b/libcxx/include/__algorithm/move_backward.h @@ -27,7 +27,7 @@ __move_backward_constexpr(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { while (__first != __last) - *--__result = _VSTD::move(*--__last); + *--__result = std::move(*--__last); return __result; } @@ -36,7 +36,7 @@ _OutputIterator __move_backward(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { - return _VSTD::__move_backward_constexpr(__first, __last, __result); + return std::__move_backward_constexpr(__first, __last, __result); } template @@ -53,7 +53,7 @@ if (__n > 0) { __result -= __n; - _VSTD::memmove(__result, __first, __n * sizeof(_Up)); + std::memmove(__result, __first, __n * sizeof(_Up)); } return __result; } @@ -65,12 +65,12 @@ _BidirectionalIterator2 __result) { if (__libcpp_is_constant_evaluated()) { - return _VSTD::__move_backward_constexpr(__first, __last, __result); + return std::__move_backward_constexpr(__first, __last, __result); } else { - return _VSTD::__rewrap_iter(__result, - _VSTD::__move_backward(_VSTD::__unwrap_iter(__first), - _VSTD::__unwrap_iter(__last), - _VSTD::__unwrap_iter(__result))); + return std::__rewrap_iter(__result, + std::__move_backward(std::__unwrap_iter(__first), + std::__unwrap_iter(__last), + std::__unwrap_iter(__result))); } } diff --git a/libcxx/include/__algorithm/next_permutation.h b/libcxx/include/__algorithm/next_permutation.h --- a/libcxx/include/__algorithm/next_permutation.h +++ b/libcxx/include/__algorithm/next_permutation.h @@ -38,12 +38,12 @@ while (!__comp(*__i, *--__j)) ; swap(*__i, *__j); - _VSTD::reverse(__ip1, __last); + std::reverse(__ip1, __last); return true; } if (__i == __first) { - _VSTD::reverse(__first, __last); + std::reverse(__first, __last); return false; } } @@ -55,7 +55,7 @@ next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__next_permutation<_Comp_ref>(__first, __last, __comp); + return std::__next_permutation<_Comp_ref>(__first, __last, __comp); } template @@ -63,7 +63,7 @@ bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { - return _VSTD::next_permutation(__first, __last, + return std::next_permutation(__first, __last, __less::value_type>()); } diff --git a/libcxx/include/__algorithm/nth_element.h b/libcxx/include/__algorithm/nth_element.h --- a/libcxx/include/__algorithm/nth_element.h +++ b/libcxx/include/__algorithm/nth_element.h @@ -66,19 +66,19 @@ case 3: { _RandomAccessIterator __m = __first; - _VSTD::__sort3<_Compare>(__first, ++__m, --__last, __comp); + std::__sort3<_Compare>(__first, ++__m, --__last, __comp); return; } } if (__len <= __limit) { - _VSTD::__selection_sort<_Compare>(__first, __last, __comp); + std::__selection_sort<_Compare>(__first, __last, __comp); return; } // __len > __limit >= 3 _RandomAccessIterator __m = __first + __len/2; _RandomAccessIterator __lm1 = __last; - unsigned __n_swaps = _VSTD::__sort3<_Compare>(__first, __m, --__lm1, __comp); + unsigned __n_swaps = std::__sort3<_Compare>(__first, __m, --__lm1, __comp); // *__m is median // partition [__first, __m) < *__m and *__m <= [__m, __last) // (this inhibits tossing elements equivalent to __m around unnecessarily) @@ -90,7 +90,7 @@ if (!__comp(*__i, *__m)) // if *__first == *__m { // *__first == *__m, *__first doesn't go in first part - if (_VSTD::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) { + if (std::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) { swap(*__i, *__j); ++__n_swaps; } else { @@ -132,7 +132,7 @@ return; } // __nth_element the second part - // _VSTD::__nth_element<_Compare>(__i, __nth, __last, __comp); + // std::__nth_element<_Compare>(__i, __nth, __last, __comp); __first = __i; continue; } @@ -210,12 +210,12 @@ // __nth_element on range containing __nth if (__nth < __i) { - // _VSTD::__nth_element<_Compare>(__first, __nth, __i, __comp); + // std::__nth_element<_Compare>(__first, __nth, __i, __comp); __last = __i; } else { - // _VSTD::__nth_element<_Compare>(__i+1, __nth, __last, __comp); + // std::__nth_element<_Compare>(__i+1, __nth, __last, __comp); __first = ++__i; } } @@ -228,7 +228,7 @@ { _LIBCPP_DEBUG_RANDOMIZE_RANGE(__first, __last); typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - _VSTD::__nth_element<_Comp_ref>(__first, __nth, __last, __comp); + std::__nth_element<_Comp_ref>(__first, __nth, __last, __comp); _LIBCPP_DEBUG_RANDOMIZE_RANGE(__first, __nth); if (__nth != __last) { _LIBCPP_DEBUG_RANDOMIZE_RANGE(++__nth, __last); @@ -240,7 +240,7 @@ void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) { - _VSTD::nth_element(__first, __nth, __last, __less::value_type>()); + std::nth_element(__first, __nth, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/partial_sort.h b/libcxx/include/__algorithm/partial_sort.h --- a/libcxx/include/__algorithm/partial_sort.h +++ b/libcxx/include/__algorithm/partial_sort.h @@ -35,17 +35,17 @@ { if (__first == __middle) return; - _VSTD::__make_heap<_Compare>(__first, __middle, __comp); + std::__make_heap<_Compare>(__first, __middle, __comp); typename iterator_traits<_RandomAccessIterator>::difference_type __len = __middle - __first; for (_RandomAccessIterator __i = __middle; __i != __last; ++__i) { if (__comp(*__i, *__first)) { swap(*__i, *__first); - _VSTD::__sift_down<_Compare>(__first, __comp, __len, __first); + std::__sift_down<_Compare>(__first, __comp, __len, __first); } } - _VSTD::__sort_heap<_Compare>(__first, __middle, __comp); + std::__sort_heap<_Compare>(__first, __middle, __comp); } template @@ -56,7 +56,7 @@ { _LIBCPP_DEBUG_RANDOMIZE_RANGE(__first, __last); typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - _VSTD::__partial_sort<_Comp_ref>(__first, __middle, __last, __comp); + std::__partial_sort<_Comp_ref>(__first, __middle, __last, __comp); _LIBCPP_DEBUG_RANDOMIZE_RANGE(__middle, __last); } @@ -65,7 +65,7 @@ void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) { - _VSTD::partial_sort(__first, __middle, __last, + std::partial_sort(__first, __middle, __last, __less::value_type>()); } diff --git a/libcxx/include/__algorithm/partial_sort_copy.h b/libcxx/include/__algorithm/partial_sort_copy.h --- a/libcxx/include/__algorithm/partial_sort_copy.h +++ b/libcxx/include/__algorithm/partial_sort_copy.h @@ -33,15 +33,15 @@ { for (; __first != __last && __r != __result_last; ++__first, (void) ++__r) *__r = *__first; - _VSTD::__make_heap<_Compare>(__result_first, __r, __comp); + std::__make_heap<_Compare>(__result_first, __r, __comp); typename iterator_traits<_RandomAccessIterator>::difference_type __len = __r - __result_first; for (; __first != __last; ++__first) if (__comp(*__first, *__result_first)) { *__result_first = *__first; - _VSTD::__sift_down<_Compare>(__result_first, __comp, __len, __result_first); + std::__sift_down<_Compare>(__result_first, __comp, __len, __result_first); } - _VSTD::__sort_heap<_Compare>(__result_first, __r, __comp); + std::__sort_heap<_Compare>(__result_first, __r, __comp); } return __r; } @@ -53,7 +53,7 @@ _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __comp); + return std::__partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __comp); } template @@ -62,7 +62,7 @@ partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last) { - return _VSTD::partial_sort_copy(__first, __last, __result_first, __result_last, + return std::partial_sort_copy(__first, __last, __result_first, __result_last, __less::value_type>()); } diff --git a/libcxx/include/__algorithm/partition.h b/libcxx/include/__algorithm/partition.h --- a/libcxx/include/__algorithm/partition.h +++ b/libcxx/include/__algorithm/partition.h @@ -72,7 +72,7 @@ _ForwardIterator partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { - return _VSTD::__partition<_Predicate&>( + return std::__partition<_Predicate&>( __first, __last, __pred, typename iterator_traits<_ForwardIterator>::iterator_category()); } diff --git a/libcxx/include/__algorithm/partition_point.h b/libcxx/include/__algorithm/partition_point.h --- a/libcxx/include/__algorithm/partition_point.h +++ b/libcxx/include/__algorithm/partition_point.h @@ -24,12 +24,12 @@ partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type; - difference_type __len = _VSTD::distance(__first, __last); + difference_type __len = std::distance(__first, __last); while (__len != 0) { - difference_type __l2 = _VSTD::__half_positive(__len); + difference_type __l2 = std::__half_positive(__len); _ForwardIterator __m = __first; - _VSTD::advance(__m, __l2); + std::advance(__m, __l2); if (__pred(*__m)) { __first = ++__m; diff --git a/libcxx/include/__algorithm/pop_heap.h b/libcxx/include/__algorithm/pop_heap.h --- a/libcxx/include/__algorithm/pop_heap.h +++ b/libcxx/include/__algorithm/pop_heap.h @@ -31,7 +31,7 @@ if (__len > 1) { swap(*__first, *--__last); - _VSTD::__sift_down<_Compare>(__first, __comp, __len - 1, __first); + std::__sift_down<_Compare>(__first, __comp, __len - 1, __first); } } @@ -41,7 +41,7 @@ pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - _VSTD::__pop_heap<_Comp_ref>(__first, __last, __comp, __last - __first); + std::__pop_heap<_Comp_ref>(__first, __last, __comp, __last - __first); } template @@ -49,7 +49,7 @@ void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { - _VSTD::pop_heap(__first, __last, __less::value_type>()); + std::pop_heap(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/prev_permutation.h b/libcxx/include/__algorithm/prev_permutation.h --- a/libcxx/include/__algorithm/prev_permutation.h +++ b/libcxx/include/__algorithm/prev_permutation.h @@ -38,12 +38,12 @@ while (!__comp(*--__j, *__i)) ; swap(*__i, *__j); - _VSTD::reverse(__ip1, __last); + std::reverse(__ip1, __last); return true; } if (__i == __first) { - _VSTD::reverse(__first, __last); + std::reverse(__first, __last); return false; } } @@ -55,7 +55,7 @@ prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__prev_permutation<_Comp_ref>(__first, __last, __comp); + return std::__prev_permutation<_Comp_ref>(__first, __last, __comp); } template @@ -63,7 +63,7 @@ bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { - return _VSTD::prev_permutation(__first, __last, + return std::prev_permutation(__first, __last, __less::value_type>()); } diff --git a/libcxx/include/__algorithm/push_heap.h b/libcxx/include/__algorithm/push_heap.h --- a/libcxx/include/__algorithm/push_heap.h +++ b/libcxx/include/__algorithm/push_heap.h @@ -33,17 +33,17 @@ _RandomAccessIterator __ptr = __first + __len; if (__comp(*__ptr, *--__last)) { - value_type __t(_VSTD::move(*__last)); + value_type __t(std::move(*__last)); do { - *__last = _VSTD::move(*__ptr); + *__last = std::move(*__ptr); __last = __ptr; if (__len == 0) break; __len = (__len - 1) / 2; __ptr = __first + __len; } while (__comp(*__ptr, __t)); - *__last = _VSTD::move(__t); + *__last = std::move(__t); } } } @@ -54,7 +54,7 @@ push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - _VSTD::__sift_up<_Comp_ref>(__first, __last, __comp, __last - __first); + std::__sift_up<_Comp_ref>(__first, __last, __comp, __last - __first); } template @@ -62,7 +62,7 @@ void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { - _VSTD::push_heap(__first, __last, __less::value_type>()); + std::push_heap(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/remove.h b/libcxx/include/__algorithm/remove.h --- a/libcxx/include/__algorithm/remove.h +++ b/libcxx/include/__algorithm/remove.h @@ -24,7 +24,7 @@ _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) { - __first = _VSTD::find(__first, __last, __value_); + __first = std::find(__first, __last, __value_); if (__first != __last) { _ForwardIterator __i = __first; @@ -32,7 +32,7 @@ { if (!(*__i == __value_)) { - *__first = _VSTD::move(*__i); + *__first = std::move(*__i); ++__first; } } diff --git a/libcxx/include/__algorithm/remove_if.h b/libcxx/include/__algorithm/remove_if.h --- a/libcxx/include/__algorithm/remove_if.h +++ b/libcxx/include/__algorithm/remove_if.h @@ -23,7 +23,7 @@ _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { - __first = _VSTD::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred); + __first = std::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred); if (__first != __last) { _ForwardIterator __i = __first; @@ -31,7 +31,7 @@ { if (!__pred(*__i)) { - *__first = _VSTD::move(*__i); + *__first = std::move(*__i); ++__first; } } diff --git a/libcxx/include/__algorithm/reverse.h b/libcxx/include/__algorithm/reverse.h --- a/libcxx/include/__algorithm/reverse.h +++ b/libcxx/include/__algorithm/reverse.h @@ -28,7 +28,7 @@ { if (__first == --__last) break; - _VSTD::iter_swap(__first, __last); + std::iter_swap(__first, __last); ++__first; } } @@ -40,7 +40,7 @@ { if (__first != __last) for (; __first < --__last; ++__first) - _VSTD::iter_swap(__first, __last); + std::iter_swap(__first, __last); } template @@ -48,7 +48,7 @@ void reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) { - _VSTD::__reverse(__first, __last, typename iterator_traits<_BidirectionalIterator>::iterator_category()); + std::__reverse(__first, __last, typename iterator_traits<_BidirectionalIterator>::iterator_category()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/rotate.h b/libcxx/include/__algorithm/rotate.h --- a/libcxx/include/__algorithm/rotate.h +++ b/libcxx/include/__algorithm/rotate.h @@ -30,9 +30,9 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type value_type; - value_type __tmp = _VSTD::move(*__first); - _ForwardIterator __lm1 = _VSTD::move(_VSTD::next(__first), __last, __first); - *__lm1 = _VSTD::move(__tmp); + value_type __tmp = std::move(*__first); + _ForwardIterator __lm1 = std::move(std::next(__first), __last, __first); + *__lm1 = std::move(__tmp); return __lm1; } @@ -41,10 +41,10 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last) { typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; - _BidirectionalIterator __lm1 = _VSTD::prev(__last); - value_type __tmp = _VSTD::move(*__lm1); - _BidirectionalIterator __fp1 = _VSTD::move_backward(__first, __lm1, __last); - *__first = _VSTD::move(__tmp); + _BidirectionalIterator __lm1 = std::prev(__last); + value_type __tmp = std::move(*__lm1); + _BidirectionalIterator __fp1 = std::move_backward(__first, __lm1, __last); + *__first = std::move(__tmp); return __fp1; } @@ -108,18 +108,18 @@ const difference_type __m2 = __last - __middle; if (__m1 == __m2) { - _VSTD::swap_ranges(__first, __middle, __middle); + std::swap_ranges(__first, __middle, __middle); return __middle; } - const difference_type __g = _VSTD::__algo_gcd(__m1, __m2); + const difference_type __g = std::__algo_gcd(__m1, __m2); for (_RandomAccessIterator __p = __first + __g; __p != __first;) { - value_type __t(_VSTD::move(*--__p)); + value_type __t(std::move(*--__p)); _RandomAccessIterator __p1 = __p; _RandomAccessIterator __p2 = __p1 + __m1; do { - *__p1 = _VSTD::move(*__p2); + *__p1 = std::move(*__p2); __p1 = __p2; const difference_type __d = __last - __p2; if (__m1 < __d) @@ -127,7 +127,7 @@ else __p2 = __first + (__m1 - __d); } while (__p2 != __p); - *__p1 = _VSTD::move(__t); + *__p1 = std::move(__t); } return __first + __m2; } @@ -136,15 +136,15 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator __rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, - _VSTD::forward_iterator_tag) + std::forward_iterator_tag) { typedef typename iterator_traits<_ForwardIterator>::value_type value_type; if (is_trivially_move_assignable::value) { - if (_VSTD::next(__first) == __middle) - return _VSTD::__rotate_left(__first, __last); + if (std::next(__first) == __middle) + return std::__rotate_left(__first, __last); } - return _VSTD::__rotate_forward(__first, __middle, __last); + return std::__rotate_forward(__first, __middle, __last); } template @@ -156,12 +156,12 @@ typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; if (is_trivially_move_assignable::value) { - if (_VSTD::next(__first) == __middle) - return _VSTD::__rotate_left(__first, __last); - if (_VSTD::next(__middle) == __last) - return _VSTD::__rotate_right(__first, __last); + if (std::next(__first) == __middle) + return std::__rotate_left(__first, __last); + if (std::next(__middle) == __last) + return std::__rotate_right(__first, __last); } - return _VSTD::__rotate_forward(__first, __middle, __last); + return std::__rotate_forward(__first, __middle, __last); } template @@ -173,13 +173,13 @@ typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; if (is_trivially_move_assignable::value) { - if (_VSTD::next(__first) == __middle) - return _VSTD::__rotate_left(__first, __last); - if (_VSTD::next(__middle) == __last) - return _VSTD::__rotate_right(__first, __last); - return _VSTD::__rotate_gcd(__first, __middle, __last); + if (std::next(__first) == __middle) + return std::__rotate_left(__first, __last); + if (std::next(__middle) == __last) + return std::__rotate_right(__first, __last); + return std::__rotate_gcd(__first, __middle, __last); } - return _VSTD::__rotate_forward(__first, __middle, __last); + return std::__rotate_forward(__first, __middle, __last); } template @@ -191,7 +191,7 @@ return __last; if (__middle == __last) return __first; - return _VSTD::__rotate(__first, __middle, __last, + return std::__rotate(__first, __middle, __last, typename iterator_traits<_ForwardIterator>::iterator_category()); } diff --git a/libcxx/include/__algorithm/rotate_copy.h b/libcxx/include/__algorithm/rotate_copy.h --- a/libcxx/include/__algorithm/rotate_copy.h +++ b/libcxx/include/__algorithm/rotate_copy.h @@ -23,7 +23,7 @@ _OutputIterator rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result) { - return _VSTD::copy(__first, __middle, _VSTD::copy(__middle, __last, __result)); + return std::copy(__first, __middle, std::copy(__middle, __last, __result)); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/sample.h b/libcxx/include/__algorithm/sample.h --- a/libcxx/include/__algorithm/sample.h +++ b/libcxx/include/__algorithm/sample.h @@ -42,7 +42,7 @@ if (__r < __sz) __output_iter[__r] = *__first; } - return __output_iter + _VSTD::min(__n, __k); + return __output_iter + std::min(__n, __k); } template (0, --__unsampled_sz)(__g); if (__r < __n) { *__output_iter++ = *__first; @@ -79,7 +79,7 @@ "SampleIterator must meet the requirements of RandomAccessIterator"); typedef typename common_type<_Distance, _Difference>::type _CommonType; _LIBCPP_ASSERT(__n >= 0, "N must be a positive number."); - return _VSTD::__sample( + return std::__sample( __first, __last, __output_iter, _CommonType(__n), __g, _PopCategory()); } @@ -91,7 +91,7 @@ _SampleIterator sample(_PopulationIterator __first, _PopulationIterator __last, _SampleIterator __output_iter, _Distance __n, _UniformRandomNumberGenerator&& __g) { - return _VSTD::__sample(__first, __last, __output_iter, __n, __g); + return std::__sample(__first, __last, __output_iter, __n, __g); } #endif // _LIBCPP_STD_VER > 14 diff --git a/libcxx/include/__algorithm/search.h b/libcxx/include/__algorithm/search.h --- a/libcxx/include/__algorithm/search.h +++ b/libcxx/include/__algorithm/search.h @@ -27,12 +27,12 @@ _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred, forward_iterator_tag, forward_iterator_tag) { if (__first2 == __last2) - return _VSTD::make_pair(__first1, __first1); // Everything matches an empty sequence + return std::make_pair(__first1, __first1); // Everything matches an empty sequence while (true) { // Find first element in sequence 1 that matchs *__first2, with a mininum of loop checks while (true) { if (__first1 == __last1) // return __last1 if no element matches *__first2 - return _VSTD::make_pair(__last1, __last1); + return std::make_pair(__last1, __last1); if (__pred(*__first1, *__first2)) break; ++__first1; @@ -42,9 +42,9 @@ _ForwardIterator2 __m2 = __first2; while (true) { if (++__m2 == __last2) // If pattern exhausted, __first1 is the answer (works for 1 element pattern) - return _VSTD::make_pair(__first1, __m1); + return std::make_pair(__first1, __m1); if (++__m1 == __last1) // Otherwise if source exhaused, pattern not found - return _VSTD::make_pair(__last1, __last1); + return std::make_pair(__last1, __last1); if (!__pred(*__m1, *__m2)) // if there is a mismatch, restart with a new __first1 { ++__first1; @@ -64,16 +64,16 @@ // Take advantage of knowing source and pattern lengths. Stop short when source is smaller than pattern const _D2 __len2 = __last2 - __first2; if (__len2 == 0) - return _VSTD::make_pair(__first1, __first1); + return std::make_pair(__first1, __first1); const _D1 __len1 = __last1 - __first1; if (__len1 < __len2) - return _VSTD::make_pair(__last1, __last1); + return std::make_pair(__last1, __last1); const _RandomAccessIterator1 __s = __last1 - _D1(__len2 - 1); // Start of pattern match can't go beyond here while (true) { while (true) { if (__first1 == __s) - return _VSTD::make_pair(__last1, __last1); + return std::make_pair(__last1, __last1); if (__pred(*__first1, *__first2)) break; ++__first1; @@ -83,7 +83,7 @@ _RandomAccessIterator2 __m2 = __first2; while (true) { if (++__m2 == __last2) - return _VSTD::make_pair(__first1, __first1 + _D1(__len2)); + return std::make_pair(__first1, __first1 + _D1(__len2)); ++__m1; // no need to check range on __m1 because __s guarantees we have enough source if (!__pred(*__m1, *__m2)) { ++__first1; @@ -97,7 +97,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) { - return _VSTD::__search<_BinaryPredicate&>( + return std::__search<_BinaryPredicate&>( __first1, __last1, __first2, __last2, __pred, typename iterator_traits<_ForwardIterator1>::iterator_category(), typename iterator_traits<_ForwardIterator2>::iterator_category()).first; @@ -108,7 +108,7 @@ search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { typedef typename iterator_traits<_ForwardIterator1>::value_type __v1; typedef typename iterator_traits<_ForwardIterator2>::value_type __v2; - return _VSTD::search(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>()); + return std::search(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>()); } #if _LIBCPP_STD_VER > 14 diff --git a/libcxx/include/__algorithm/search_n.h b/libcxx/include/__algorithm/search_n.h --- a/libcxx/include/__algorithm/search_n.h +++ b/libcxx/include/__algorithm/search_n.h @@ -95,8 +95,8 @@ template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator search_n( _ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value_, _BinaryPredicate __pred) { - return _VSTD::__search_n<_BinaryPredicate&>( - __first, __last, _VSTD::__convert_to_integral(__count), __value_, __pred, + return std::__search_n<_BinaryPredicate&>( + __first, __last, std::__convert_to_integral(__count), __value_, __pred, typename iterator_traits<_ForwardIterator>::iterator_category()); } @@ -104,7 +104,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value_) { typedef typename iterator_traits<_ForwardIterator>::value_type __v; - return _VSTD::search_n(__first, __last, _VSTD::__convert_to_integral(__count), __value_, __equal_to<__v, _Tp>()); + return std::search_n(__first, __last, std::__convert_to_integral(__count), __value_, __equal_to<__v, _Tp>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/set_difference.h b/libcxx/include/__algorithm/set_difference.h --- a/libcxx/include/__algorithm/set_difference.h +++ b/libcxx/include/__algorithm/set_difference.h @@ -29,7 +29,7 @@ while (__first1 != __last1) { if (__first2 == __last2) - return _VSTD::copy(__first1, __last1, __result); + return std::copy(__first1, __last1, __result); if (__comp(*__first1, *__first2)) { *__result = *__first1; @@ -53,7 +53,7 @@ _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); + return std::__set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); } template @@ -62,7 +62,7 @@ set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { - return _VSTD::set_difference(__first1, __last1, __first2, __last2, __result, + return std::set_difference(__first1, __last1, __first2, __last2, __result, __less::value_type, typename iterator_traits<_InputIterator2>::value_type>()); } diff --git a/libcxx/include/__algorithm/set_intersection.h b/libcxx/include/__algorithm/set_intersection.h --- a/libcxx/include/__algorithm/set_intersection.h +++ b/libcxx/include/__algorithm/set_intersection.h @@ -50,7 +50,7 @@ _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); + return std::__set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); } template @@ -59,7 +59,7 @@ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { - return _VSTD::set_intersection(__first1, __last1, __first2, __last2, __result, + return std::set_intersection(__first1, __last1, __first2, __last2, __result, __less::value_type, typename iterator_traits<_InputIterator2>::value_type>()); } diff --git a/libcxx/include/__algorithm/set_symmetric_difference.h b/libcxx/include/__algorithm/set_symmetric_difference.h --- a/libcxx/include/__algorithm/set_symmetric_difference.h +++ b/libcxx/include/__algorithm/set_symmetric_difference.h @@ -29,7 +29,7 @@ while (__first1 != __last1) { if (__first2 == __last2) - return _VSTD::copy(__first1, __last1, __result); + return std::copy(__first1, __last1, __result); if (__comp(*__first1, *__first2)) { *__result = *__first1; @@ -48,7 +48,7 @@ ++__first2; } } - return _VSTD::copy(__first2, __last2, __result); + return std::copy(__first2, __last2, __result); } template @@ -58,7 +58,7 @@ _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); + return std::__set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); } template @@ -67,7 +67,7 @@ set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { - return _VSTD::set_symmetric_difference(__first1, __last1, __first2, __last2, __result, + return std::set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __less::value_type, typename iterator_traits<_InputIterator2>::value_type>()); } diff --git a/libcxx/include/__algorithm/set_union.h b/libcxx/include/__algorithm/set_union.h --- a/libcxx/include/__algorithm/set_union.h +++ b/libcxx/include/__algorithm/set_union.h @@ -29,7 +29,7 @@ for (; __first1 != __last1; ++__result) { if (__first2 == __last2) - return _VSTD::copy(__first1, __last1, __result); + return std::copy(__first1, __last1, __result); if (__comp(*__first2, *__first1)) { *__result = *__first2; @@ -43,7 +43,7 @@ ++__first1; } } - return _VSTD::copy(__first2, __last2, __result); + return std::copy(__first2, __last2, __result); } template @@ -53,7 +53,7 @@ _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - return _VSTD::__set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); + return std::__set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp); } template @@ -62,7 +62,7 @@ set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { - return _VSTD::set_union(__first1, __last1, __first2, __last2, __result, + return std::set_union(__first1, __last1, __first2, __last2, __result, __less::value_type, typename iterator_traits<_InputIterator2>::value_type>()); } diff --git a/libcxx/include/__algorithm/shift_left.h b/libcxx/include/__algorithm/shift_left.h --- a/libcxx/include/__algorithm/shift_left.h +++ b/libcxx/include/__algorithm/shift_left.h @@ -46,7 +46,7 @@ ++__m; } } - return _VSTD::move(__m, __last, __first); + return std::move(__m, __last, __first); } #endif // _LIBCPP_STD_VER > 17 diff --git a/libcxx/include/__algorithm/shift_right.h b/libcxx/include/__algorithm/shift_right.h --- a/libcxx/include/__algorithm/shift_right.h +++ b/libcxx/include/__algorithm/shift_right.h @@ -41,7 +41,7 @@ return __last; } _ForwardIterator __m = __first + (__d - __n); - return _VSTD::move_backward(__first, __m, __last); + return std::move_backward(__first, __m, __last); } else if constexpr (__is_cpp17_bidirectional_iterator<_ForwardIterator>::value) { _ForwardIterator __m = __last; for (; __n > 0; --__n) { @@ -50,7 +50,7 @@ } --__m; } - return _VSTD::move_backward(__first, __m, __last); + return std::move_backward(__first, __m, __last); } else { _ForwardIterator __ret = __first; for (; __n > 0; --__n) { @@ -70,7 +70,7 @@ auto __lead = __ret; while (__trail != __ret) { if (__lead == __last) { - _VSTD::move(__first, __trail, __ret); + std::move(__first, __trail, __ret); return __ret; } ++__trail; @@ -80,8 +80,8 @@ _ForwardIterator __mid = __first; while (true) { if (__lead == __last) { - __trail = _VSTD::move(__mid, __ret, __trail); - _VSTD::move(__first, __mid, __trail); + __trail = std::move(__mid, __ret, __trail); + std::move(__first, __mid, __trail); return __ret; } swap(*__mid, *__trail); diff --git a/libcxx/include/__algorithm/sift_down.h b/libcxx/include/__algorithm/sift_down.h --- a/libcxx/include/__algorithm/sift_down.h +++ b/libcxx/include/__algorithm/sift_down.h @@ -48,11 +48,11 @@ // we are, __start is larger than its largest child return; - value_type __top(_VSTD::move(*__start)); + value_type __top(std::move(*__start)); do { // we are not in heap-order, swap the parent with its largest child - *__start = _VSTD::move(*__child_i); + *__start = std::move(*__child_i); __start = __child_i; if ((__len - 2) / 2 < __child) @@ -70,7 +70,7 @@ // check if we are in heap-order } while (!__comp(*__child_i, __top)); - *__start = _VSTD::move(__top); + *__start = std::move(__top); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h --- a/libcxx/include/__algorithm/sort.h +++ b/libcxx/include/__algorithm/sort.h @@ -72,7 +72,7 @@ __sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4, _Compare __c) { - unsigned __r = _VSTD::__sort3<_Compare>(__x1, __x2, __x3, __c); + unsigned __r = std::__sort3<_Compare>(__x1, __x2, __x3, __c); if (__c(*__x4, *__x3)) { swap(*__x3, *__x4); @@ -99,7 +99,7 @@ __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4, _ForwardIterator __x5, _Compare __c) { - unsigned __r = _VSTD::__sort4<_Compare>(__x1, __x2, __x3, __x4, __c); + unsigned __r = std::__sort4<_Compare>(__x1, __x2, __x3, __x4, __c); if (__c(*__x5, *__x4)) { swap(*__x4, *__x5); @@ -131,7 +131,7 @@ _BidirectionalIterator __lm1 = __last; for (--__lm1; __first != __lm1; ++__first) { - _BidirectionalIterator __i = _VSTD::min_element(__first, __last, __comp); + _BidirectionalIterator __i = std::min_element(__first, __last, __comp); if (__i != __first) swap(*__first, *__i); } @@ -148,10 +148,10 @@ for (++__i; __i != __last; ++__i) { _BidirectionalIterator __j = __i; - value_type __t(_VSTD::move(*__j)); + value_type __t(std::move(*__j)); for (_BidirectionalIterator __k = __i; __k != __first && __comp(__t, *--__k); --__j) - *__j = _VSTD::move(*__k); - *__j = _VSTD::move(__t); + *__j = std::move(*__k); + *__j = std::move(__t); } } } @@ -163,20 +163,20 @@ typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; _RandomAccessIterator __j = __first+difference_type(2); - _VSTD::__sort3<_Compare>(__first, __first+difference_type(1), __j, __comp); + std::__sort3<_Compare>(__first, __first+difference_type(1), __j, __comp); for (_RandomAccessIterator __i = __j+difference_type(1); __i != __last; ++__i) { if (__comp(*__i, *__j)) { - value_type __t(_VSTD::move(*__i)); + value_type __t(std::move(*__i)); _RandomAccessIterator __k = __j; __j = __i; do { - *__j = _VSTD::move(*__k); + *__j = std::move(*__k); __j = __k; } while (__j != __first && __comp(__t, *--__k)); - *__j = _VSTD::move(__t); + *__j = std::move(__t); } __j = __i; } @@ -197,33 +197,33 @@ swap(*__first, *__last); return true; case 3: - _VSTD::__sort3<_Compare>(__first, __first+difference_type(1), --__last, __comp); + std::__sort3<_Compare>(__first, __first+difference_type(1), --__last, __comp); return true; case 4: - _VSTD::__sort4<_Compare>(__first, __first+difference_type(1), __first+difference_type(2), --__last, __comp); + std::__sort4<_Compare>(__first, __first+difference_type(1), __first+difference_type(2), --__last, __comp); return true; case 5: - _VSTD::__sort5<_Compare>(__first, __first+difference_type(1), __first+difference_type(2), __first+difference_type(3), --__last, __comp); + std::__sort5<_Compare>(__first, __first+difference_type(1), __first+difference_type(2), __first+difference_type(3), --__last, __comp); return true; } typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; _RandomAccessIterator __j = __first+difference_type(2); - _VSTD::__sort3<_Compare>(__first, __first+difference_type(1), __j, __comp); + std::__sort3<_Compare>(__first, __first+difference_type(1), __j, __comp); const unsigned __limit = 8; unsigned __count = 0; for (_RandomAccessIterator __i = __j+difference_type(1); __i != __last; ++__i) { if (__comp(*__i, *__j)) { - value_type __t(_VSTD::move(*__i)); + value_type __t(std::move(*__i)); _RandomAccessIterator __k = __j; __j = __i; do { - *__j = _VSTD::move(*__k); + *__j = std::move(*__k); __j = __k; } while (__j != __first && __comp(__t, *--__k)); - *__j = _VSTD::move(__t); + *__j = std::move(__t); if (++__count == __limit) return ++__i == __last; } @@ -243,7 +243,7 @@ __destruct_n __d(0); unique_ptr __h(__first2, __d); value_type* __last2 = __first2; - ::new ((void*)__last2) value_type(_VSTD::move(*__first1)); + ::new ((void*)__last2) value_type(std::move(*__first1)); __d.template __incr(); for (++__last2; ++__first1 != __last1; ++__last2) { @@ -251,15 +251,15 @@ value_type* __i2 = __j2; if (__comp(*__first1, *--__i2)) { - ::new ((void*)__j2) value_type(_VSTD::move(*__i2)); + ::new ((void*)__j2) value_type(std::move(*__i2)); __d.template __incr(); for (--__j2; __i2 != __first2 && __comp(*__first1, *--__i2); --__j2) - *__j2 = _VSTD::move(*__i2); - *__j2 = _VSTD::move(*__first1); + *__j2 = std::move(*__i2); + *__j2 = std::move(*__first1); } else { - ::new ((void*)__j2) value_type(_VSTD::move(*__first1)); + ::new ((void*)__j2) value_type(std::move(*__first1)); __d.template __incr(); } } @@ -290,25 +290,25 @@ swap(*__first, *__last); return; case 3: - _VSTD::__sort3<_Compare>(__first, __first+difference_type(1), --__last, __comp); + std::__sort3<_Compare>(__first, __first+difference_type(1), --__last, __comp); return; case 4: - _VSTD::__sort4<_Compare>(__first, __first+difference_type(1), __first+difference_type(2), --__last, __comp); + std::__sort4<_Compare>(__first, __first+difference_type(1), __first+difference_type(2), --__last, __comp); return; case 5: - _VSTD::__sort5<_Compare>(__first, __first+difference_type(1), __first+difference_type(2), __first+difference_type(3), --__last, __comp); + std::__sort5<_Compare>(__first, __first+difference_type(1), __first+difference_type(2), __first+difference_type(3), --__last, __comp); return; } if (__len <= __limit) { - _VSTD::__insertion_sort_3<_Compare>(__first, __last, __comp); + std::__insertion_sort_3<_Compare>(__first, __last, __comp); return; } // __len > 5 if (__depth == 0) { // Fallback to heap sort as Introsort suggests. - _VSTD::__partial_sort<_Compare>(__first, __last, __last, __comp); + std::__partial_sort<_Compare>(__first, __last, __last, __comp); return; } --__depth; @@ -323,13 +323,13 @@ __delta = __len/2; __m += __delta; __delta /= 2; - __n_swaps = _VSTD::__sort5<_Compare>(__first, __first + __delta, __m, __m+__delta, __lm1, __comp); + __n_swaps = std::__sort5<_Compare>(__first, __first + __delta, __m, __m+__delta, __lm1, __comp); } else { __delta = __len/2; __m += __delta; - __n_swaps = _VSTD::__sort3<_Compare>(__first, __m, __lm1, __comp); + __n_swaps = std::__sort3<_Compare>(__first, __m, __lm1, __comp); } } // *__m is median @@ -385,7 +385,7 @@ } // [__first, __i) == *__first and *__first < [__i, __last) // The first part is sorted, sort the second part - // _VSTD::__sort<_Compare>(__i, __last, __comp); + // std::__sort<_Compare>(__i, __last, __comp); __first = __i; goto __restart; } @@ -434,8 +434,8 @@ // If we were given a perfect partition, see if insertion sort is quick... if (__n_swaps == 0) { - bool __fs = _VSTD::__insertion_sort_incomplete<_Compare>(__first, __i, __comp); - if (_VSTD::__insertion_sort_incomplete<_Compare>(__i+difference_type(1), __last, __comp)) + bool __fs = std::__insertion_sort_incomplete<_Compare>(__first, __i, __comp); + if (std::__insertion_sort_incomplete<_Compare>(__i+difference_type(1), __last, __comp)) { if (__fs) return; @@ -454,12 +454,12 @@ // sort smaller range with recursive call and larger with tail recursion elimination if (__i - __first < __last - __i) { - _VSTD::__introsort<_Compare>(__first, __i, __comp, __depth); + std::__introsort<_Compare>(__first, __i, __comp, __depth); __first = ++__i; } else { - _VSTD::__introsort<_Compare>(__i + difference_type(1), __last, __comp, __depth); + std::__introsort<_Compare>(__i + difference_type(1), __last, __comp, __depth); __last = __i; } } @@ -479,7 +479,7 @@ void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; difference_type __depth_limit = 2 * __log2i(__last - __first); - _VSTD::__introsort<_Compare>(__first, __last, __comp, __depth_limit); + std::__introsort<_Compare>(__first, __last, __comp, __depth_limit); } template @@ -488,7 +488,7 @@ __sort(_Tp** __first, _Tp** __last, __less<_Tp*>&) { __less __comp; - _VSTD::__sort<__less&, uintptr_t*>((uintptr_t*)__first, (uintptr_t*)__last, __comp); + std::__sort<__less&, uintptr_t*>((uintptr_t*)__first, (uintptr_t*)__last, __comp); } _LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void __sort<__less&, char*>(char*, char*, __less&)) @@ -537,9 +537,9 @@ _LIBCPP_DEBUG_RANDOMIZE_RANGE(__first, __last); typedef typename __comp_ref_type<_Compare>::type _Comp_ref; if (__libcpp_is_constant_evaluated()) { - _VSTD::__partial_sort<_Comp_ref>(__first, __last, __last, _Comp_ref(__comp)); + std::__partial_sort<_Comp_ref>(__first, __last, __last, _Comp_ref(__comp)); } else { - _VSTD::__sort<_Comp_ref>(_VSTD::__unwrap_iter(__first), _VSTD::__unwrap_iter(__last), _Comp_ref(__comp)); + std::__sort<_Comp_ref>(std::__unwrap_iter(__first), std::__unwrap_iter(__last), _Comp_ref(__comp)); } } @@ -548,7 +548,7 @@ void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { - _VSTD::sort(__first, __last, __less::value_type>()); + std::sort(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/sort_heap.h b/libcxx/include/__algorithm/sort_heap.h --- a/libcxx/include/__algorithm/sort_heap.h +++ b/libcxx/include/__algorithm/sort_heap.h @@ -28,7 +28,7 @@ { typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; for (difference_type __n = __last - __first; __n > 1; --__last, (void) --__n) - _VSTD::__pop_heap<_Compare>(__first, __last, __comp, __n); + std::__pop_heap<_Compare>(__first, __last, __comp, __n); } template @@ -37,7 +37,7 @@ sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - _VSTD::__sort_heap<_Comp_ref>(__first, __last, __comp); + std::__sort_heap<_Comp_ref>(__first, __last, __comp); } template @@ -45,7 +45,7 @@ void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { - _VSTD::sort_heap(__first, __last, __less::value_type>()); + std::sort_heap(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/stable_partition.h b/libcxx/include/__algorithm/stable_partition.h --- a/libcxx/include/__algorithm/stable_partition.h +++ b/libcxx/include/__algorithm/stable_partition.h @@ -48,7 +48,7 @@ // Move the falses into the temporary buffer, and the trues to the front of the line // Update __first to always point to the end of the trues value_type* __t = __p.first; - ::new ((void*)__t) value_type(_VSTD::move(*__first)); + ::new ((void*)__t) value_type(std::move(*__first)); __d.template __incr(); ++__t; _ForwardIterator __i = __first; @@ -56,12 +56,12 @@ { if (__pred(*__i)) { - *__first = _VSTD::move(*__i); + *__first = std::move(*__i); ++__first; } else { - ::new ((void*)__t) value_type(_VSTD::move(*__i)); + ::new ((void*)__t) value_type(std::move(*__i)); __d.template __incr(); ++__t; } @@ -70,7 +70,7 @@ // Move falses back into range, but don't mess up __first which points to first false __i = __first; for (value_type* __t2 = __p.first; __t2 < __t; ++__t2, (void) ++__i) - *__i = _VSTD::move(*__t2); + *__i = std::move(*__t2); // __h destructs moved-from values out of the temp buffer, but doesn't deallocate buffer return __first; } @@ -78,11 +78,11 @@ // __len >= 3 _ForwardIterator __m = __first; _Distance __len2 = __len / 2; // __len2 >= 2 - _VSTD::advance(__m, __len2); + std::advance(__m, __len2); // recurse on [__first, __m), *__first know to be false // F????????????????? // f m l - _ForwardIterator __first_false = _VSTD::__stable_partition<_Predicate&>(__first, __m, __pred, __len2, __p, __fit); + _ForwardIterator __first_false = std::__stable_partition<_Predicate&>(__first, __m, __pred, __len2, __p, __fit); // TTTFFFFF?????????? // f ff m l // recurse on [__m, __last], except increase __m until *(__m) is false, *__last know to be true @@ -97,11 +97,11 @@ } // TTTFFFFFTTTF?????? // f ff m m1 l - __second_false = _VSTD::__stable_partition<_Predicate&>(__m1, __last, __pred, __len_half, __p, __fit); + __second_false = std::__stable_partition<_Predicate&>(__m1, __last, __pred, __len_half, __p, __fit); __second_half_done: // TTTFFFFFTTTTTFFFFF // f ff m sf l - return _VSTD::rotate(__first_false, __m, __second_false); + return std::rotate(__first_false, __m, __second_false); // TTTTTTTTFFFFFFFFFF // | } @@ -125,15 +125,15 @@ // *__first is known to be false typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type; typedef typename iterator_traits<_ForwardIterator>::value_type value_type; - difference_type __len = _VSTD::distance(__first, __last); + difference_type __len = std::distance(__first, __last); pair __p(0, 0); unique_ptr __h; if (__len >= __alloc_limit) { - __p = _VSTD::get_temporary_buffer(__len); + __p = std::get_temporary_buffer(__len); __h.reset(__p.first); } - return _VSTD::__stable_partition<_Predicate&>(__first, __last, __pred, __len, __p, forward_iterator_tag()); + return std::__stable_partition<_Predicate&>(__first, __last, __pred, __len, __p, forward_iterator_tag()); } template @@ -170,7 +170,7 @@ // Move the falses into the temporary buffer, and the trues to the front of the line // Update __first to always point to the end of the trues value_type* __t = __p.first; - ::new ((void*)__t) value_type(_VSTD::move(*__first)); + ::new ((void*)__t) value_type(std::move(*__first)); __d.template __incr(); ++__t; _BidirectionalIterator __i = __first; @@ -178,23 +178,23 @@ { if (__pred(*__i)) { - *__first = _VSTD::move(*__i); + *__first = std::move(*__i); ++__first; } else { - ::new ((void*)__t) value_type(_VSTD::move(*__i)); + ::new ((void*)__t) value_type(std::move(*__i)); __d.template __incr(); ++__t; } } // move *__last, known to be true - *__first = _VSTD::move(*__i); + *__first = std::move(*__i); __i = ++__first; // All trues now at start of range, all falses in buffer // Move falses back into range, but don't mess up __first which points to first false for (value_type* __t2 = __p.first; __t2 < __t; ++__t2, (void) ++__i) - *__i = _VSTD::move(*__t2); + *__i = std::move(*__t2); // __h destructs moved-from values out of the temp buffer, but doesn't deallocate buffer return __first; } @@ -202,7 +202,7 @@ // __len >= 4 _BidirectionalIterator __m = __first; _Distance __len2 = __len / 2; // __len2 >= 2 - _VSTD::advance(__m, __len2); + std::advance(__m, __len2); // recurse on [__first, __m-1], except reduce __m-1 until *(__m-1) is true, *__first know to be false // F????????????????T // f m l @@ -217,7 +217,7 @@ } // F???TFFF?????????T // f m1 m l - __first_false = _VSTD::__stable_partition<_Predicate&>(__first, __m1, __pred, __len_half, __p, __bit); + __first_false = std::__stable_partition<_Predicate&>(__first, __m1, __pred, __len_half, __p, __bit); __first_half_done: // TTTFFFFF?????????T // f ff m l @@ -234,11 +234,11 @@ } // TTTFFFFFTTTF?????T // f ff m m1 l - __second_false = _VSTD::__stable_partition<_Predicate&>(__m1, __last, __pred, __len_half, __p, __bit); + __second_false = std::__stable_partition<_Predicate&>(__m1, __last, __pred, __len_half, __p, __bit); __second_half_done: // TTTFFFFFTTTTTFFFFF // f ff m sf l - return _VSTD::rotate(__first_false, __m, __second_false); + return std::rotate(__first_false, __m, __second_false); // TTTTTTTTFFFFFFFFFF // | } @@ -271,15 +271,15 @@ // *__first is known to be false // *__last is known to be true // __len >= 2 - difference_type __len = _VSTD::distance(__first, __last) + 1; + difference_type __len = std::distance(__first, __last) + 1; pair __p(0, 0); unique_ptr __h; if (__len >= __alloc_limit) { - __p = _VSTD::get_temporary_buffer(__len); + __p = std::get_temporary_buffer(__len); __h.reset(__p.first); } - return _VSTD::__stable_partition<_Predicate&>(__first, __last, __pred, __len, __p, bidirectional_iterator_tag()); + return std::__stable_partition<_Predicate&>(__first, __last, __pred, __len, __p, bidirectional_iterator_tag()); } template @@ -287,7 +287,7 @@ _ForwardIterator stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { - return _VSTD::__stable_partition<_Predicate&>(__first, __last, __pred, typename iterator_traits<_ForwardIterator>::iterator_category()); + return std::__stable_partition<_Predicate&>(__first, __last, __pred, typename iterator_traits<_ForwardIterator>::iterator_category()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/stable_sort.h b/libcxx/include/__algorithm/stable_sort.h --- a/libcxx/include/__algorithm/stable_sort.h +++ b/libcxx/include/__algorithm/stable_sort.h @@ -39,26 +39,26 @@ if (__first1 == __last1) { for (; __first2 != __last2; ++__first2, (void) ++__result, __d.template __incr()) - ::new ((void*)__result) value_type(_VSTD::move(*__first2)); + ::new ((void*)__result) value_type(std::move(*__first2)); __h.release(); return; } if (__first2 == __last2) { for (; __first1 != __last1; ++__first1, (void) ++__result, __d.template __incr()) - ::new ((void*)__result) value_type(_VSTD::move(*__first1)); + ::new ((void*)__result) value_type(std::move(*__first1)); __h.release(); return; } if (__comp(*__first2, *__first1)) { - ::new ((void*)__result) value_type(_VSTD::move(*__first2)); + ::new ((void*)__result) value_type(std::move(*__first2)); __d.template __incr(); ++__first2; } else { - ::new ((void*)__result) value_type(_VSTD::move(*__first1)); + ::new ((void*)__result) value_type(std::move(*__first1)); __d.template __incr(); ++__first1; } @@ -76,22 +76,22 @@ if (__first2 == __last2) { for (; __first1 != __last1; ++__first1, (void) ++__result) - *__result = _VSTD::move(*__first1); + *__result = std::move(*__first1); return; } if (__comp(*__first2, *__first1)) { - *__result = _VSTD::move(*__first2); + *__result = std::move(*__first2); ++__first2; } else { - *__result = _VSTD::move(*__first1); + *__result = std::move(*__first1); ++__first1; } } for (; __first2 != __last2; ++__first2, (void) ++__result) - *__result = _VSTD::move(*__first2); + *__result = std::move(*__first2); } template @@ -112,38 +112,38 @@ case 0: return; case 1: - ::new ((void*)__first2) value_type(_VSTD::move(*__first1)); + ::new ((void*)__first2) value_type(std::move(*__first1)); return; case 2: __destruct_n __d(0); unique_ptr __h2(__first2, __d); if (__comp(*--__last1, *__first1)) { - ::new ((void*)__first2) value_type(_VSTD::move(*__last1)); + ::new ((void*)__first2) value_type(std::move(*__last1)); __d.template __incr(); ++__first2; - ::new ((void*)__first2) value_type(_VSTD::move(*__first1)); + ::new ((void*)__first2) value_type(std::move(*__first1)); } else { - ::new ((void*)__first2) value_type(_VSTD::move(*__first1)); + ::new ((void*)__first2) value_type(std::move(*__first1)); __d.template __incr(); ++__first2; - ::new ((void*)__first2) value_type(_VSTD::move(*__last1)); + ::new ((void*)__first2) value_type(std::move(*__last1)); } __h2.release(); return; } if (__len <= 8) { - _VSTD::__insertion_sort_move<_Compare>(__first1, __last1, __first2, __comp); + std::__insertion_sort_move<_Compare>(__first1, __last1, __first2, __comp); return; } typename iterator_traits<_RandomAccessIterator>::difference_type __l2 = __len / 2; _RandomAccessIterator __m = __first1 + __l2; - _VSTD::__stable_sort<_Compare>(__first1, __m, __comp, __l2, __first2, __l2); - _VSTD::__stable_sort<_Compare>(__m, __last1, __comp, __len - __l2, __first2 + __l2, __len - __l2); - _VSTD::__merge_move_construct<_Compare>(__first1, __m, __m, __last1, __first2, __comp); + std::__stable_sort<_Compare>(__first1, __m, __comp, __l2, __first2, __l2); + std::__stable_sort<_Compare>(__m, __last1, __comp, __len - __l2, __first2 + __l2, __len - __l2); + std::__merge_move_construct<_Compare>(__first1, __m, __m, __last1, __first2, __comp); } template @@ -172,7 +172,7 @@ } if (__len <= static_cast(__stable_sort_switch::value)) { - _VSTD::__insertion_sort<_Compare>(__first, __last, __comp); + std::__insertion_sort<_Compare>(__first, __last, __comp); return; } typename iterator_traits<_RandomAccessIterator>::difference_type __l2 = __len / 2; @@ -181,21 +181,21 @@ { __destruct_n __d(0); unique_ptr __h2(__buff, __d); - _VSTD::__stable_sort_move<_Compare>(__first, __m, __comp, __l2, __buff); + std::__stable_sort_move<_Compare>(__first, __m, __comp, __l2, __buff); __d.__set(__l2, (value_type*)nullptr); - _VSTD::__stable_sort_move<_Compare>(__m, __last, __comp, __len - __l2, __buff + __l2); + std::__stable_sort_move<_Compare>(__m, __last, __comp, __len - __l2, __buff + __l2); __d.__set(__len, (value_type*)nullptr); - _VSTD::__merge_move_assign<_Compare>(__buff, __buff + __l2, __buff + __l2, __buff + __len, __first, __comp); -// _VSTD::__merge<_Compare>(move_iterator(__buff), + std::__merge_move_assign<_Compare>(__buff, __buff + __l2, __buff + __l2, __buff + __len, __first, __comp); +// std::__merge<_Compare>(move_iterator(__buff), // move_iterator(__buff + __l2), // move_iterator<_RandomAccessIterator>(__buff + __l2), // move_iterator<_RandomAccessIterator>(__buff + __len), // __first, __comp); return; } - _VSTD::__stable_sort<_Compare>(__first, __m, __comp, __l2, __buff, __buff_size); - _VSTD::__stable_sort<_Compare>(__m, __last, __comp, __len - __l2, __buff, __buff_size); - _VSTD::__inplace_merge<_Compare>(__first, __m, __last, __comp, __l2, __len - __l2, __buff, __buff_size); + std::__stable_sort<_Compare>(__first, __m, __comp, __l2, __buff, __buff_size); + std::__stable_sort<_Compare>(__m, __last, __comp, __len - __l2, __buff, __buff_size); + std::__inplace_merge<_Compare>(__first, __m, __last, __comp, __l2, __len - __l2, __buff, __buff_size); } template @@ -210,11 +210,11 @@ unique_ptr __h; if (__len > static_cast(__stable_sort_switch::value)) { - __buf = _VSTD::get_temporary_buffer(__len); + __buf = std::get_temporary_buffer(__len); __h.reset(__buf.first); } typedef typename __comp_ref_type<_Compare>::type _Comp_ref; - _VSTD::__stable_sort<_Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second); + std::__stable_sort<_Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second); } template @@ -222,7 +222,7 @@ void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { - _VSTD::stable_sort(__first, __last, __less::value_type>()); + std::stable_sort(__first, __last, __less::value_type>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/unique.h b/libcxx/include/__algorithm/unique.h --- a/libcxx/include/__algorithm/unique.h +++ b/libcxx/include/__algorithm/unique.h @@ -27,7 +27,7 @@ _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) { - __first = _VSTD::adjacent_find<_ForwardIterator, _BinaryPredicate&>(__first, __last, __pred); + __first = std::adjacent_find<_ForwardIterator, _BinaryPredicate&>(__first, __last, __pred); if (__first != __last) { // ... a a ? ... @@ -35,7 +35,7 @@ _ForwardIterator __i = __first; for (++__i; ++__i != __last;) if (!__pred(*__first, *__i)) - *++__first = _VSTD::move(*__i); + *++__first = std::move(*__i); ++__first; } return __first; @@ -48,7 +48,7 @@ unique(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type __v; - return _VSTD::unique(__first, __last, __equal_to<__v>()); + return std::unique(__first, __last, __equal_to<__v>()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/unique_copy.h b/libcxx/include/__algorithm/unique_copy.h --- a/libcxx/include/__algorithm/unique_copy.h +++ b/libcxx/include/__algorithm/unique_copy.h @@ -87,7 +87,7 @@ _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) { - return _VSTD::__unique_copy<_BinaryPredicate&>(__first, __last, __result, __pred, + return std::__unique_copy<_BinaryPredicate&>(__first, __last, __result, __pred, typename iterator_traits<_InputIterator>::iterator_category(), typename iterator_traits<_OutputIterator>::iterator_category()); } @@ -98,7 +98,7 @@ unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator>::value_type __v; - return _VSTD::unique_copy(__first, __last, __result, __equal_to<__v>()); + return std::unique_copy(__first, __last, __result, __equal_to<__v>()); } diff --git a/libcxx/include/__algorithm/unwrap_iter.h b/libcxx/include/__algorithm/unwrap_iter.h --- a/libcxx/include/__algorithm/unwrap_iter.h +++ b/libcxx/include/__algorithm/unwrap_iter.h @@ -47,9 +47,9 @@ template struct __unwrap_iter_impl<_Iter, true> { - static _LIBCPP_CONSTEXPR decltype(_VSTD::__to_address(declval<_Iter>())) + static _LIBCPP_CONSTEXPR decltype(std::__to_address(declval<_Iter>())) __apply(_Iter __i) _NOEXCEPT { - return _VSTD::__to_address(__i); + return std::__to_address(__i); } }; @@ -76,7 +76,7 @@ { // Precondition: __result is reachable from __first // Precondition: _OrigIter is a contiguous iterator - return __first + (__result - _VSTD::__unwrap_iter(__first)); + return __first + (__result - std::__unwrap_iter(__first)); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__algorithm/upper_bound.h b/libcxx/include/__algorithm/upper_bound.h --- a/libcxx/include/__algorithm/upper_bound.h +++ b/libcxx/include/__algorithm/upper_bound.h @@ -25,12 +25,12 @@ __upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type; - difference_type __len = _VSTD::distance(__first, __last); + difference_type __len = std::distance(__first, __last); while (__len != 0) { - difference_type __l2 = _VSTD::__half_positive(__len); + difference_type __l2 = std::__half_positive(__len); _ForwardIterator __m = __first; - _VSTD::advance(__m, __l2); + std::advance(__m, __l2); if (__comp(__value_, *__m)) __len = __l2; else @@ -48,7 +48,7 @@ _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) { - return _VSTD::__upper_bound<_Compare&>(__first, __last, __value_, __comp); + return std::__upper_bound<_Compare&>(__first, __last, __value_, __comp); } template @@ -57,7 +57,7 @@ _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) { - return _VSTD::upper_bound(__first, __last, __value_, + return std::upper_bound(__first, __last, __value_, __less<_Tp, typename iterator_traits<_ForwardIterator>::value_type>()); } diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference --- a/libcxx/include/__bit_reference +++ b/libcxx/include/__bit_reference @@ -169,11 +169,11 @@ if (__first.__ctz_ != 0) { __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); - __storage_type __dn = _VSTD::min(__clz_f, __n); + __storage_type __dn = std::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); __storage_type __b = *__first.__seg_ & __m; if (__b) - return _It(__first.__seg_, static_cast(_VSTD::__libcpp_ctz(__b))); + return _It(__first.__seg_, static_cast(std::__libcpp_ctz(__b))); if (__n == __dn) return __first + __n; __n -= __dn; @@ -182,14 +182,14 @@ // do middle whole words for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word) if (*__first.__seg_) - return _It(__first.__seg_, static_cast(_VSTD::__libcpp_ctz(*__first.__seg_))); + return _It(__first.__seg_, static_cast(std::__libcpp_ctz(*__first.__seg_))); // do last partial word if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); __storage_type __b = *__first.__seg_ & __m; if (__b) - return _It(__first.__seg_, static_cast(_VSTD::__libcpp_ctz(__b))); + return _It(__first.__seg_, static_cast(std::__libcpp_ctz(__b))); } return _It(__first.__seg_, static_cast(__n)); } @@ -205,11 +205,11 @@ if (__first.__ctz_ != 0) { __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); - __storage_type __dn = _VSTD::min(__clz_f, __n); + __storage_type __dn = std::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); __storage_type __b = ~*__first.__seg_ & __m; if (__b) - return _It(__first.__seg_, static_cast(_VSTD::__libcpp_ctz(__b))); + return _It(__first.__seg_, static_cast(std::__libcpp_ctz(__b))); if (__n == __dn) return __first + __n; __n -= __dn; @@ -220,7 +220,7 @@ { __storage_type __b = ~*__first.__seg_; if (__b) - return _It(__first.__seg_, static_cast(_VSTD::__libcpp_ctz(__b))); + return _It(__first.__seg_, static_cast(std::__libcpp_ctz(__b))); } // do last partial word if (__n > 0) @@ -228,7 +228,7 @@ __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); __storage_type __b = ~*__first.__seg_ & __m; if (__b) - return _It(__first.__seg_, static_cast(_VSTD::__libcpp_ctz(__b))); + return _It(__first.__seg_, static_cast(std::__libcpp_ctz(__b))); } return _It(__first.__seg_, static_cast(__n)); } @@ -239,8 +239,8 @@ find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) { if (static_cast(__value_)) - return _VSTD::__find_bool_true(__first, static_cast(__last - __first)); - return _VSTD::__find_bool_false(__first, static_cast(__last - __first)); + return std::__find_bool_true(__first, static_cast(__last - __first)); + return std::__find_bool_false(__first, static_cast(__last - __first)); } // count @@ -258,20 +258,20 @@ if (__first.__ctz_ != 0) { __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); - __storage_type __dn = _VSTD::min(__clz_f, __n); + __storage_type __dn = std::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - __r = _VSTD::__libcpp_popcount(*__first.__seg_ & __m); + __r = std::__libcpp_popcount(*__first.__seg_ & __m); __n -= __dn; ++__first.__seg_; } // do middle whole words for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word) - __r += _VSTD::__libcpp_popcount(*__first.__seg_); + __r += std::__libcpp_popcount(*__first.__seg_); // do last partial word if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - __r += _VSTD::__libcpp_popcount(*__first.__seg_ & __m); + __r += std::__libcpp_popcount(*__first.__seg_ & __m); } return __r; } @@ -289,20 +289,20 @@ if (__first.__ctz_ != 0) { __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); - __storage_type __dn = _VSTD::min(__clz_f, __n); + __storage_type __dn = std::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - __r = _VSTD::__libcpp_popcount(~*__first.__seg_ & __m); + __r = std::__libcpp_popcount(~*__first.__seg_ & __m); __n -= __dn; ++__first.__seg_; } // do middle whole words for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word) - __r += _VSTD::__libcpp_popcount(~*__first.__seg_); + __r += std::__libcpp_popcount(~*__first.__seg_); // do last partial word if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - __r += _VSTD::__libcpp_popcount(~*__first.__seg_ & __m); + __r += std::__libcpp_popcount(~*__first.__seg_ & __m); } return __r; } @@ -313,8 +313,8 @@ count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) { if (static_cast(__value_)) - return _VSTD::__count_bool_true(__first, static_cast(__last - __first)); - return _VSTD::__count_bool_false(__first, static_cast(__last - __first)); + return std::__count_bool_true(__first, static_cast(__last - __first)); + return std::__count_bool_false(__first, static_cast(__last - __first)); } // fill_n @@ -330,7 +330,7 @@ if (__first.__ctz_ != 0) { __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); - __storage_type __dn = _VSTD::min(__clz_f, __n); + __storage_type __dn = std::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); *__first.__seg_ &= ~__m; __n -= __dn; @@ -338,7 +338,7 @@ } // do middle whole words __storage_type __nw = __n / __bits_per_word; - _VSTD::memset(_VSTD::__to_address(__first.__seg_), 0, __nw * sizeof(__storage_type)); + std::memset(std::__to_address(__first.__seg_), 0, __nw * sizeof(__storage_type)); __n -= __nw * __bits_per_word; // do last partial word if (__n > 0) @@ -360,7 +360,7 @@ if (__first.__ctz_ != 0) { __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); - __storage_type __dn = _VSTD::min(__clz_f, __n); + __storage_type __dn = std::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); *__first.__seg_ |= __m; __n -= __dn; @@ -368,7 +368,7 @@ } // do middle whole words __storage_type __nw = __n / __bits_per_word; - _VSTD::memset(_VSTD::__to_address(__first.__seg_), -1, __nw * sizeof(__storage_type)); + std::memset(std::__to_address(__first.__seg_), -1, __nw * sizeof(__storage_type)); __n -= __nw * __bits_per_word; // do last partial word if (__n > 0) @@ -387,9 +387,9 @@ if (__n > 0) { if (__value_) - _VSTD::__fill_n_true(__first, __n); + std::__fill_n_true(__first, __n); else - _VSTD::__fill_n_false(__first, __n); + std::__fill_n_false(__first, __n); } } @@ -400,7 +400,7 @@ void fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value_) { - _VSTD::fill_n(__first, static_cast(__last - __first), __value_); + std::fill_n(__first, static_cast(__last - __first), __value_); } // copy @@ -421,7 +421,7 @@ if (__first.__ctz_ != 0) { unsigned __clz = __bits_per_word - __first.__ctz_; - difference_type __dn = _VSTD::min(static_cast(__clz), __n); + difference_type __dn = std::min(static_cast(__clz), __n); __n -= __dn; __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz - __dn)); __storage_type __b = *__first.__seg_ & __m; @@ -435,8 +435,8 @@ // __first.__ctz_ == 0; // do middle words __storage_type __nw = __n / __bits_per_word; - _VSTD::memmove(_VSTD::__to_address(__result.__seg_), - _VSTD::__to_address(__first.__seg_), + std::memmove(std::__to_address(__result.__seg_), + std::__to_address(__first.__seg_), __nw * sizeof(__storage_type)); __n -= __nw * __bits_per_word; __result.__seg_ += __nw; @@ -470,12 +470,12 @@ if (__first.__ctz_ != 0) { unsigned __clz_f = __bits_per_word - __first.__ctz_; - difference_type __dn = _VSTD::min(static_cast(__clz_f), __n); + difference_type __dn = std::min(static_cast(__clz_f), __n); __n -= __dn; __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); __storage_type __b = *__first.__seg_ & __m; unsigned __clz_r = __bits_per_word - __result.__ctz_; - __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r); + __storage_type __ddn = std::min<__storage_type>(__dn, __clz_r); __m = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn)); *__result.__seg_ &= ~__m; if (__result.__ctz_ > __first.__ctz_) @@ -513,7 +513,7 @@ { __m = ~__storage_type(0) >> (__bits_per_word - __n); __storage_type __b = *__first.__seg_ & __m; - __storage_type __dn = _VSTD::min(__n, static_cast(__clz_r)); + __storage_type __dn = std::min(__n, static_cast(__clz_r)); __m = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn)); *__result.__seg_ &= ~__m; *__result.__seg_ |= __b << __result.__ctz_; @@ -538,8 +538,8 @@ copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { if (__first.__ctz_ == __result.__ctz_) - return _VSTD::__copy_aligned(__first, __last, __result); - return _VSTD::__copy_unaligned(__first, __last, __result); + return std::__copy_aligned(__first, __last, __result); + return std::__copy_unaligned(__first, __last, __result); } // copy_backward @@ -559,7 +559,7 @@ // do first word if (__last.__ctz_ != 0) { - difference_type __dn = _VSTD::min(static_cast(__last.__ctz_), __n); + difference_type __dn = std::min(static_cast(__last.__ctz_), __n); __n -= __dn; unsigned __clz = __bits_per_word - __last.__ctz_; __storage_type __m = (~__storage_type(0) << (__last.__ctz_ - __dn)) & (~__storage_type(0) >> __clz); @@ -576,8 +576,8 @@ __storage_type __nw = __n / __bits_per_word; __result.__seg_ -= __nw; __last.__seg_ -= __nw; - _VSTD::memmove(_VSTD::__to_address(__result.__seg_), - _VSTD::__to_address(__last.__seg_), + std::memmove(std::__to_address(__result.__seg_), + std::__to_address(__last.__seg_), __nw * sizeof(__storage_type)); __n -= __nw * __bits_per_word; // do last word @@ -608,13 +608,13 @@ // do first word if (__last.__ctz_ != 0) { - difference_type __dn = _VSTD::min(static_cast(__last.__ctz_), __n); + difference_type __dn = std::min(static_cast(__last.__ctz_), __n); __n -= __dn; unsigned __clz_l = __bits_per_word - __last.__ctz_; __storage_type __m = (~__storage_type(0) << (__last.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_l); __storage_type __b = *__last.__seg_ & __m; unsigned __clz_r = __bits_per_word - __result.__ctz_; - __storage_type __ddn = _VSTD::min(__dn, static_cast(__result.__ctz_)); + __storage_type __ddn = std::min(__dn, static_cast(__result.__ctz_)); if (__ddn > 0) { __m = (~__storage_type(0) << (__result.__ctz_ - __ddn)) & (~__storage_type(0) >> __clz_r); @@ -658,7 +658,7 @@ __m = ~__storage_type(0) << (__bits_per_word - __n); __storage_type __b = *--__last.__seg_ & __m; __clz_r = __bits_per_word - __result.__ctz_; - __storage_type __dn = _VSTD::min(__n, static_cast(__result.__ctz_)); + __storage_type __dn = std::min(__n, static_cast(__result.__ctz_)); __m = (~__storage_type(0) << (__result.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_r); *__result.__seg_ &= ~__m; *__result.__seg_ |= __b >> (__bits_per_word - __result.__ctz_); @@ -685,8 +685,8 @@ copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { if (__last.__ctz_ == __result.__ctz_) - return _VSTD::__copy_backward_aligned(__first, __last, __result); - return _VSTD::__copy_backward_unaligned(__first, __last, __result); + return std::__copy_backward_aligned(__first, __last, __result); + return std::__copy_backward_unaligned(__first, __last, __result); } // move @@ -696,7 +696,7 @@ __bit_iterator<_Cp, false> move(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { - return _VSTD::copy(__first, __last, __result); + return std::copy(__first, __last, __result); } // move_backward @@ -706,7 +706,7 @@ __bit_iterator<_Cp, false> move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { - return _VSTD::copy_backward(__first, __last, __result); + return std::copy_backward(__first, __last, __result); } // swap_ranges @@ -727,7 +727,7 @@ if (__first.__ctz_ != 0) { unsigned __clz = __bits_per_word - __first.__ctz_; - difference_type __dn = _VSTD::min(static_cast(__clz), __n); + difference_type __dn = std::min(static_cast(__clz), __n); __n -= __dn; __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz - __dn)); __storage_type __b1 = *__first.__seg_ & __m; @@ -777,13 +777,13 @@ if (__first.__ctz_ != 0) { unsigned __clz_f = __bits_per_word - __first.__ctz_; - difference_type __dn = _VSTD::min(static_cast(__clz_f), __n); + difference_type __dn = std::min(static_cast(__clz_f), __n); __n -= __dn; __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); __storage_type __b1 = *__first.__seg_ & __m; *__first.__seg_ &= ~__m; unsigned __clz_r = __bits_per_word - __result.__ctz_; - __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r); + __storage_type __ddn = std::min<__storage_type>(__dn, __clz_r); __m = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn)); __storage_type __b2 = *__result.__seg_ & __m; *__result.__seg_ &= ~__m; @@ -838,7 +838,7 @@ __m = ~__storage_type(0) >> (__bits_per_word - __n); __storage_type __b1 = *__first.__seg_ & __m; *__first.__seg_ &= ~__m; - __storage_type __dn = _VSTD::min<__storage_type>(__n, __clz_r); + __storage_type __dn = std::min<__storage_type>(__n, __clz_r); __m = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn)); __storage_type __b2 = *__result.__seg_ & __m; *__result.__seg_ &= ~__m; @@ -868,8 +868,8 @@ __bit_iterator<__C2, false> __first2) { if (__first1.__ctz_ == __first2.__ctz_) - return _VSTD::__swap_ranges_aligned(__first1, __last1, __first2); - return _VSTD::__swap_ranges_unaligned(__first1, __last1, __first2); + return std::__swap_ranges_aligned(__first1, __last1, __first2); + return std::__swap_ranges_unaligned(__first1, __last1, __first2); } // rotate @@ -917,13 +917,13 @@ if (__d1 <= __bit_array<_Cp>::capacity()) { __bit_array<_Cp> __b(__d1); - _VSTD::copy(__first, __middle, __b.begin()); - _VSTD::copy(__b.begin(), __b.end(), _VSTD::copy(__middle, __last, __first)); + std::copy(__first, __middle, __b.begin()); + std::copy(__b.begin(), __b.end(), std::copy(__middle, __last, __first)); break; } else { - __bit_iterator<_Cp, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle); + __bit_iterator<_Cp, false> __mp = std::swap_ranges(__first, __middle, __middle); __first = __middle; __middle = __mp; __d2 -= __d1; @@ -934,14 +934,14 @@ if (__d2 <= __bit_array<_Cp>::capacity()) { __bit_array<_Cp> __b(__d2); - _VSTD::copy(__middle, __last, __b.begin()); - _VSTD::copy_backward(__b.begin(), __b.end(), _VSTD::copy_backward(__first, __middle, __last)); + std::copy(__middle, __last, __b.begin()); + std::copy_backward(__b.begin(), __b.end(), std::copy_backward(__first, __middle, __last)); break; } else { __bit_iterator<_Cp, false> __mp = __first + __d2; - _VSTD::swap_ranges(__first, __mp, __middle); + std::swap_ranges(__first, __mp, __middle); __first = __mp; __d1 -= __d2; } @@ -968,12 +968,12 @@ if (__first1.__ctz_ != 0) { unsigned __clz_f = __bits_per_word - __first1.__ctz_; - difference_type __dn = _VSTD::min(static_cast(__clz_f), __n); + difference_type __dn = std::min(static_cast(__clz_f), __n); __n -= __dn; __storage_type __m = (~__storage_type(0) << __first1.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); __storage_type __b = *__first1.__seg_ & __m; unsigned __clz_r = __bits_per_word - __first2.__ctz_; - __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r); + __storage_type __ddn = std::min<__storage_type>(__dn, __clz_r); __m = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn)); if (__first2.__ctz_ > __first1.__ctz_) { @@ -1016,7 +1016,7 @@ { __m = ~__storage_type(0) >> (__bits_per_word - __n); __storage_type __b = *__first1.__seg_ & __m; - __storage_type __dn = _VSTD::min(__n, static_cast(__clz_r)); + __storage_type __dn = std::min(__n, static_cast(__clz_r)); __m = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn)); if ((*__first2.__seg_ & __m) != (__b << __first2.__ctz_)) return false; @@ -1050,7 +1050,7 @@ if (__first1.__ctz_ != 0) { unsigned __clz = __bits_per_word - __first1.__ctz_; - difference_type __dn = _VSTD::min(static_cast(__clz), __n); + difference_type __dn = std::min(static_cast(__clz), __n); __n -= __dn; __storage_type __m = (~__storage_type(0) << __first1.__ctz_) & (~__storage_type(0) >> (__clz - __dn)); if ((*__first2.__seg_ & __m) != (*__first1.__seg_ & __m)) @@ -1083,8 +1083,8 @@ equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2) { if (__first1.__ctz_ == __first2.__ctz_) - return _VSTD::__equal_aligned(__first1, __last1, __first2); - return _VSTD::__equal_unaligned(__first1, __last1, __first2); + return std::__equal_aligned(__first1, __last1, __first2); + return std::__equal_unaligned(__first1, __last1, __first2); } template using file_time = time_point; diff --git a/libcxx/include/__compare/compare_three_way.h b/libcxx/include/__compare/compare_three_way.h --- a/libcxx/include/__compare/compare_three_way.h +++ b/libcxx/include/__compare/compare_three_way.h @@ -28,8 +28,8 @@ requires three_way_comparable_with<_T1, _T2> constexpr _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) <=> _VSTD::forward<_T2>(__u))) - { return _VSTD::forward<_T1>(__t) <=> _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) <=> std::forward<_T2>(__u))) + { return std::forward<_T1>(__t) <=> std::forward<_T2>(__u); } using is_transparent = void; }; diff --git a/libcxx/include/__compare/partial_order.h b/libcxx/include/__compare/partial_order.h --- a/libcxx/include/__compare/partial_order.h +++ b/libcxx/include/__compare/partial_order.h @@ -32,31 +32,31 @@ requires is_same_v, decay_t<_Up>> _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<2>) - noexcept(noexcept(partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))) - -> decltype( partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) - { return partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); } + noexcept(noexcept(partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) + -> decltype( partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) + { return partial_ordering(partial_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); } template requires is_same_v, decay_t<_Up>> _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) - noexcept(noexcept(partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))) - -> decltype( partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) - { return partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); } + noexcept(noexcept(partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) + -> decltype( partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) + { return partial_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); } template requires is_same_v, decay_t<_Up>> _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) - noexcept(noexcept(partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))) - -> decltype( partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) - { return partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); } + noexcept(noexcept(partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) + -> decltype( partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) + { return partial_ordering(std::weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); } template _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const - noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()))) - -> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>())) - { return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()); } + noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()))) + -> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())) + { return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()); } }; } // namespace __partial_order diff --git a/libcxx/include/__compare/strong_order.h b/libcxx/include/__compare/strong_order.h --- a/libcxx/include/__compare/strong_order.h +++ b/libcxx/include/__compare/strong_order.h @@ -38,9 +38,9 @@ requires is_same_v, decay_t<_Up>> _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<2>) - noexcept(noexcept(strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))) - -> decltype( strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) - { return strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); } + noexcept(noexcept(strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) + -> decltype( strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) + { return strong_ordering(strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); } template> requires is_same_v<_Dp, decay_t<_Up>> && is_floating_point_v<_Dp> @@ -48,14 +48,14 @@ __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept { if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int32_t)) { - int32_t __rx = _VSTD::bit_cast(__t); - int32_t __ry = _VSTD::bit_cast(__u); + int32_t __rx = std::bit_cast(__t); + int32_t __ry = std::bit_cast(__u); __rx = (__rx < 0) ? (numeric_limits::min() - __rx - 1) : __rx; __ry = (__ry < 0) ? (numeric_limits::min() - __ry - 1) : __ry; return (__rx <=> __ry); } else if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int64_t)) { - int64_t __rx = _VSTD::bit_cast(__t); - int64_t __ry = _VSTD::bit_cast(__u); + int64_t __rx = std::bit_cast(__t); + int64_t __ry = std::bit_cast(__u); __rx = (__rx < 0) ? (numeric_limits::min() - __rx - 1) : __rx; __ry = (__ry < 0) ? (numeric_limits::min() - __ry - 1) : __ry; return (__rx <=> __ry); @@ -65,27 +65,27 @@ return strong_ordering::greater; } else if (__t == __u) { if constexpr (numeric_limits<_Dp>::radix == 2) { - return _VSTD::signbit(__u) <=> _VSTD::signbit(__t); + return std::signbit(__u) <=> std::signbit(__t); } else { // This is bullet 3 of the IEEE754 algorithm, relevant // only for decimal floating-point; // see https://stackoverflow.com/questions/69068075/ - if (__t == 0 || _VSTD::isinf(__t)) { - return _VSTD::signbit(__u) <=> _VSTD::signbit(__t); + if (__t == 0 || std::isinf(__t)) { + return std::signbit(__u) <=> std::signbit(__t); } else { int __texp, __uexp; - (void)_VSTD::frexp(__t, &__texp); - (void)_VSTD::frexp(__u, &__uexp); + (void)std::frexp(__t, &__texp); + (void)std::frexp(__u, &__uexp); return (__t < 0) ? (__texp <=> __uexp) : (__uexp <=> __texp); } } } else { // They're unordered, so one of them must be a NAN. // The order is -QNAN, -SNAN, numbers, +SNAN, +QNAN. - bool __t_is_nan = _VSTD::isnan(__t); - bool __u_is_nan = _VSTD::isnan(__u); - bool __t_is_negative = _VSTD::signbit(__t); - bool __u_is_negative = _VSTD::signbit(__u); + bool __t_is_nan = std::isnan(__t); + bool __u_is_nan = std::isnan(__u); + bool __t_is_negative = std::signbit(__t); + bool __u_is_negative = std::signbit(__u); using _IntType = conditional_t< sizeof(__t) == sizeof(int32_t), int32_t, conditional_t< sizeof(__t) == sizeof(int64_t), int64_t, void> @@ -97,7 +97,7 @@ if (__t_is_negative != __u_is_negative) { return (__u_is_negative <=> __t_is_negative); } else { - return _VSTD::bit_cast<_IntType>(__t) <=> _VSTD::bit_cast<_IntType>(__u); + return std::bit_cast<_IntType>(__t) <=> std::bit_cast<_IntType>(__u); } } else if (__t_is_nan) { return __t_is_negative ? strong_ordering::less : strong_ordering::greater; @@ -111,15 +111,15 @@ requires is_same_v, decay_t<_Up>> _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) - noexcept(noexcept(strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))) - -> decltype( strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) - { return strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); } + noexcept(noexcept(strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) + -> decltype( strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) + { return strong_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); } template _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const - noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()))) - -> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>())) - { return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()); } + noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()))) + -> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>())) + { return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<2>()); } }; } // namespace __strong_order diff --git a/libcxx/include/__compare/weak_order.h b/libcxx/include/__compare/weak_order.h --- a/libcxx/include/__compare/weak_order.h +++ b/libcxx/include/__compare/weak_order.h @@ -33,9 +33,9 @@ requires is_same_v, decay_t<_Up>> _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<3>) - noexcept(noexcept(weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))) - -> decltype( weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) - { return weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); } + noexcept(noexcept(weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) + -> decltype( weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) + { return weak_ordering(weak_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); } template> requires is_same_v<_Dp, decay_t<_Up>> && is_floating_point_v<_Dp> @@ -51,10 +51,10 @@ return weak_ordering::greater; } else { // Otherwise, at least one of them is a NaN. - bool __t_is_nan = _VSTD::isnan(__t); - bool __u_is_nan = _VSTD::isnan(__u); - bool __t_is_negative = _VSTD::signbit(__t); - bool __u_is_negative = _VSTD::signbit(__u); + bool __t_is_nan = std::isnan(__t); + bool __u_is_nan = std::isnan(__u); + bool __t_is_negative = std::signbit(__t); + bool __u_is_negative = std::signbit(__u); if (__t_is_nan && __u_is_nan) { return (__u_is_negative <=> __t_is_negative); } else if (__t_is_nan) { @@ -69,23 +69,23 @@ requires is_same_v, decay_t<_Up>> _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) - noexcept(noexcept(weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))) - -> decltype( weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) - { return weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); } + noexcept(noexcept(weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) + -> decltype( weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) + { return weak_ordering(compare_three_way()(std::forward<_Tp>(__t), std::forward<_Up>(__u))); } template requires is_same_v, decay_t<_Up>> _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_Tp&& __t, _Up&& __u, __priority_tag<0>) - noexcept(noexcept(weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))) - -> decltype( weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) - { return weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); } + noexcept(noexcept(weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))))) + -> decltype( weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) + { return weak_ordering(std::strong_order(std::forward<_Tp>(__t), std::forward<_Up>(__u))); } template _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const - noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>()))) - -> decltype( __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>())) - { return __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>()); } + noexcept(noexcept(__go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>()))) + -> decltype( __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>())) + { return __go(std::forward<_Tp>(__t), std::forward<_Up>(__u), __priority_tag<3>()); } }; } // namespace __weak_order diff --git a/libcxx/include/__concepts/assignable.h b/libcxx/include/__concepts/assignable.h --- a/libcxx/include/__concepts/assignable.h +++ b/libcxx/include/__concepts/assignable.h @@ -30,7 +30,7 @@ is_lvalue_reference_v<_Lhs> && common_reference_with<__make_const_lvalue_ref<_Lhs>, __make_const_lvalue_ref<_Rhs>> && requires (_Lhs __lhs, _Rhs&& __rhs) { - { __lhs = _VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>; + { __lhs = std::forward<_Rhs>(__rhs) } -> same_as<_Lhs>; }; #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) diff --git a/libcxx/include/__concepts/boolean_testable.h b/libcxx/include/__concepts/boolean_testable.h --- a/libcxx/include/__concepts/boolean_testable.h +++ b/libcxx/include/__concepts/boolean_testable.h @@ -28,7 +28,7 @@ template concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t) { - { !_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl; + { !std::forward<_Tp>(__t) } -> __boolean_testable_impl; }; #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) diff --git a/libcxx/include/__concepts/invocable.h b/libcxx/include/__concepts/invocable.h --- a/libcxx/include/__concepts/invocable.h +++ b/libcxx/include/__concepts/invocable.h @@ -26,7 +26,7 @@ template concept invocable = requires(_Fn&& __fn, _Args&&... __args) { - _VSTD::invoke(_VSTD::forward<_Fn>(__fn), _VSTD::forward<_Args>(__args)...); // not required to be equality preserving + std::invoke(std::forward<_Fn>(__fn), std::forward<_Args>(__args)...); // not required to be equality preserving }; // [concept.regular.invocable] diff --git a/libcxx/include/__concepts/swappable.h b/libcxx/include/__concepts/swappable.h --- a/libcxx/include/__concepts/swappable.h +++ b/libcxx/include/__concepts/swappable.h @@ -39,7 +39,7 @@ concept __unqualified_swappable_with = (__class_or_enum> || __class_or_enum>) && requires(_Tp&& __t, _Up&& __u) { - swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); + swap(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }; struct __fn; @@ -64,9 +64,9 @@ template requires __unqualified_swappable_with<_Tp, _Up> constexpr void operator()(_Tp&& __t, _Up&& __u) const - noexcept(noexcept(swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))) + noexcept(noexcept(swap(std::forward<_Tp>(__t), std::forward<_Up>(__u)))) { - swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); + swap(std::forward<_Tp>(__t), std::forward<_Up>(__u)); } // 2.2 Otherwise, if `E1` and `E2` are lvalues of array types with equal extent and... @@ -86,7 +86,7 @@ constexpr void operator()(_Tp& __x, _Tp& __y) const noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_move_assignable_v<_Tp>) { - __y = _VSTD::exchange(__x, _VSTD::move(__y)); + __y = std::exchange(__x, std::move(__y)); } }; } // namespace ranges::__swap @@ -102,10 +102,10 @@ concept swappable_with = common_reference_with<_Tp, _Up> && requires(_Tp&& __t, _Up&& __u) { - ranges::swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Tp>(__t)); - ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Up>(__u)); - ranges::swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); - ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Tp>(__t)); + ranges::swap(std::forward<_Tp>(__t), std::forward<_Tp>(__t)); + ranges::swap(std::forward<_Up>(__u), std::forward<_Up>(__u)); + ranges::swap(std::forward<_Tp>(__t), std::forward<_Up>(__u)); + ranges::swap(std::forward<_Up>(__u), std::forward<_Tp>(__t)); }; #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -931,7 +931,7 @@ # define _LIBCPP_DEBUG_RANDOMIZE_RANGE(__first, __last) \ do { \ if (!__builtin_is_constant_evaluated()) \ - _VSTD::shuffle(__first, __last, __libcpp_debug_randomizer()); \ + std::shuffle(__first, __last, __libcpp_debug_randomizer()); \ } while (false) # else # define _LIBCPP_DEBUG_RANDOMIZE_RANGE(__first, __last) \ diff --git a/libcxx/include/__coroutine/coroutine_handle.h b/libcxx/include/__coroutine/coroutine_handle.h --- a/libcxx/include/__coroutine/coroutine_handle.h +++ b/libcxx/include/__coroutine/coroutine_handle.h @@ -118,7 +118,7 @@ using _RawPromise = typename remove_cv<_Promise>::type; coroutine_handle __tmp; __tmp.__handle_ = - __builtin_coro_promise(_VSTD::addressof(const_cast<_RawPromise&>(__promise)), alignof(_Promise), true); + __builtin_coro_promise(std::addressof(const_cast<_RawPromise&>(__promise)), alignof(_Promise), true); return __tmp; } diff --git a/libcxx/include/__debug b/libcxx/include/__debug --- a/libcxx/include/__debug +++ b/libcxx/include/__debug @@ -33,10 +33,10 @@ # define _LIBCPP_ASSERT_IMPL(x, m) ((void)0) #elif _LIBCPP_DEBUG_LEVEL == 1 # define _LIBCPP_DEBUG_ASSERT(x, m) ((void)0) -# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m))) +# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : std::__libcpp_debug_function(std::__libcpp_debug_info(__FILE__, __LINE__, #x, m))) #elif _LIBCPP_DEBUG_LEVEL == 2 # define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(__libcpp_is_constant_evaluated() || (x), m) -# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m))) +# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : std::__libcpp_debug_function(std::__libcpp_debug_info(__FILE__, __LINE__, #x, m))) #else # error _LIBCPP_DEBUG_LEVEL must be one of 0, 1, 2 #endif diff --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h --- a/libcxx/include/__filesystem/directory_entry.h +++ b/libcxx/include/__filesystem/directory_entry.h @@ -37,7 +37,7 @@ class directory_entry { - typedef _VSTD_FS::path _Path; + typedef std_FS::path _Path; public: // constructors and destructors @@ -100,11 +100,11 @@ operator const _Path&() const noexcept { return __p_; } _LIBCPP_INLINE_VISIBILITY - bool exists() const { return _VSTD_FS::exists(file_status{__get_ft()}); } + bool exists() const { return std_FS::exists(file_status{__get_ft()}); } _LIBCPP_INLINE_VISIBILITY bool exists(error_code& __ec) const noexcept { - return _VSTD_FS::exists(file_status{__get_ft(&__ec)}); + return std_FS::exists(file_status{__get_ft(&__ec)}); } _LIBCPP_INLINE_VISIBILITY @@ -140,11 +140,11 @@ } _LIBCPP_INLINE_VISIBILITY - bool is_other() const { return _VSTD_FS::is_other(file_status{__get_ft()}); } + bool is_other() const { return std_FS::is_other(file_status{__get_ft()}); } _LIBCPP_INLINE_VISIBILITY bool is_other(error_code& __ec) const noexcept { - return _VSTD_FS::is_other(file_status{__get_ft(&__ec)}); + return std_FS::is_other(file_status{__get_ft(&__ec)}); } _LIBCPP_INLINE_VISIBILITY @@ -301,7 +301,7 @@ _LIBCPP_INLINE_VISIBILITY void __assign_iter_entry(_Path&& __p, __cached_data __dt) { - __p_ = _VSTD::move(__p); + __p_ = std::move(__p); __data_ = __dt; } @@ -352,7 +352,7 @@ case _IterNonSymlink: case _RefreshNonSymlink: file_status __st(__data_.__type_); - if (__ec && !_VSTD_FS::exists(__st)) + if (__ec && !std_FS::exists(__st)) *__ec = make_error_code(errc::no_such_file_or_directory); else if (__ec) __ec->clear(); @@ -372,7 +372,7 @@ case _RefreshNonSymlink: case _RefreshSymlink: { file_status __st(__data_.__type_); - if (__ec && !_VSTD_FS::exists(__st)) + if (__ec && !std_FS::exists(__st)) *__ec = make_error_code(errc::no_such_file_or_directory); else if (__ec) __ec->clear(); @@ -420,14 +420,14 @@ case _IterNonSymlink: case _IterSymlink: case _RefreshSymlinkUnresolved: - return _VSTD_FS::__file_size(__p_, __ec); + return std_FS::__file_size(__p_, __ec); case _RefreshSymlink: case _RefreshNonSymlink: { error_code __m_ec; file_status __st(__get_ft(&__m_ec)); __handle_error("in directory_entry::file_size", __ec, __m_ec); - if (_VSTD_FS::exists(__st) && !_VSTD_FS::is_regular_file(__st)) { - errc __err_kind = _VSTD_FS::is_directory(__st) ? errc::is_a_directory + if (std_FS::exists(__st) && !std_FS::is_regular_file(__st)) { + errc __err_kind = std_FS::is_directory(__st) ? errc::is_a_directory : errc::not_supported; __handle_error("in directory_entry::file_size", __ec, make_error_code(__err_kind)); @@ -445,7 +445,7 @@ case _IterNonSymlink: case _IterSymlink: case _RefreshSymlinkUnresolved: - return _VSTD_FS::__hard_link_count(__p_, __ec); + return std_FS::__hard_link_count(__p_, __ec); case _RefreshSymlink: case _RefreshNonSymlink: { error_code __m_ec; @@ -464,13 +464,13 @@ case _IterNonSymlink: case _IterSymlink: case _RefreshSymlinkUnresolved: - return _VSTD_FS::__last_write_time(__p_, __ec); + return std_FS::__last_write_time(__p_, __ec); case _RefreshSymlink: case _RefreshNonSymlink: { error_code __m_ec; file_status __st(__get_ft(&__m_ec)); __handle_error("in directory_entry::last_write_time", __ec, __m_ec); - if (_VSTD_FS::exists(__st) && + if (std_FS::exists(__st) && __data_.__write_time_ == file_time_type::min()) __handle_error("in directory_entry::last_write_time", __ec, make_error_code(errc::value_too_large)); @@ -488,7 +488,7 @@ class __dir_element_proxy { public: inline _LIBCPP_INLINE_VISIBILITY directory_entry operator*() { - return _VSTD::move(__elem_); + return std::move(__elem_); } private: @@ -496,7 +496,7 @@ friend class recursive_directory_iterator; explicit __dir_element_proxy(directory_entry const& __e) : __elem_(__e) {} __dir_element_proxy(__dir_element_proxy&& __o) - : __elem_(_VSTD::move(__o.__elem_)) {} + : __elem_(std::move(__o.__elem_)) {} directory_entry __elem_; }; diff --git a/libcxx/include/__filesystem/directory_iterator.h b/libcxx/include/__filesystem/directory_iterator.h --- a/libcxx/include/__filesystem/directory_iterator.h +++ b/libcxx/include/__filesystem/directory_iterator.h @@ -62,7 +62,7 @@ directory_iterator& operator=(directory_iterator&& __o) noexcept { // non-default implementation provided to support self-move assign. if (this != &__o) { - __imp_ = _VSTD::move(__o.__imp_); + __imp_ = std::move(__o.__imp_); } return *this; } @@ -137,11 +137,11 @@ template <> _LIBCPP_AVAILABILITY_FILESYSTEM -inline constexpr bool _VSTD::ranges::enable_borrowed_range<_VSTD_FS::directory_iterator> = true; +inline constexpr bool std::ranges::enable_borrowed_range = true; template <> _LIBCPP_AVAILABILITY_FILESYSTEM -inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::directory_iterator> = true; +inline constexpr bool std::ranges::enable_view = true; #endif diff --git a/libcxx/include/__filesystem/filesystem_error.h b/libcxx/include/__filesystem/filesystem_error.h --- a/libcxx/include/__filesystem/filesystem_error.h +++ b/libcxx/include/__filesystem/filesystem_error.h @@ -83,11 +83,11 @@ _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY #ifndef _LIBCPP_NO_EXCEPTIONS void __throw_filesystem_error(_Args&&... __args) { - throw filesystem_error(_VSTD::forward<_Args>(__args)...); + throw filesystem_error(std::forward<_Args>(__args)...); } #else void __throw_filesystem_error(_Args&&...) { - _VSTD::abort(); + std::abort(); } #endif _LIBCPP_AVAILABILITY_FILESYSTEM_POP diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h --- a/libcxx/include/__filesystem/path.h +++ b/libcxx/include/__filesystem/path.h @@ -426,11 +426,11 @@ _LIBCPP_INLINE_VISIBILITY path() noexcept {} _LIBCPP_INLINE_VISIBILITY path(const path& __p) : __pn_(__p.__pn_) {} _LIBCPP_INLINE_VISIBILITY path(path&& __p) noexcept - : __pn_(_VSTD::move(__p.__pn_)) {} + : __pn_(std::move(__p.__pn_)) {} _LIBCPP_INLINE_VISIBILITY path(string_type&& __s, format = format::auto_format) noexcept - : __pn_(_VSTD::move(__s)) {} + : __pn_(std::move(__s)) {} template > path(const _Source& __src, format = format::auto_format) { @@ -466,19 +466,19 @@ _LIBCPP_INLINE_VISIBILITY path& operator=(path&& __p) noexcept { - __pn_ = _VSTD::move(__p.__pn_); + __pn_ = std::move(__p.__pn_); return *this; } _LIBCPP_INLINE_VISIBILITY path& operator=(string_type&& __s) noexcept { - __pn_ = _VSTD::move(__s); + __pn_ = std::move(__s); return *this; } _LIBCPP_INLINE_VISIBILITY path& assign(string_type&& __s) noexcept { - __pn_ = _VSTD::move(__s); + __pn_ = std::move(__s); return *this; } @@ -651,7 +651,7 @@ path& make_preferred() { #if defined(_LIBCPP_WIN32API) - _VSTD::replace(__pn_.begin(), __pn_.end(), L'/', L'\\'); + std::replace(__pn_.begin(), __pn_.end(), L'/', L'\\'); #endif return *this; } @@ -688,12 +688,12 @@ _LIBCPP_INLINE_VISIBILITY operator string_type() const { return __pn_; } #if defined(_LIBCPP_WIN32API) - _LIBCPP_INLINE_VISIBILITY _VSTD::wstring wstring() const { return __pn_; } + _LIBCPP_INLINE_VISIBILITY std::wstring wstring() const { return __pn_; } - _VSTD::wstring generic_wstring() const { - _VSTD::wstring __s; + std::wstring generic_wstring() const { + std::wstring __s; __s.resize(__pn_.size()); - _VSTD::replace_copy(__pn_.begin(), __pn_.end(), __s.begin(), '\\', '/'); + std::replace_copy(__pn_.begin(), __pn_.end(), __s.begin(), '\\', '/'); return __s; } @@ -709,7 +709,7 @@ return __s; } - _LIBCPP_INLINE_VISIBILITY _VSTD::string string() const { + _LIBCPP_INLINE_VISIBILITY std::string string() const { return string(); } _LIBCPP_INLINE_VISIBILITY __u8_string u8string() const { @@ -720,10 +720,10 @@ return __s; } - _LIBCPP_INLINE_VISIBILITY _VSTD::u16string u16string() const { + _LIBCPP_INLINE_VISIBILITY std::u16string u16string() const { return string(); } - _LIBCPP_INLINE_VISIBILITY _VSTD::u32string u32string() const { + _LIBCPP_INLINE_VISIBILITY std::u32string u32string() const { return string(); } @@ -737,27 +737,27 @@ // Note: This (and generic_u8string below) is slightly suboptimal as // it iterates twice over the string; once to convert it to the right // character type, and once to replace path delimiters. - _VSTD::replace(__s.begin(), __s.end(), + std::replace(__s.begin(), __s.end(), static_cast<_ECharT>('\\'), static_cast<_ECharT>('/')); return __s; } - _VSTD::string generic_string() const { return generic_string(); } - _VSTD::u16string generic_u16string() const { return generic_string(); } - _VSTD::u32string generic_u32string() const { return generic_string(); } + std::string generic_string() const { return generic_string(); } + std::u16string generic_u16string() const { return generic_string(); } + std::u32string generic_u32string() const { return generic_string(); } __u8_string generic_u8string() const { __u8_string __s = u8string(); - _VSTD::replace(__s.begin(), __s.end(), '\\', '/'); + std::replace(__s.begin(), __s.end(), '\\', '/'); return __s; } #endif /* !_LIBCPP_HAS_NO_LOCALIZATION */ #else /* _LIBCPP_WIN32API */ - _LIBCPP_INLINE_VISIBILITY _VSTD::string string() const { return __pn_; } + _LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; } #ifndef _LIBCPP_HAS_NO_CHAR8_T - _LIBCPP_INLINE_VISIBILITY _VSTD::u8string u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); } + _LIBCPP_INLINE_VISIBILITY std::u8string u8string() const { return std::u8string(__pn_.begin(), __pn_.end()); } #else - _LIBCPP_INLINE_VISIBILITY _VSTD::string u8string() const { return __pn_; } + _LIBCPP_INLINE_VISIBILITY std::string u8string() const { return __pn_; } #endif #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) @@ -774,24 +774,24 @@ } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - _LIBCPP_INLINE_VISIBILITY _VSTD::wstring wstring() const { + _LIBCPP_INLINE_VISIBILITY std::wstring wstring() const { return string(); } #endif - _LIBCPP_INLINE_VISIBILITY _VSTD::u16string u16string() const { + _LIBCPP_INLINE_VISIBILITY std::u16string u16string() const { return string(); } - _LIBCPP_INLINE_VISIBILITY _VSTD::u32string u32string() const { + _LIBCPP_INLINE_VISIBILITY std::u32string u32string() const { return string(); } #endif /* !_LIBCPP_HAS_NO_LOCALIZATION */ // generic format observers - _VSTD::string generic_string() const { return __pn_; } + std::string generic_string() const { return __pn_; } #ifndef _LIBCPP_HAS_NO_CHAR8_T - _VSTD::u8string generic_u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); } + std::u8string generic_u8string() const { return std::u8string(__pn_.begin(), __pn_.end()); } #else - _VSTD::string generic_u8string() const { return __pn_; } + std::string generic_u8string() const { return __pn_; } #endif #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) @@ -803,10 +803,10 @@ } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - _VSTD::wstring generic_wstring() const { return string(); } + std::wstring generic_wstring() const { return string(); } #endif - _VSTD::u16string generic_u16string() const { return string(); } - _VSTD::u32string generic_u32string() const { return string(); } + std::u16string generic_u16string() const { return string(); } + std::u32string generic_u32string() const { return string(); } #endif /* !_LIBCPP_HAS_NO_LOCALIZATION */ #endif /* !_LIBCPP_WIN32API */ @@ -944,7 +944,7 @@ is_same<_Traits, char_traits >::value, basic_ostream<_CharT, _Traits>&>::type operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) { - __os << _VSTD::__quoted(__p.native()); + __os << std::__quoted(__p.native()); return __os; } @@ -954,7 +954,7 @@ !is_same<_Traits, char_traits >::value, basic_ostream<_CharT, _Traits>&>::type operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) { - __os << _VSTD::__quoted(__p.string<_CharT, _Traits>()); + __os << std::__quoted(__p.string<_CharT, _Traits>()); return __os; } diff --git a/libcxx/include/__filesystem/recursive_directory_iterator.h b/libcxx/include/__filesystem/recursive_directory_iterator.h --- a/libcxx/include/__filesystem/recursive_directory_iterator.h +++ b/libcxx/include/__filesystem/recursive_directory_iterator.h @@ -66,7 +66,7 @@ operator=(recursive_directory_iterator&& __o) noexcept { // non-default implementation provided to support self-move assign. if (this != &__o) { - __imp_ = _VSTD::move(__o.__imp_); + __imp_ = std::move(__o.__imp_); __rec_ = __o.__rec_; } return *this; @@ -168,11 +168,11 @@ template <> _LIBCPP_AVAILABILITY_FILESYSTEM -inline constexpr bool _VSTD::ranges::enable_borrowed_range<_VSTD_FS::recursive_directory_iterator> = true; +inline constexpr bool std::ranges::enable_borrowed_range = true; template <> _LIBCPP_AVAILABILITY_FILESYSTEM -inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::recursive_directory_iterator> = true; +inline constexpr bool std::ranges::enable_view = true; #endif diff --git a/libcxx/include/__filesystem/u8path.h b/libcxx/include/__filesystem/u8path.h --- a/libcxx/include/__filesystem/u8path.h +++ b/libcxx/include/__filesystem/u8path.h @@ -35,7 +35,7 @@ #if defined(_LIBCPP_WIN32API) string __tmp(__f, __l); using _CVT = __widen_from_utf8; - _VSTD::wstring __w; + std::wstring __w; __w.reserve(__tmp.size()); _CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size()); return path(__w); @@ -61,7 +61,7 @@ for (; *__f != __sentinel; ++__f) __tmp.push_back(*__f); using _CVT = __widen_from_utf8; - _VSTD::wstring __w; + std::wstring __w; __w.reserve(__tmp.size()); _CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size()); return path(__w); @@ -81,7 +81,7 @@ "'char' or 'char8_t'"); #if defined(_LIBCPP_WIN32API) using _Traits = __is_pathable<_Source>; - return u8path(_VSTD::__unwrap_iter(_Traits::__range_begin(__s)), _VSTD::__unwrap_iter(_Traits::__range_end(__s))); + return u8path(std::__unwrap_iter(_Traits::__range_begin(__s)), std::__unwrap_iter(_Traits::__range_end(__s))); #else return path(__s); #endif diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h --- a/libcxx/include/__format/format_arg.h +++ b/libcxx/include/__format/format_arg.h @@ -65,45 +65,45 @@ visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) { switch (__arg.__type_) { case __format::__arg_t::__none: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), monostate{}); + return std::invoke(std::forward<_Visitor>(__vis), monostate{}); case __format::__arg_t::__boolean: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__boolean); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__boolean); case __format::__arg_t::__char_type: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__char_type); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__char_type); case __format::__arg_t::__int: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__int); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__int); case __format::__arg_t::__long_long: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__long_long); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__long_long); case __format::__arg_t::__i128: #ifndef _LIBCPP_HAS_NO_INT128 - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__i128); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__i128); #else _LIBCPP_UNREACHABLE(); #endif case __format::__arg_t::__unsigned: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__unsigned); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__unsigned); case __format::__arg_t::__unsigned_long_long: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), + return std::invoke(std::forward<_Visitor>(__vis), __arg.__unsigned_long_long); case __format::__arg_t::__u128: #ifndef _LIBCPP_HAS_NO_INT128 - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__u128); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__u128); #else _LIBCPP_UNREACHABLE(); #endif case __format::__arg_t::__float: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__float); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__float); case __format::__arg_t::__double: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__double); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__double); case __format::__arg_t::__long_double: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__long_double); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__long_double); case __format::__arg_t::__const_char_type_ptr: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), + return std::invoke(std::forward<_Visitor>(__vis), __arg.__const_char_type_ptr); case __format::__arg_t::__string_view: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__string_view); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__string_view); case __format::__arg_t::__ptr: - return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__ptr); + return std::invoke(std::forward<_Visitor>(__vis), __arg.__ptr); } _LIBCPP_UNREACHABLE(); } @@ -138,11 +138,11 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT friend __format_arg_store<_Ctx, _Args...> - _VSTD::make_format_args(const _Args&...); + std::make_format_args(const _Args&...); template _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT friend decltype(auto) - _VSTD::visit_format_arg(_Visitor&& __vis, basic_format_arg<_Ctx> __arg); + std::visit_format_arg(_Visitor&& __vis, basic_format_arg<_Ctx> __arg); union { bool __boolean; diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h --- a/libcxx/include/__format/format_context.h +++ b/libcxx/include/__format/format_context.h @@ -55,9 +55,9 @@ __format_context_create( _OutIt __out_it, basic_format_args> __args, - optional<_VSTD::locale>&& __loc = nullopt) { - return _VSTD::basic_format_context(_VSTD::move(__out_it), __args, - _VSTD::move(__loc)); + optional&& __loc = nullopt) { + return std::basic_format_context(std::move(__out_it), __args, + std::move(__loc)); } #else template @@ -65,7 +65,7 @@ __format_context_create( _OutIt __out_it, basic_format_args> __args) { - return _VSTD::basic_format_context(_VSTD::move(__out_it), __args); + return std::basic_format_context(std::move(__out_it), __args); } #endif @@ -105,9 +105,9 @@ return __args_.get(__id); } #ifndef _LIBCPP_HAS_NO_LOCALIZATION - _LIBCPP_HIDE_FROM_ABI _VSTD::locale locale() { + _LIBCPP_HIDE_FROM_ABI std::locale locale() { if (!__loc_) - __loc_ = _VSTD::locale{}; + __loc_ = std::locale{}; return *__loc_; } #endif @@ -128,31 +128,31 @@ // locale() is called and the optional has no value the value will be created. // This allows the implementation to lazily create the locale. // TODO FMT Validate whether lazy creation is the best solution. - optional<_VSTD::locale> __loc_; + optional __loc_; template friend _LIBCPP_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT> - _VSTD::__format_context_create( + std::__format_context_create( __OutIt, basic_format_args>, - optional<_VSTD::locale>&&); + optional&&); // Note: the Standard doesn't specify the required constructors. _LIBCPP_HIDE_FROM_ABI explicit basic_format_context(_OutIt __out_it, basic_format_args __args, - optional<_VSTD::locale>&& __loc) - : __out_it_(_VSTD::move(__out_it)), __args_(__args), - __loc_(_VSTD::move(__loc)) {} + optional&& __loc) + : __out_it_(std::move(__out_it)), __args_(__args), + __loc_(std::move(__loc)) {} #else template friend _LIBCPP_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT> - _VSTD::__format_context_create( + std::__format_context_create( __OutIt, basic_format_args>); _LIBCPP_HIDE_FROM_ABI explicit basic_format_context(_OutIt __out_it, basic_format_args __args) - : __out_it_(_VSTD::move(__out_it)), __args_(__args) {} + : __out_it_(std::move(__out_it)), __args_(__args) {} #endif }; diff --git a/libcxx/include/__format/format_error.h b/libcxx/include/__format/format_error.h --- a/libcxx/include/__format/format_error.h +++ b/libcxx/include/__format/format_error.h @@ -40,7 +40,7 @@ throw format_error(__s); #else (void)__s; - _VSTD::abort(); + std::abort(); #endif } diff --git a/libcxx/include/__format/formatter.h b/libcxx/include/__format/formatter.h --- a/libcxx/include/__format/formatter.h +++ b/libcxx/include/__format/formatter.h @@ -185,9 +185,9 @@ __padding_size_result __padding = __padding_size(__size, __width, __alignment); - __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before, __fill); - __out_it = _VSTD::copy(__first, __last, _VSTD::move(__out_it)); - return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after, __fill); + __out_it = std::fill_n(std::move(__out_it), __padding.__before, __fill); + __out_it = std::copy(__first, __last, std::move(__out_it)); + return std::fill_n(std::move(__out_it), __padding.__after, __fill); } /** @@ -209,9 +209,9 @@ __padding_size_result __padding = __padding_size(__size, __width, __alignment); - __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before, __fill); - __out_it = _VSTD::transform(__first, __last, _VSTD::move(__out_it), __op); - return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after, __fill); + __out_it = std::fill_n(std::move(__out_it), __padding.__before, __fill); + __out_it = std::transform(__first, __last, std::move(__out_it), __op); + return std::fill_n(std::move(__out_it), __padding.__after, __fill); } /** @@ -241,7 +241,7 @@ __width, __precision); if (__format_traits.__align) - return __write(_VSTD::move(__out_it), __str.begin(), + return __write(std::move(__out_it), __str.begin(), __format_traits.__last, __format_traits.__size, __width, __fill, __alignment); @@ -252,7 +252,7 @@ // Copy the input to the output. The output size might be limited by the // precision. - return _VSTD::copy(__str.begin(), __last, _VSTD::move(__out_it)); + return std::copy(__str.begin(), __last, std::move(__out_it)); } } // namespace __formatter diff --git a/libcxx/include/__format/formatter_bool.h b/libcxx/include/__format/formatter_bool.h --- a/libcxx/include/__format/formatter_bool.h +++ b/libcxx/include/__format/formatter_bool.h @@ -131,7 +131,7 @@ // The output only uses ASCII so every character is one column. unsigned __size = __str.size(); if (__size >= this->__width) - return _VSTD::copy(__str.begin(), __str.end(), __ctx.out()); + return std::copy(__str.begin(), __str.end(), __ctx.out()); return __formatter::__write(__ctx.out(), __str.begin(), __str.end(), __size, this->__width, this->__fill, this->__alignment); diff --git a/libcxx/include/__format/formatter_integral.h b/libcxx/include/__format/formatter_integral.h --- a/libcxx/include/__format/formatter_integral.h +++ b/libcxx/include/__format/formatter_integral.h @@ -87,7 +87,7 @@ _Tp __value, int __base) { // TODO FMT Evaluate code overhead due to not calling the internal function // directly. (Should be zero overhead.) - to_chars_result __r = _VSTD::to_chars(__first, __last, __value, __base); + to_chars_result __r = std::to_chars(__first, __last, __value, __base); _LIBCPP_ASSERT(__r.ec == errc(0), "Internal buffer too small"); return __r.ptr; } @@ -244,7 +244,7 @@ } const auto __c = static_cast<_CharT>(__value); - return __write(_VSTD::addressof(__c), _VSTD::addressof(__c) + 1, + return __write(std::addressof(__c), std::addressof(__c) + 1, __ctx.out()); } @@ -304,9 +304,9 @@ unsigned __size = __last - __first; if (this->__type != _Flags::_Type::__hexadecimal_upper_case) [[likely]] { if (__size >= this->__width) - return _VSTD::copy(__first, __last, _VSTD::move(__out_it)); + return std::copy(__first, __last, std::move(__out_it)); - return __formatter::__write(_VSTD::move(__out_it), __first, __last, + return __formatter::__write(std::move(__out_it), __first, __last, __size, this->__width, this->__fill, this->__alignment); } @@ -319,10 +319,10 @@ // TODO FMT See whether it's possible to do this transformation during the // conversion. (This probably requires changing std::to_chars' alphabet.) if (__size >= this->__width) - return _VSTD::transform(__first, __last, _VSTD::move(__out_it), + return std::transform(__first, __last, std::move(__out_it), __hex_to_upper); - return __formatter::__write(_VSTD::move(__out_it), __first, __last, __size, + return __formatter::__write(std::move(__out_it), __first, __last, __size, __hex_to_upper, this->__width, this->__fill, this->__alignment); } @@ -362,14 +362,14 @@ // The zero padding is done like: // - Write [sign][prefix] // - Write data right aligned with '0' as fill character. - __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it)); + __out_it = std::copy(__begin, __first, std::move(__out_it)); this->__alignment = _Flags::_Alignment::__right; this->__fill = _CharT('0'); uint32_t __size = __first - __begin; - this->__width -= _VSTD::min(__size, this->__width); + this->__width -= std::min(__size, this->__width); } - return __write(__first, __last, _VSTD::move(__out_it)); + return __write(__first, __last, std::move(__out_it)); } #ifndef _LIBCPP_HAS_NO_LOCALIZATION @@ -390,12 +390,12 @@ __formatter::__padding_size_result __padding = {0, 0}; if (this->__alignment == _Flags::_Alignment::__default) { // Write [sign][prefix]. - __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it)); + __out_it = std::copy(__begin, __first, std::move(__out_it)); if (this->__width > __size) { // Write zero padding. __padding.__before = this->__width - __size; - __out_it = _VSTD::fill_n(_VSTD::move(__out_it), this->__width - __size, + __out_it = std::fill_n(std::move(__out_it), this->__width - __size, _CharT('0')); } } else { @@ -404,11 +404,11 @@ __padding = __formatter::__padding_size(__size, this->__width, this->__alignment); - __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before, + __out_it = std::fill_n(std::move(__out_it), __padding.__before, this->__fill); } // Write [sign][prefix]. - __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it)); + __out_it = std::copy(__begin, __first, std::move(__out_it)); } auto __r = __grouping.rbegin(); @@ -429,11 +429,11 @@ while (true) { if (this->__type == _Flags::_Type::__hexadecimal_upper_case) { __last = __first + *__r; - __out_it = _VSTD::transform(__first, __last, _VSTD::move(__out_it), + __out_it = std::transform(__first, __last, std::move(__out_it), __hex_to_upper); __first = __last; } else { - __out_it = _VSTD::copy_n(__first, *__r, _VSTD::move(__out_it)); + __out_it = std::copy_n(__first, *__r, std::move(__out_it)); __first += *__r; } @@ -444,7 +444,7 @@ *__out_it++ = __sep; } - return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after, + return std::fill_n(std::move(__out_it), __padding.__after, this->__fill); } #endif // _LIBCPP_HAS_NO_LOCALIZATION diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h --- a/libcxx/include/__format/parser_std_format_spec.h +++ b/libcxx/include/__format/parser_std_format_spec.h @@ -872,7 +872,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __estimate_column_width_fast(const _CharT* __first, const _CharT* __last) noexcept { - return _VSTD::find_if(__first, __last, + return std::find_if(__first, __last, [](unsigned char __c) { return __c & 0x80; }); } @@ -885,7 +885,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __estimate_column_width_fast(const _CharT* __first, const _CharT* __last) noexcept { - return _VSTD::find_if(__first, __last, + return std::find_if(__first, __last, [](uint32_t __c) { return __c >= 0x1100; }); } @@ -913,7 +913,7 @@ __estimate_column_width_malformed(const _CharT* __first, const _CharT* __last, size_t __maximum, size_t __result) noexcept { size_t __size = __last - __first; - size_t __n = _VSTD::min(__size, __maximum); + size_t __n = std::min(__size, __maximum); return {__result + __n, __first + __n}; } @@ -940,7 +940,7 @@ // Based on the number of leading 1 bits the number of code units in the // code point can be determined. See // https://en.wikipedia.org/wiki/UTF-8#Encoding - switch (_VSTD::countl_one(static_cast(*__first))) { + switch (std::countl_one(static_cast(*__first))) { case 0: // 1-code unit encoding: all 1 column ++__result; ++__first; @@ -1088,7 +1088,7 @@ const ptrdiff_t __length = __last - __first; const _CharT* __limit = __first + - (__precision == -1 ? __length : _VSTD::min(__length, __precision)); + (__precision == -1 ? __length : std::min(__length, __precision)); ptrdiff_t __size = __limit - __first; const _CharT* __pos = __detail::__estimate_column_width_fast(__first, __limit); @@ -1154,7 +1154,7 @@ const ptrdiff_t __length = __last - __first; const _CharT* __limit = __first + - (__precision == -1 ? __length : _VSTD::min(__length, __precision)); + (__precision == -1 ? __length : std::min(__length, __precision)); ptrdiff_t __size = __limit - __first; return {__limit, __size, __size < __width}; } diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h --- a/libcxx/include/__functional/bind.h +++ b/libcxx/include/__functional/bind.h @@ -98,7 +98,7 @@ typename __invoke_of<_Ti&, _Uj...>::type __mu_expand(_Ti& __ti, tuple<_Uj...>& __uj, __tuple_indices<_Indx...>) { - return __ti(_VSTD::forward<_Uj>(_VSTD::get<_Indx>(__uj))...); + return __ti(std::forward<_Uj>(std::get<_Indx>(__uj))...); } template @@ -111,7 +111,7 @@ __mu(_Ti& __ti, tuple<_Uj...>& __uj) { typedef typename __make_tuple_indices::type __indices; - return _VSTD::__mu_expand(__ti, __uj, __indices()); + return std::__mu_expand(__ti, __uj, __indices()); } template @@ -133,7 +133,7 @@ __mu(_Ti&, _Uj& __uj) { const size_t _Indx = is_placeholder<_Ti>::value - 1; - return _VSTD::forward::type>(_VSTD::get<_Indx>(__uj)); + return std::forward::type>(std::get<_Indx>(__uj)); } template @@ -260,7 +260,7 @@ __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, _Args&& __args) { - return _VSTD::__invoke(__f, _VSTD::__mu(_VSTD::get<_Indx>(__bound_args), __args)...); + return std::__invoke(__f, std::__mu(std::get<_Indx>(__bound_args), __args)...); } template @@ -287,16 +287,16 @@ >::type> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit __bind(_Gp&& __f, _BA&& ...__bound_args) - : __f_(_VSTD::forward<_Gp>(__f)), - __bound_args_(_VSTD::forward<_BA>(__bound_args)...) {} + : __f_(std::forward<_Gp>(__f)), + __bound_args_(std::forward<_BA>(__bound_args)...) {} template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type operator()(_Args&& ...__args) { - return _VSTD::__apply_functor(__f_, __bound_args_, __indices(), - tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...)); + return std::__apply_functor(__f_, __bound_args_, __indices(), + tuple<_Args&&...>(std::forward<_Args>(__args)...)); } template @@ -304,8 +304,8 @@ typename __bind_return >::type operator()(_Args&& ...__args) const { - return _VSTD::__apply_functor(__f_, __bound_args_, __indices(), - tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...)); + return std::__apply_functor(__f_, __bound_args_, __indices(), + tuple<_Args&&...>(std::forward<_Args>(__args)...)); } }; @@ -332,8 +332,8 @@ >::type> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit __bind_r(_Gp&& __f, _BA&& ...__bound_args) - : base(_VSTD::forward<_Gp>(__f), - _VSTD::forward<_BA>(__bound_args)...) {} + : base(std::forward<_Gp>(__f), + std::forward<_BA>(__bound_args)...) {} template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 @@ -346,7 +346,7 @@ operator()(_Args&& ...__args) { typedef __invoke_void_return_wrapper<_Rp> _Invoker; - return _Invoker::__call(static_cast(*this), _VSTD::forward<_Args>(__args)...); + return _Invoker::__call(static_cast(*this), std::forward<_Args>(__args)...); } template @@ -360,7 +360,7 @@ operator()(_Args&& ...__args) const { typedef __invoke_void_return_wrapper<_Rp> _Invoker; - return _Invoker::__call(static_cast(*this), _VSTD::forward<_Args>(__args)...); + return _Invoker::__call(static_cast(*this), std::forward<_Args>(__args)...); } }; @@ -373,7 +373,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args) { typedef __bind<_Fp, _BoundArgs...> type; - return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...); + return type(std::forward<_Fp>(__f), std::forward<_BoundArgs>(__bound_args)...); } template @@ -382,7 +382,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args) { typedef __bind_r<_Rp, _Fp, _BoundArgs...> type; - return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...); + return type(std::forward<_Fp>(__f), std::forward<_BoundArgs>(__bound_args)...); } #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__functional/bind_back.h b/libcxx/include/__functional/bind_back.h --- a/libcxx/include/__functional/bind_back.h +++ b/libcxx/include/__functional/bind_back.h @@ -34,9 +34,9 @@ template _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f, _Bound&& __bound, _Args&& ...__args) const - noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_Bound>(__bound))...))) - -> decltype( _VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_Bound>(__bound))...)) - { return _VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_Bound>(__bound))...); } + noexcept(noexcept(std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_Bound>(__bound))...))) + -> decltype( std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_Bound>(__bound))...)) + { return std::invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)..., std::get<_Ip>(std::forward<_Bound>(__bound))...); } }; template @@ -54,9 +54,9 @@ >> _LIBCPP_HIDE_FROM_ABI constexpr auto __bind_back(_Fn&& __f, _Args&&... __args) - noexcept(noexcept(__bind_back_t, tuple...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)))) - -> decltype( __bind_back_t, tuple...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...))) - { return __bind_back_t, tuple...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); } + noexcept(noexcept(__bind_back_t, tuple...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...)))) + -> decltype( __bind_back_t, tuple...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...))) + { return __bind_back_t, tuple...>>(std::forward<_Fn>(__f), std::forward_as_tuple(std::forward<_Args>(__args)...)); } #endif // _LIBCPP_STD_VER > 17 diff --git a/libcxx/include/__functional/bind_front.h b/libcxx/include/__functional/bind_front.h --- a/libcxx/include/__functional/bind_front.h +++ b/libcxx/include/__functional/bind_front.h @@ -28,9 +28,9 @@ template _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&& ...__args) const - noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Args>(__args)...))) - -> decltype( _VSTD::invoke(_VSTD::forward<_Args>(__args)...)) - { return _VSTD::invoke(_VSTD::forward<_Args>(__args)...); } + noexcept(noexcept(std::invoke(std::forward<_Args>(__args)...))) + -> decltype( std::invoke(std::forward<_Args>(__args)...)) + { return std::invoke(std::forward<_Args>(__args)...); } }; template @@ -48,7 +48,7 @@ >> _LIBCPP_HIDE_FROM_ABI constexpr auto bind_front(_Fn&& __f, _Args&&... __args) { - return __bind_front_t, decay_t<_Args>...>(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...); + return __bind_front_t, decay_t<_Args>...>(std::forward<_Fn>(__f), std::forward<_Args>(__args)...); } #endif // _LIBCPP_STD_VER > 17 diff --git a/libcxx/include/__functional/compose.h b/libcxx/include/__functional/compose.h --- a/libcxx/include/__functional/compose.h +++ b/libcxx/include/__functional/compose.h @@ -28,9 +28,9 @@ template _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn1&& __f1, _Fn2&& __f2, _Args&&... __args) const - noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...)))) - -> decltype( _VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...))) - { return _VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...)); } + noexcept(noexcept(std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...)))) + -> decltype( std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...))) + { return std::invoke(std::forward<_Fn1>(__f1), std::invoke(std::forward<_Fn2>(__f2), std::forward<_Args>(__args)...)); } }; template @@ -41,9 +41,9 @@ template _LIBCPP_HIDE_FROM_ABI constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2) - noexcept(noexcept(__compose_t, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)))) - -> decltype( __compose_t, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2))) - { return __compose_t, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)); } + noexcept(noexcept(__compose_t, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2)))) + -> decltype( __compose_t, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2))) + { return __compose_t, decay_t<_Fn2>>(std::forward<_Fn1>(__f1), std::forward<_Fn2>(__f2)); } #endif // _LIBCPP_STD_VER > 17 diff --git a/libcxx/include/__functional/default_searcher.h b/libcxx/include/__functional/default_searcher.h --- a/libcxx/include/__functional/default_searcher.h +++ b/libcxx/include/__functional/default_searcher.h @@ -38,7 +38,7 @@ pair<_ForwardIterator2, _ForwardIterator2> operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const { - return _VSTD::__search(__f, __l, __first_, __last_, __pred_, + return std::__search(__f, __l, __first_, __last_, __pred_, typename iterator_traits<_ForwardIterator>::iterator_category(), typename iterator_traits<_ForwardIterator2>::iterator_category()); } diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -57,7 +57,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_function_call(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -147,29 +147,29 @@ _LIBCPP_INLINE_VISIBILITY explicit __alloc_func(_Target&& __f) - : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)), - _VSTD::forward_as_tuple()) + : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), + std::forward_as_tuple()) { } _LIBCPP_INLINE_VISIBILITY explicit __alloc_func(const _Target& __f, const _Alloc& __a) - : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f), - _VSTD::forward_as_tuple(__a)) + : __f_(piecewise_construct, std::forward_as_tuple(__f), + std::forward_as_tuple(__a)) { } _LIBCPP_INLINE_VISIBILITY explicit __alloc_func(const _Target& __f, _Alloc&& __a) - : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f), - _VSTD::forward_as_tuple(_VSTD::move(__a))) + : __f_(piecewise_construct, std::forward_as_tuple(__f), + std::forward_as_tuple(std::move(__a))) { } _LIBCPP_INLINE_VISIBILITY explicit __alloc_func(_Target&& __f, _Alloc&& __a) - : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)), - _VSTD::forward_as_tuple(_VSTD::move(__a))) + : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), + std::forward_as_tuple(std::move(__a))) { } @@ -178,7 +178,7 @@ { typedef __invoke_void_return_wrapper<_Rp> _Invoker; return _Invoker::__call(__f_.first(), - _VSTD::forward<_ArgTypes>(__arg)...); + std::forward<_ArgTypes>(__arg)...); } _LIBCPP_INLINE_VISIBILITY @@ -219,7 +219,7 @@ const _Target& __target() const { return __f_; } _LIBCPP_INLINE_VISIBILITY - explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {} + explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {} _LIBCPP_INLINE_VISIBILITY explicit __default_alloc_func(const _Target& __f) : __f_(__f) {} @@ -227,7 +227,7 @@ _LIBCPP_INLINE_VISIBILITY _Rp operator()(_ArgTypes&&... __arg) { typedef __invoke_void_return_wrapper<_Rp> _Invoker; - return _Invoker::__call(__f_, _VSTD::forward<_ArgTypes>(__arg)...); + return _Invoker::__call(__f_, std::forward<_ArgTypes>(__arg)...); } _LIBCPP_INLINE_VISIBILITY @@ -284,7 +284,7 @@ public: _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp&& __f) - : __f_(_VSTD::move(__f)) {} + : __f_(std::move(__f)) {} _LIBCPP_INLINE_VISIBILITY explicit __func(const _Fp& __f, const _Alloc& __a) @@ -292,11 +292,11 @@ _LIBCPP_INLINE_VISIBILITY explicit __func(const _Fp& __f, _Alloc&& __a) - : __f_(__f, _VSTD::move(__a)) {} + : __f_(__f, std::move(__a)) {} _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp&& __f, _Alloc&& __a) - : __f_(_VSTD::move(__f), _VSTD::move(__a)) {} + : __f_(std::move(__f), std::move(__a)) {} virtual __base<_Rp(_ArgTypes...)>* __clone() const; virtual void __clone(__base<_Rp(_ArgTypes...)>*) const; @@ -351,7 +351,7 @@ _Rp __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg) { - return __f_(_VSTD::forward<_ArgTypes>(__arg)...); + return __f_(std::forward<_ArgTypes>(__arg)...); } #ifndef _LIBCPP_NO_RTTI @@ -361,7 +361,7 @@ __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target(const type_info& __ti) const _NOEXCEPT { if (__ti == typeid(_Fp)) - return _VSTD::addressof(__f_.__target()); + return std::addressof(__f_.__target()); return nullptr; } @@ -411,13 +411,13 @@ is_nothrow_copy_constructible<_FunAlloc>::value) { __f_ = - ::new ((void*)&__buf_) _Fun(_VSTD::move(__f), _Alloc(__af)); + ::new ((void*)&__buf_) _Fun(std::move(__f), _Alloc(__af)); } else { typedef __allocator_destructor<_FunAlloc> _Dp; unique_ptr<__func, _Dp> __hold(__af.allocate(1), _Dp(__af, 1)); - ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f), _Alloc(__a)); + ::new ((void*)__hold.get()) _Fun(std::move(__f), _Alloc(__a)); __f_ = __hold.release(); } } @@ -426,7 +426,7 @@ template ::type, __value_func>::value>::type> _LIBCPP_INLINE_VISIBILITY explicit __value_func(_Fp&& __f) - : __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {} + : __value_func(std::forward<_Fp>(__f), allocator<_Fp>()) {} _LIBCPP_INLINE_VISIBILITY __value_func(const __value_func& __f) @@ -504,7 +504,7 @@ { if (__f_ == nullptr) __throw_bad_function_call(); - return (*__f_)(_VSTD::forward<_ArgTypes>(__args)...); + return (*__f_)(std::forward<_ArgTypes>(__args)...); } _LIBCPP_INLINE_VISIBILITY @@ -542,7 +542,7 @@ __f_ = __as_base(&__buf_); } else - _VSTD::swap(__f_, __f.__f_); + std::swap(__f_, __f.__f_); } _LIBCPP_INLINE_VISIBILITY @@ -708,7 +708,7 @@ _Fun* __f = reinterpret_cast<_Fun*>(__use_small_storage<_Fun>::value ? &__buf->__small : __buf->__large); - return (*__f)(_VSTD::forward<_ArgTypes>(__args)...); + return (*__f)(std::forward<_ArgTypes>(__args)...); } }; @@ -754,14 +754,14 @@ if (__use_small_storage<_Fun>()) { ::new ((void*)&__buf_.__small) - _Fun(_VSTD::move(__f), _Alloc(__af)); + _Fun(std::move(__f), _Alloc(__af)); } else { typedef __allocator_destructor<_FunAlloc> _Dp; unique_ptr<_Fun, _Dp> __hold(__af.allocate(1), _Dp(__af, 1)); ::new ((void*)__hold.get()) - _Fun(_VSTD::move(__f), _Alloc(__af)); + _Fun(std::move(__f), _Alloc(__af)); __buf_.__large = __hold.release(); } } @@ -776,11 +776,11 @@ __invoker_ = __invoker::template __create<_Fun>(); __policy_ = __policy::__create<_Fun>(); if (__use_small_storage<_Fun>()) { - ::new ((void*)&__buf_.__small) _Fun(_VSTD::move(__f)); + ::new ((void*)&__buf_.__small) _Fun(std::move(__f)); } else { __builtin_new_allocator::__holder_t __hold = __builtin_new_allocator::__allocate_type<_Fun>(1); - __buf_.__large = ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f)); + __buf_.__large = ::new ((void*)__hold.get()) _Fun(std::move(__f)); (void)__hold.release(); } } @@ -840,16 +840,16 @@ _LIBCPP_INLINE_VISIBILITY _Rp operator()(_ArgTypes&&... __args) const { - return __invoker_.__call_(_VSTD::addressof(__buf_), - _VSTD::forward<_ArgTypes>(__args)...); + return __invoker_.__call_(std::addressof(__buf_), + std::forward<_ArgTypes>(__args)...); } _LIBCPP_INLINE_VISIBILITY void swap(__policy_func& __f) { - _VSTD::swap(__invoker_, __f.__invoker_); - _VSTD::swap(__policy_, __f.__policy_); - _VSTD::swap(__buf_, __f.__buf_); + std::swap(__invoker_, __f.__invoker_); + std::swap(__policy_, __f.__policy_); + std::swap(__buf_, __f.__buf_); } _LIBCPP_INLINE_VISIBILITY @@ -929,7 +929,7 @@ } virtual _Rp operator()(_ArgTypes&& ... __arg) { - return _VSTD::__invoke(__f_, _VSTD::forward<_ArgTypes>(__arg)...); + return std::__invoke(__f_, std::forward<_ArgTypes>(__arg)...); } #ifndef _LIBCPP_NO_RTTI @@ -1027,7 +1027,7 @@ template _LIBCPP_INLINE_VISIBILITY void assign(_Fp&& __f, const _Alloc& __a) - {function(allocator_arg, __a, _VSTD::forward<_Fp>(__f)).swap(*this);} + {function(allocator_arg, __a, std::forward<_Fp>(__f)).swap(*this);} #endif // function capacity: @@ -1112,26 +1112,26 @@ template function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT - : __f_(_VSTD::move(__f.__f_)) {} + : __f_(std::move(__f.__f_)) {} #if _LIBCPP_STD_VER <= 14 template template function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&, function&& __f) - : __f_(_VSTD::move(__f.__f_)) {} + : __f_(std::move(__f.__f_)) {} #endif template template -function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(_VSTD::move(__f)) {} +function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(std::move(__f)) {} #if _LIBCPP_STD_VER <= 14 template template function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a, _Fp __f) - : __f_(_VSTD::move(__f), __a) {} + : __f_(std::move(__f), __a) {} #endif template @@ -1146,7 +1146,7 @@ function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT { - __f_ = _VSTD::move(__f.__f_); + __f_ = std::move(__f.__f_); return *this; } @@ -1163,7 +1163,7 @@ function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f) { - function(_VSTD::forward<_Fp>(__f)).swap(*this); + function(std::forward<_Fp>(__f)).swap(*this); return *this; } @@ -1181,7 +1181,7 @@ _Rp function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) const { - return __f_(_VSTD::forward<_ArgTypes>(__arg)...); + return __f_(std::forward<_ArgTypes>(__arg)...); } #ifndef _LIBCPP_NO_RTTI @@ -1327,8 +1327,8 @@ { __compressed_pair<_Fp, _Alloc> __f_; public: - explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {} - explicit __func(_Fp __f, _Alloc __a) : __f_(_VSTD::move(__f), _VSTD::move(__a)) {} + explicit __func(_Fp __f) : __f_(std::move(__f), __default_init_tag()) {} + explicit __func(_Fp __f, _Alloc __a) : __f_(std::move(__f), std::move(__a)) {} virtual __base<_Rp()>* __clone() const; virtual void __clone(__base<_Rp()>*) const; virtual void destroy(); @@ -1393,7 +1393,7 @@ __func<_Fp, _Alloc, _Rp()>::target(const type_info& __ti) const { if (__ti == typeid(_Fp)) - return _VSTD::addressof(__f_.first()); + return std::addressof(__f_.first()); return (const void*)0; } @@ -1412,9 +1412,9 @@ { __compressed_pair<_Fp, _Alloc> __f_; public: - _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {} + _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(std::move(__f), __default_init_tag()) {} _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a) - : __f_(_VSTD::move(__f), _VSTD::move(__a)) {} + : __f_(std::move(__f), std::move(__a)) {} virtual __base<_Rp(_A0)>* __clone() const; virtual void __clone(__base<_Rp(_A0)>*) const; virtual void destroy(); @@ -1498,9 +1498,9 @@ { __compressed_pair<_Fp, _Alloc> __f_; public: - _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {} + _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(std::move(__f), __default_init_tag()) {} _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a) - : __f_(_VSTD::move(__f), _VSTD::move(__a)) {} + : __f_(std::move(__f), std::move(__a)) {} virtual __base<_Rp(_A0, _A1)>* __clone() const; virtual void __clone(__base<_Rp(_A0, _A1)>*) const; virtual void destroy(); @@ -1584,9 +1584,9 @@ { __compressed_pair<_Fp, _Alloc> __f_; public: - _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {} + _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(std::move(__f), __default_init_tag()) {} _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a) - : __f_(_VSTD::move(__f), _VSTD::move(__a)) {} + : __f_(std::move(__f), std::move(__a)) {} virtual __base<_Rp(_A0, _A1, _A2)>* __clone() const; virtual void __clone(__base<_Rp(_A0, _A1, _A2)>*) const; virtual void destroy(); @@ -1849,7 +1849,7 @@ >::type function<_Rp()>::operator=(_Fp __f) { - function(_VSTD::move(__f)).swap(*this); + function(std::move(__f)).swap(*this); return *this; } @@ -1866,7 +1866,7 @@ void function<_Rp()>::swap(function& __f) { - if (_VSTD::addressof(__f) == this) + if (std::addressof(__f) == this) return; if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_) { @@ -1898,7 +1898,7 @@ __f_ = (__base*)&__buf_; } else - _VSTD::swap(__f_, __f.__f_); + std::swap(__f_, __f.__f_); } template @@ -2127,7 +2127,7 @@ >::type function<_Rp(_A0)>::operator=(_Fp __f) { - function(_VSTD::move(__f)).swap(*this); + function(std::move(__f)).swap(*this); return *this; } @@ -2144,7 +2144,7 @@ void function<_Rp(_A0)>::swap(function& __f) { - if (_VSTD::addressof(__f) == this) + if (std::addressof(__f) == this) return; if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_) { @@ -2176,7 +2176,7 @@ __f_ = (__base*)&__buf_; } else - _VSTD::swap(__f_, __f.__f_); + std::swap(__f_, __f.__f_); } template @@ -2405,7 +2405,7 @@ >::type function<_Rp(_A0, _A1)>::operator=(_Fp __f) { - function(_VSTD::move(__f)).swap(*this); + function(std::move(__f)).swap(*this); return *this; } @@ -2422,7 +2422,7 @@ void function<_Rp(_A0, _A1)>::swap(function& __f) { - if (_VSTD::addressof(__f) == this) + if (std::addressof(__f) == this) return; if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_) { @@ -2454,7 +2454,7 @@ __f_ = (__base*)&__buf_; } else - _VSTD::swap(__f_, __f.__f_); + std::swap(__f_, __f.__f_); } template @@ -2683,7 +2683,7 @@ >::type function<_Rp(_A0, _A1, _A2)>::operator=(_Fp __f) { - function(_VSTD::move(__f)).swap(*this); + function(std::move(__f)).swap(*this); return *this; } @@ -2700,7 +2700,7 @@ void function<_Rp(_A0, _A1, _A2)>::swap(function& __f) { - if (_VSTD::addressof(__f) == this) + if (std::addressof(__f) == this) return; if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_) { @@ -2732,7 +2732,7 @@ __f_ = (__base*)&__buf_; } else - _VSTD::swap(__f_, __f.__f_); + std::swap(__f_, __f.__f_); } template diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h --- a/libcxx/include/__functional/hash.h +++ b/libcxx/include/__functional/hash.h @@ -34,7 +34,7 @@ __loadword(const void* __p) { _Size __r; - _VSTD::memcpy(&__r, __p, sizeof(__r)); + std::memcpy(&__r, __p, sizeof(__r)); return __r; } @@ -253,7 +253,7 @@ __v = __weak_hash_len_32_with_seeds(__s, __v.second * __k1, __x + __w.first); __w = __weak_hash_len_32_with_seeds(__s + 32, __z + __w.second, __y + __loadword<_Size>(__s + 16)); - _VSTD::swap(__z, __x); + std::swap(__z, __x); __s += 64; __len -= 64; } while (__len != 0); diff --git a/libcxx/include/__functional/identity.h b/libcxx/include/__functional/identity.h --- a/libcxx/include/__functional/identity.h +++ b/libcxx/include/__functional/identity.h @@ -25,7 +25,7 @@ template _LIBCPP_NODISCARD_EXT constexpr _Tp&& operator()(_Tp&& __t) const noexcept { - return _VSTD::forward<_Tp>(__t); + return std::forward<_Tp>(__t); } using is_transparent = void; diff --git a/libcxx/include/__functional/invoke.h b/libcxx/include/__functional/invoke.h --- a/libcxx/include/__functional/invoke.h +++ b/libcxx/include/__functional/invoke.h @@ -27,27 +27,27 @@ #ifndef _LIBCPP_CXX03_LANG template static _Ret __call(_Args&&... __args) { - return _VSTD::__invoke(_VSTD::forward<_Args>(__args)...); + return std::__invoke(std::forward<_Args>(__args)...); } #else template static _Ret __call(_Fn __f) { - return _VSTD::__invoke(__f); + return std::__invoke(__f); } template static _Ret __call(_Fn __f, _A0& __a0) { - return _VSTD::__invoke(__f, __a0); + return std::__invoke(__f, __a0); } template static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1) { - return _VSTD::__invoke(__f, __a0, __a1); + return std::__invoke(__f, __a0, __a1); } template static _Ret __call(_Fn __f, _A0& __a0, _A1& __a1, _A2& __a2){ - return _VSTD::__invoke(__f, __a0, __a1, __a2); + return std::__invoke(__f, __a0, __a1, __a2); } #endif }; @@ -58,27 +58,27 @@ #ifndef _LIBCPP_CXX03_LANG template static void __call(_Args&&... __args) { - _VSTD::__invoke(_VSTD::forward<_Args>(__args)...); + std::__invoke(std::forward<_Args>(__args)...); } #else template static void __call(_Fn __f) { - _VSTD::__invoke(__f); + std::__invoke(__f); } template static void __call(_Fn __f, _A0& __a0) { - _VSTD::__invoke(__f, __a0); + std::__invoke(__f, __a0); } template static void __call(_Fn __f, _A0& __a0, _A1& __a1) { - _VSTD::__invoke(__f, __a0, __a1); + std::__invoke(__f, __a0, __a1); } template static void __call(_Fn __f, _A0& __a0, _A1& __a1, _A2& __a2) { - _VSTD::__invoke(__f, __a0, __a1, __a2); + std::__invoke(__f, __a0, __a1, __a2); } #endif }; @@ -90,7 +90,7 @@ invoke(_Fn&& __f, _Args&&... __args) noexcept(is_nothrow_invocable_v<_Fn, _Args...>) { - return _VSTD::__invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...); + return std::__invoke(std::forward<_Fn>(__f), std::forward<_Args>(__args)...); } #endif // _LIBCPP_STD_VER > 14 diff --git a/libcxx/include/__functional/mem_fn.h b/libcxx/include/__functional/mem_fn.h --- a/libcxx/include/__functional/mem_fn.h +++ b/libcxx/include/__functional/mem_fn.h @@ -44,7 +44,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename __invoke_return::type operator() (_ArgTypes&&... __args) const { - return _VSTD::__invoke(__f_, _VSTD::forward<_ArgTypes>(__args)...); + return std::__invoke(__f_, std::forward<_ArgTypes>(__args)...); } #else @@ -52,98 +52,98 @@ _LIBCPP_INLINE_VISIBILITY typename __invoke_return0::type operator() (_A0& __a0) const { - return _VSTD::__invoke(__f_, __a0); + return std::__invoke(__f_, __a0); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return0::type operator() (_A0 const& __a0) const { - return _VSTD::__invoke(__f_, __a0); + return std::__invoke(__f_, __a0); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return1::type operator() (_A0& __a0, _A1& __a1) const { - return _VSTD::__invoke(__f_, __a0, __a1); + return std::__invoke(__f_, __a0, __a1); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return1::type operator() (_A0 const& __a0, _A1& __a1) const { - return _VSTD::__invoke(__f_, __a0, __a1); + return std::__invoke(__f_, __a0, __a1); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return1::type operator() (_A0& __a0, _A1 const& __a1) const { - return _VSTD::__invoke(__f_, __a0, __a1); + return std::__invoke(__f_, __a0, __a1); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return1::type operator() (_A0 const& __a0, _A1 const& __a1) const { - return _VSTD::__invoke(__f_, __a0, __a1); + return std::__invoke(__f_, __a0, __a1); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0& __a0, _A1& __a1, _A2& __a2) const { - return _VSTD::__invoke(__f_, __a0, __a1, __a2); + return std::__invoke(__f_, __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0 const& __a0, _A1& __a1, _A2& __a2) const { - return _VSTD::__invoke(__f_, __a0, __a1, __a2); + return std::__invoke(__f_, __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0& __a0, _A1 const& __a1, _A2& __a2) const { - return _VSTD::__invoke(__f_, __a0, __a1, __a2); + return std::__invoke(__f_, __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0& __a0, _A1& __a1, _A2 const& __a2) const { - return _VSTD::__invoke(__f_, __a0, __a1, __a2); + return std::__invoke(__f_, __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0 const& __a0, _A1 const& __a1, _A2& __a2) const { - return _VSTD::__invoke(__f_, __a0, __a1, __a2); + return std::__invoke(__f_, __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0 const& __a0, _A1& __a1, _A2 const& __a2) const { - return _VSTD::__invoke(__f_, __a0, __a1, __a2); + return std::__invoke(__f_, __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0& __a0, _A1 const& __a1, _A2 const& __a2) const { - return _VSTD::__invoke(__f_, __a0, __a1, __a2); + return std::__invoke(__f_, __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0 const& __a0, _A1 const& __a1, _A2 const& __a2) const { - return _VSTD::__invoke(__f_, __a0, __a1, __a2); + return std::__invoke(__f_, __a0, __a1, __a2); } #endif }; diff --git a/libcxx/include/__functional/not_fn.h b/libcxx/include/__functional/not_fn.h --- a/libcxx/include/__functional/not_fn.h +++ b/libcxx/include/__functional/not_fn.h @@ -27,9 +27,9 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 auto operator()(_Args&&... __args) const - noexcept(noexcept(!_VSTD::invoke(_VSTD::forward<_Args>(__args)...))) - -> decltype( !_VSTD::invoke(_VSTD::forward<_Args>(__args)...)) - { return !_VSTD::invoke(_VSTD::forward<_Args>(__args)...); } + noexcept(noexcept(!std::invoke(std::forward<_Args>(__args)...))) + -> decltype( !std::invoke(std::forward<_Args>(__args)...)) + { return !std::invoke(std::forward<_Args>(__args)...); } }; template @@ -43,7 +43,7 @@ >> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 auto not_fn(_Fn&& __f) { - return __not_fn_t>(_VSTD::forward<_Fn>(__f)); + return __not_fn_t>(std::forward<_Fn>(__f)); } #endif // _LIBCPP_STD_VER > 14 diff --git a/libcxx/include/__functional/operations.h b/libcxx/include/__functional/operations.h --- a/libcxx/include/__functional/operations.h +++ b/libcxx/include/__functional/operations.h @@ -53,9 +53,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) + std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) + std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) + std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -90,9 +90,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) - std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) - std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) - std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -127,9 +127,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) * std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) * std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) * std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -164,9 +164,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) / std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) / std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) / std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -201,9 +201,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) % std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) % std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) % std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -237,9 +237,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_Tp&& __x) const - noexcept(noexcept(- _VSTD::forward<_Tp>(__x))) - -> decltype( - _VSTD::forward<_Tp>(__x)) - { return - _VSTD::forward<_Tp>(__x); } + noexcept(noexcept(- std::forward<_Tp>(__x))) + -> decltype( - std::forward<_Tp>(__x)) + { return - std::forward<_Tp>(__x); } typedef void is_transparent; }; #endif @@ -276,9 +276,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) & std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) & std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) & std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -307,9 +307,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_Tp&& __x) const - noexcept(noexcept(~_VSTD::forward<_Tp>(__x))) - -> decltype( ~_VSTD::forward<_Tp>(__x)) - { return ~_VSTD::forward<_Tp>(__x); } + noexcept(noexcept(~std::forward<_Tp>(__x))) + -> decltype( ~std::forward<_Tp>(__x)) + { return ~std::forward<_Tp>(__x); } typedef void is_transparent; }; #endif @@ -344,9 +344,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) | std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) | std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) | std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -381,9 +381,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) ^ std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) ^ std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) ^ std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -420,9 +420,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) == std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) == std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) == std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -457,9 +457,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) != std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) != std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) != std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -494,9 +494,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) < std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) < std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) < std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -531,9 +531,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) <= std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) <= std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) <= std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -568,9 +568,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) >= std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) >= std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) >= std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -605,9 +605,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) > std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) > std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) > std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -644,9 +644,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) && std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) && std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) && std::forward<_T2>(__u); } typedef void is_transparent; }; #endif @@ -680,9 +680,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_Tp&& __x) const - noexcept(noexcept(!_VSTD::forward<_Tp>(__x))) - -> decltype( !_VSTD::forward<_Tp>(__x)) - { return !_VSTD::forward<_Tp>(__x); } + noexcept(noexcept(!std::forward<_Tp>(__x))) + -> decltype( !std::forward<_Tp>(__x)) + { return !std::forward<_Tp>(__x); } typedef void is_transparent; }; #endif @@ -717,9 +717,9 @@ template _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const - noexcept(noexcept(_VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u))) - -> decltype( _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u)) - { return _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); } + noexcept(noexcept(std::forward<_T1>(__t) || std::forward<_T2>(__u))) + -> decltype( std::forward<_T1>(__t) || std::forward<_T2>(__u)) + { return std::forward<_T1>(__t) || std::forward<_T2>(__u); } typedef void is_transparent; }; #endif diff --git a/libcxx/include/__functional/perfect_forward.h b/libcxx/include/__functional/perfect_forward.h --- a/libcxx/include/__functional/perfect_forward.h +++ b/libcxx/include/__functional/perfect_forward.h @@ -38,7 +38,7 @@ is_constructible_v, _BoundArgs&&...> >> explicit constexpr __perfect_forward_impl(_BoundArgs&& ...__bound) - : __bound_(_VSTD::forward<_BoundArgs>(__bound)...) + : __bound_(std::forward<_BoundArgs>(__bound)...) { } __perfect_forward_impl(__perfect_forward_impl const&) = default; @@ -49,36 +49,36 @@ template >> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) & - noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...))) - -> decltype( _Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...)) - { return _Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...); } + noexcept(noexcept(_Op()(std::get<_Idx>(__bound_)..., std::forward<_Args>(__args)...))) + -> decltype( _Op()(std::get<_Idx>(__bound_)..., std::forward<_Args>(__args)...)) + { return _Op()(std::get<_Idx>(__bound_)..., std::forward<_Args>(__args)...); } template >> auto operator()(_Args&&...) & = delete; template >> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const& - noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...))) - -> decltype( _Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...)) - { return _Op()(_VSTD::get<_Idx>(__bound_)..., _VSTD::forward<_Args>(__args)...); } + noexcept(noexcept(_Op()(std::get<_Idx>(__bound_)..., std::forward<_Args>(__args)...))) + -> decltype( _Op()(std::get<_Idx>(__bound_)..., std::forward<_Args>(__args)...)) + { return _Op()(std::get<_Idx>(__bound_)..., std::forward<_Args>(__args)...); } template >> auto operator()(_Args&&...) const& = delete; template >> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) && - noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...))) - -> decltype( _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...)) - { return _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...); } + noexcept(noexcept(_Op()(std::get<_Idx>(std::move(__bound_))..., std::forward<_Args>(__args)...))) + -> decltype( _Op()(std::get<_Idx>(std::move(__bound_))..., std::forward<_Args>(__args)...)) + { return _Op()(std::get<_Idx>(std::move(__bound_))..., std::forward<_Args>(__args)...); } template >> auto operator()(_Args&&...) && = delete; template >> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&& - noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...))) - -> decltype( _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...)) - { return _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_))..., _VSTD::forward<_Args>(__args)...); } + noexcept(noexcept(_Op()(std::get<_Idx>(std::move(__bound_))..., std::forward<_Args>(__args)...))) + -> decltype( _Op()(std::get<_Idx>(std::move(__bound_))..., std::forward<_Args>(__args)...)) + { return _Op()(std::get<_Idx>(std::move(__bound_))..., std::forward<_Args>(__args)...); } template >> auto operator()(_Args&&...) const&& = delete; diff --git a/libcxx/include/__functional/ranges_operations.h b/libcxx/include/__functional/ranges_operations.h --- a/libcxx/include/__functional/ranges_operations.h +++ b/libcxx/include/__functional/ranges_operations.h @@ -27,8 +27,8 @@ template requires equality_comparable_with<_Tp, _Up> [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const - noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u)))) { - return _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u); + noexcept(noexcept(bool(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))) { + return std::forward<_Tp>(__t) == std::forward<_Up>(__u); } using is_transparent = void; @@ -38,8 +38,8 @@ template requires equality_comparable_with<_Tp, _Up> [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const - noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u))))) { - return !(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u)); + noexcept(noexcept(bool(!(std::forward<_Tp>(__t) == std::forward<_Up>(__u))))) { + return !(std::forward<_Tp>(__t) == std::forward<_Up>(__u)); } using is_transparent = void; @@ -49,8 +49,8 @@ template requires totally_ordered_with<_Tp, _Up> [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const - noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u)))) { - return _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u); + noexcept(noexcept(bool(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))) { + return std::forward<_Tp>(__t) < std::forward<_Up>(__u); } using is_transparent = void; @@ -60,8 +60,8 @@ template requires totally_ordered_with<_Tp, _Up> [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const - noexcept(noexcept(bool(!(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t))))) { - return !(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t)); + noexcept(noexcept(bool(!(std::forward<_Up>(__u) < std::forward<_Tp>(__t))))) { + return !(std::forward<_Up>(__u) < std::forward<_Tp>(__t)); } using is_transparent = void; @@ -71,8 +71,8 @@ template requires totally_ordered_with<_Tp, _Up> [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const - noexcept(noexcept(bool(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t)))) { - return _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t); + noexcept(noexcept(bool(std::forward<_Up>(__u) < std::forward<_Tp>(__t)))) { + return std::forward<_Up>(__u) < std::forward<_Tp>(__t); } using is_transparent = void; @@ -82,8 +82,8 @@ template requires totally_ordered_with<_Tp, _Up> [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const - noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u))))) { - return !(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u)); + noexcept(noexcept(bool(!(std::forward<_Tp>(__t) < std::forward<_Up>(__u))))) { + return !(std::forward<_Tp>(__t) < std::forward<_Up>(__u)); } using is_transparent = void; diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h --- a/libcxx/include/__functional/reference_wrapper.h +++ b/libcxx/include/__functional/reference_wrapper.h @@ -44,13 +44,13 @@ #ifdef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT - : __f_(_VSTD::addressof(__f)) {} + : __f_(std::addressof(__f)) {} #else template ::value, decltype(__fun(declval<_Up>())) >> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(declval<_Up>()))) { type& __f = static_cast<_Up&&>(__u); - __f_ = _VSTD::addressof(__f); + __f_ = std::addressof(__f); } #endif @@ -66,112 +66,112 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename __invoke_of::type operator() (_ArgTypes&&... __args) const { - return _VSTD::__invoke(get(), _VSTD::forward<_ArgTypes>(__args)...); + return std::__invoke(get(), std::forward<_ArgTypes>(__args)...); } #else _LIBCPP_INLINE_VISIBILITY typename __invoke_return::type operator() () const { - return _VSTD::__invoke(get()); + return std::__invoke(get()); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return0::type operator() (_A0& __a0) const { - return _VSTD::__invoke(get(), __a0); + return std::__invoke(get(), __a0); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return0::type operator() (_A0 const& __a0) const { - return _VSTD::__invoke(get(), __a0); + return std::__invoke(get(), __a0); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return1::type operator() (_A0& __a0, _A1& __a1) const { - return _VSTD::__invoke(get(), __a0, __a1); + return std::__invoke(get(), __a0, __a1); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return1::type operator() (_A0 const& __a0, _A1& __a1) const { - return _VSTD::__invoke(get(), __a0, __a1); + return std::__invoke(get(), __a0, __a1); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return1::type operator() (_A0& __a0, _A1 const& __a1) const { - return _VSTD::__invoke(get(), __a0, __a1); + return std::__invoke(get(), __a0, __a1); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return1::type operator() (_A0 const& __a0, _A1 const& __a1) const { - return _VSTD::__invoke(get(), __a0, __a1); + return std::__invoke(get(), __a0, __a1); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0& __a0, _A1& __a1, _A2& __a2) const { - return _VSTD::__invoke(get(), __a0, __a1, __a2); + return std::__invoke(get(), __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0 const& __a0, _A1& __a1, _A2& __a2) const { - return _VSTD::__invoke(get(), __a0, __a1, __a2); + return std::__invoke(get(), __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0& __a0, _A1 const& __a1, _A2& __a2) const { - return _VSTD::__invoke(get(), __a0, __a1, __a2); + return std::__invoke(get(), __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0& __a0, _A1& __a1, _A2 const& __a2) const { - return _VSTD::__invoke(get(), __a0, __a1, __a2); + return std::__invoke(get(), __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0 const& __a0, _A1 const& __a1, _A2& __a2) const { - return _VSTD::__invoke(get(), __a0, __a1, __a2); + return std::__invoke(get(), __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0 const& __a0, _A1& __a1, _A2 const& __a2) const { - return _VSTD::__invoke(get(), __a0, __a1, __a2); + return std::__invoke(get(), __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0& __a0, _A1 const& __a1, _A2 const& __a2) const { - return _VSTD::__invoke(get(), __a0, __a1, __a2); + return std::__invoke(get(), __a0, __a1, __a2); } template _LIBCPP_INLINE_VISIBILITY typename __invoke_return2::type operator() (_A0 const& __a0, _A1 const& __a1, _A2 const& __a2) const { - return _VSTD::__invoke(get(), __a0, __a1, __a2); + return std::__invoke(get(), __a0, __a1, __a2); } #endif // _LIBCPP_CXX03_LANG }; @@ -194,7 +194,7 @@ reference_wrapper<_Tp> ref(reference_wrapper<_Tp> __t) _NOEXCEPT { - return _VSTD::ref(__t.get()); + return std::ref(__t.get()); } template @@ -210,7 +210,7 @@ reference_wrapper cref(reference_wrapper<_Tp> __t) _NOEXCEPT { - return _VSTD::cref(__t.get()); + return std::cref(__t.get()); } #ifndef _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__functional/weak_result_type.h b/libcxx/include/__functional/weak_result_type.h --- a/libcxx/include/__functional/weak_result_type.h +++ b/libcxx/include/__functional/weak_result_type.h @@ -262,7 +262,7 @@ template struct __invoke_return { - typedef decltype(_VSTD::__invoke(declval<_Tp>(), declval<_Args>()...)) type; + typedef decltype(std::__invoke(declval<_Tp>(), declval<_Args>()...)) type; }; #else // defined(_LIBCPP_CXX03_LANG) @@ -434,13 +434,13 @@ template struct __invoke_return<_Fp, false> { - typedef decltype(_VSTD::__invoke(declval<_Fp&>())) type; + typedef decltype(std::__invoke(declval<_Fp&>())) type; }; template struct __invoke_return0 { - typedef decltype(_VSTD::__invoke(declval<_Tp&>(), declval<_A0&>())) type; + typedef decltype(std::__invoke(declval<_Tp&>(), declval<_A0&>())) type; }; template @@ -452,7 +452,7 @@ template struct __invoke_return1 { - typedef decltype(_VSTD::__invoke(declval<_Tp&>(), declval<_A0&>(), + typedef decltype(std::__invoke(declval<_Tp&>(), declval<_A0&>(), declval<_A1&>())) type; }; @@ -464,7 +464,7 @@ template struct __invoke_return2 { - typedef decltype(_VSTD::__invoke(declval<_Tp&>(), declval<_A0&>(), + typedef decltype(std::__invoke(declval<_Tp&>(), declval<_A0&>(), declval<_A1&>(), declval<_A2&>())) type; }; diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -151,11 +151,11 @@ } _LIBCPP_INLINE_VISIBILITY static __container_value_type* __get_ptr(__node_value_type& __n) { - return _VSTD::addressof(__n); + return std::addressof(__n); } _LIBCPP_INLINE_VISIBILITY static __container_value_type&& __move(__node_value_type& __v) { - return _VSTD::move(__v); + return std::move(__v); } }; @@ -191,7 +191,7 @@ _LIBCPP_INLINE_VISIBILITY static __container_value_type* __get_ptr(__node_value_type& __n) { - return _VSTD::addressof(__n.__get_value()); + return std::addressof(__n.__get_value()); } _LIBCPP_INLINE_VISIBILITY static pair __move(__node_value_type& __v) { @@ -288,7 +288,7 @@ typedef typename _NodeTypes::__node_value_type_pointer pointer; _LIBCPP_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT : __node_(nullptr) { - _VSTD::__debug_db_insert_i(this); + std::__debug_db_insert_i(this); } #if _LIBCPP_DEBUG_LEVEL == 2 @@ -296,7 +296,7 @@ __hash_iterator(const __hash_iterator& __i) : __node_(__i.__node_) { - __get_db()->__iterator_copy(this, _VSTD::addressof(__i)); + __get_db()->__iterator_copy(this, std::addressof(__i)); } _LIBCPP_INLINE_VISIBILITY @@ -398,7 +398,7 @@ _LIBCPP_INLINE_VISIBILITY __hash_const_iterator() _NOEXCEPT : __node_(nullptr) { - _VSTD::__debug_db_insert_i(this); + std::__debug_db_insert_i(this); } _LIBCPP_INLINE_VISIBILITY @@ -513,7 +513,7 @@ typedef typename _NodeTypes::__node_value_type_pointer pointer; _LIBCPP_INLINE_VISIBILITY __hash_local_iterator() _NOEXCEPT : __node_(nullptr) { - _VSTD::__debug_db_insert_i(this); + std::__debug_db_insert_i(this); } #if _LIBCPP_DEBUG_LEVEL == 2 @@ -645,7 +645,7 @@ _LIBCPP_INLINE_VISIBILITY __hash_const_local_iterator() _NOEXCEPT : __node_(nullptr) { - _VSTD::__debug_db_insert_i(this); + std::__debug_db_insert_i(this); } _LIBCPP_INLINE_VISIBILITY @@ -783,7 +783,7 @@ _LIBCPP_INLINE_VISIBILITY __bucket_list_deallocator(__bucket_list_deallocator&& __x) _NOEXCEPT_(is_nothrow_move_constructible::value) - : __data_(_VSTD::move(__x.__data_)) + : __data_(std::move(__x.__data_)) { __x.size() = 0; } @@ -1028,7 +1028,7 @@ _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { - return _VSTD::min( + return std::min( __node_traits::max_size(__node_alloc()), numeric_limits::max() ); @@ -1068,7 +1068,7 @@ template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique(_Pp&& __x) { - return __emplace_unique_extract_key(_VSTD::forward<_Pp>(__x), + return __emplace_unique_extract_key(std::forward<_Pp>(__x), __can_extract_key<_Pp, key_type>()); } @@ -1078,33 +1078,33 @@ __can_extract_map_key<_First, key_type, __container_value_type>::value, pair >::type __emplace_unique(_First&& __f, _Second&& __s) { - return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f), - _VSTD::forward<_Second>(__s)); + return __emplace_unique_key_args(__f, std::forward<_First>(__f), + std::forward<_Second>(__s)); } template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique(_Args&&... __args) { - return __emplace_unique_impl(_VSTD::forward<_Args>(__args)...); + return __emplace_unique_impl(std::forward<_Args>(__args)...); } template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) { - return __emplace_unique_impl(_VSTD::forward<_Pp>(__x)); + return __emplace_unique_impl(std::forward<_Pp>(__x)); } template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) { - return __emplace_unique_key_args(__x, _VSTD::forward<_Pp>(__x)); + return __emplace_unique_key_args(__x, std::forward<_Pp>(__x)); } template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) { - return __emplace_unique_key_args(__x.first, _VSTD::forward<_Pp>(__x)); + return __emplace_unique_key_args(__x.first, std::forward<_Pp>(__x)); } template @@ -1118,7 +1118,7 @@ _LIBCPP_INLINE_VISIBILITY pair __insert_unique(__container_value_type&& __x) { - return __emplace_unique_key_args(_NodeTypes::__get_key(__x), _VSTD::move(__x)); + return __emplace_unique_key_args(_NodeTypes::__get_key(__x), std::move(__x)); } template ::type> _LIBCPP_INLINE_VISIBILITY pair __insert_unique(_Pp&& __x) { - return __emplace_unique(_VSTD::forward<_Pp>(__x)); + return __emplace_unique(std::forward<_Pp>(__x)); } template _LIBCPP_INLINE_VISIBILITY iterator __insert_multi(_Pp&& __x) { - return __emplace_multi(_VSTD::forward<_Pp>(__x)); + return __emplace_multi(std::forward<_Pp>(__x)); } template _LIBCPP_INLINE_VISIBILITY iterator __insert_multi(const_iterator __p, _Pp&& __x) { - return __emplace_hint_multi(__p, _VSTD::forward<_Pp>(__x)); + return __emplace_hint_multi(__p, std::forward<_Pp>(__x)); } _LIBCPP_INLINE_VISIBILITY @@ -1267,7 +1267,7 @@ { _LIBCPP_ASSERT(__mlf > 0, "unordered container::max_load_factor(lf) called with lf <= 0"); - max_load_factor() = _VSTD::max(__mlf, load_factor()); + max_load_factor() = std::max(__mlf, load_factor()); } _LIBCPP_INLINE_VISIBILITY @@ -1370,8 +1370,8 @@ is_nothrow_move_assignable<__node_allocator>::value) { __bucket_list_.get_deleter().__alloc() = - _VSTD::move(__u.__bucket_list_.get_deleter().__alloc()); - __node_alloc() = _VSTD::move(__u.__node_alloc()); + std::move(__u.__bucket_list_.get_deleter().__alloc()); + __node_alloc() = std::move(__u.__node_alloc()); } _LIBCPP_INLINE_VISIBILITY void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {} @@ -1459,10 +1459,10 @@ is_nothrow_move_constructible<__node_allocator>::value && is_nothrow_move_constructible::value && is_nothrow_move_constructible::value) - : __bucket_list_(_VSTD::move(__u.__bucket_list_)), - __p1_(_VSTD::move(__u.__p1_)), - __p2_(_VSTD::move(__u.__p2_)), - __p3_(_VSTD::move(__u.__p3_)) + : __bucket_list_(std::move(__u.__bucket_list_)), + __p1_(std::move(__u.__p1_)), + __p2_(std::move(__u.__p2_)), + __p3_(std::move(__u.__p3_)) { if (size() > 0) { @@ -1478,8 +1478,8 @@ const allocator_type& __a) : __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)), __p1_(__default_init_tag(), __node_allocator(__a)), - __p2_(0, _VSTD::move(__u.hash_function())), - __p3_(_VSTD::move(__u.__p3_)) + __p2_(0, std::move(__u.hash_function())), + __p3_(std::move(__u.__p3_)) { if (__a == allocator_type(__u.__node_alloc())) { @@ -1533,7 +1533,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>& __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(const __hash_table& __u) { - if (this != _VSTD::addressof(__u)) + if (this != std::addressof(__u)) { __copy_assign_alloc(__u); hash_function() = __u.hash_function(); @@ -1563,7 +1563,7 @@ { (*__p)->__c_ = nullptr; if (--__c->end_ != __p) - _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); } } __get_db()->unlock(); @@ -1603,9 +1603,9 @@ __u.__bucket_list_.get_deleter().size() = 0; __move_assign_alloc(__u); size() = __u.size(); - hash_function() = _VSTD::move(__u.hash_function()); + hash_function() = std::move(__u.hash_function()); max_load_factor() = __u.max_load_factor(); - key_eq() = _VSTD::move(__u.key_eq()); + key_eq() = std::move(__u.key_eq()); __p1_.first().__next_ = __u.__p1_.first().__next_; if (size() > 0) { @@ -1628,8 +1628,8 @@ __move_assign(__u, true_type()); else { - hash_function() = _VSTD::move(__u.hash_function()); - key_eq() = _VSTD::move(__u.key_eq()); + hash_function() = std::move(__u.hash_function()); + key_eq() = std::move(__u.key_eq()); max_load_factor() = __u.max_load_factor(); if (bucket_count() != 0) { @@ -1642,7 +1642,7 @@ while (__cache != nullptr && __u.size() != 0) { __cache->__upcast()->__value_ = - _VSTD::move(__u.remove(__i++)->__value_); + std::move(__u.remove(__i++)->__value_); __next_pointer __next = __cache->__next_; __node_insert_multi(__cache->__upcast()); __cache = __next; @@ -1857,7 +1857,7 @@ } if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + !__is_hash_power2(__bc), + rehash(std::max(2 * __bc + !__is_hash_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); } return nullptr; @@ -1933,7 +1933,7 @@ size_type __bc = bucket_count(); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + !__is_hash_power2(__bc), + rehash(std::max(2 * __bc + !__is_hash_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); } @@ -2031,7 +2031,7 @@ size_type __bc = bucket_count(); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + !__is_hash_power2(__bc), + rehash(std::max(2 * __bc + !__is_hash_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); } @@ -2080,10 +2080,10 @@ } } { - __node_holder __h = __construct_node_hash(__hash, _VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node_hash(__hash, std::forward<_Args>(__args)...); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + !__is_hash_power2(__bc), + rehash(std::max(2 * __bc + !__is_hash_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); __chash = __constrain_hash(__hash, __bc); @@ -2124,7 +2124,7 @@ pair::iterator, bool> __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_impl(_Args&&... __args) { - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); pair __r = __node_insert_unique(__h.get()); if (__r.second) __h.release(); @@ -2136,7 +2136,7 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_multi(_Args&&... __args) { - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); iterator __r = __node_insert_multi(__h.get()); __h.release(); return __r; @@ -2151,7 +2151,7 @@ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, "unordered container::emplace_hint(const_iterator, args...) called with an iterator not" " referring to this unordered container"); - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); iterator __r = __node_insert_multi(__p, __h.get()); __h.release(); return __r; @@ -2170,7 +2170,7 @@ pair __result = __node_insert_unique(__nh.__ptr_); if (__result.second) __nh.__release_ptr(); - return _InsertReturnType{__result.first, __result.second, _VSTD::move(__nh)}; + return _InsertReturnType{__result.first, __result.second, std::move(__nh)}; } template @@ -2303,7 +2303,7 @@ __rehash(__n); else if (__n < __bc) { - __n = _VSTD::max + __n = std::max ( __n, __is_hash_power2(__bc) ? __next_hash_pow2(size_t(ceil(float(size()) / max_load_factor()))) : @@ -2441,7 +2441,7 @@ "Construct cannot be called with a hash value type"); __node_allocator& __na = __node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); - __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _VSTD::forward<_Args>(__args)...); + __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), std::forward<_Args>(__args)...); __h.get_deleter().__value_constructed = true; __h->__hash_ = hash_function()(__h->__value_); __h->__next_ = nullptr; @@ -2459,8 +2459,8 @@ __node_allocator& __na = __node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), - _VSTD::forward<_First>(__f), - _VSTD::forward<_Rest>(__rest)...); + std::forward<_First>(__f), + std::forward<_Rest>(__rest)...); __h.get_deleter().__value_constructed = true; __h->__hash_ = __hash; __h->__next_ = nullptr; @@ -2585,7 +2585,7 @@ { (*__dp)->__c_ = nullptr; if (--__c->end_ != __dp) - _VSTD::memmove(__dp, __dp+1, (__c->end_ - __dp)*sizeof(__i_node*)); + std::memmove(__dp, __dp+1, (__c->end_ - __dp)*sizeof(__i_node*)); } } __get_db()->unlock(); @@ -2713,11 +2713,11 @@ __bucket_list_.reset(__u.__bucket_list_.release()); __u.__bucket_list_.reset(__npp); } - _VSTD::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size()); - _VSTD::__swap_allocator(__bucket_list_.get_deleter().__alloc(), + std::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size()); + std::__swap_allocator(__bucket_list_.get_deleter().__alloc(), __u.__bucket_list_.get_deleter().__alloc()); - _VSTD::__swap_allocator(__node_alloc(), __u.__node_alloc()); - _VSTD::swap(__p1_.first().__next_, __u.__p1_.first().__next_); + std::__swap_allocator(__node_alloc(), __u.__node_alloc()); + std::swap(__p1_.first().__next_, __u.__p1_.first().__next_); __p2_.swap(__u.__p2_); __p3_.swap(__u.__p3_); if (size() > 0) diff --git a/libcxx/include/__iterator/access.h b/libcxx/include/__iterator/access.h --- a/libcxx/include/__iterator/access.h +++ b/libcxx/include/__iterator/access.h @@ -73,16 +73,16 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 -auto cbegin(const _Cp& __c) -> decltype(_VSTD::begin(__c)) +auto cbegin(const _Cp& __c) -> decltype(std::begin(__c)) { - return _VSTD::begin(__c); + return std::begin(__c); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 -auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c)) +auto cend(const _Cp& __c) -> decltype(std::end(__c)) { - return _VSTD::end(__c); + return std::end(__c); } #endif diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h --- a/libcxx/include/__iterator/advance.h +++ b/libcxx/include/__iterator/advance.h @@ -54,15 +54,15 @@ template < class _InputIter, class _Distance, - class _IntegralDistance = decltype(_VSTD::__convert_to_integral(declval<_Distance>())), + class _IntegralDistance = decltype(std::__convert_to_integral(declval<_Distance>())), class = __enable_if_t::value> > _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 void advance(_InputIter& __i, _Distance __orig_n) { typedef typename iterator_traits<_InputIter>::difference_type _Difference; - _Difference __n = static_cast<_Difference>(_VSTD::__convert_to_integral(__orig_n)); + _Difference __n = static_cast<_Difference>(std::__convert_to_integral(__orig_n)); _LIBCPP_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value, "Attempt to advance(it, n) with negative n on a non-bidirectional iterator"); - _VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category()); + std::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category()); } #if !defined(_LIBCPP_HAS_NO_RANGES) @@ -131,7 +131,7 @@ constexpr void operator()(_Ip& __i, _Sp __bound) const { // If `I` and `S` model `assignable_from`, equivalent to `i = std::move(bound)`. if constexpr (assignable_from<_Ip&, _Sp>) { - __i = _VSTD::move(__bound); + __i = std::move(__bound); } // Otherwise, if `S` and `I` model `sized_sentinel_for`, equivalent to `ranges::advance(i, bound - i)`. else if constexpr (sized_sentinel_for<_Sp, _Ip>) { diff --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h --- a/libcxx/include/__iterator/back_insert_iterator.h +++ b/libcxx/include/__iterator/back_insert_iterator.h @@ -45,12 +45,12 @@ typedef void reference; typedef _Container container_type; - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit back_insert_iterator(_Container& __x) : container(std::addressof(__x)) {} _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(const typename _Container::value_type& __value_) {container->push_back(__value_); return *this;} #ifndef _LIBCPP_CXX03_LANG _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(typename _Container::value_type&& __value_) - {container->push_back(_VSTD::move(__value_)); return *this;} + {container->push_back(std::move(__value_)); return *this;} #endif // _LIBCPP_CXX03_LANG _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator*() {return *this;} _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator++() {return *this;} diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h --- a/libcxx/include/__iterator/common_iterator.h +++ b/libcxx/include/__iterator/common_iterator.h @@ -38,11 +38,11 @@ iter_value_t<_Iter> __value; // We can move __x because the only caller verifies that __x is not a reference. constexpr __proxy(iter_reference_t<_Iter>&& __x) - : __value(_VSTD::move(__x)) {} + : __value(std::move(__x)) {} public: const iter_value_t<_Iter>* operator->() const { - return _VSTD::addressof(__value); + return std::addressof(__value); } }; @@ -51,7 +51,7 @@ iter_value_t<_Iter> __value; constexpr __postfix_proxy(iter_reference_t<_Iter>&& __x) - : __value(_VSTD::forward>(__x)) {} + : __value(std::forward>(__x)) {} public: constexpr static bool __valid_for_iter = @@ -68,8 +68,8 @@ common_iterator() requires default_initializable<_Iter> = default; - constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, _VSTD::move(__i)) {} - constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, _VSTD::move(__s)) {} + constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, std::move(__i)) {} + constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, std::move(__s)) {} template requires convertible_to && convertible_to @@ -77,8 +77,8 @@ : __hold_([&]() -> variant<_Iter, _Sent> { _LIBCPP_ASSERT(!__other.__hold_.valueless_by_exception(), "Constructed from valueless iterator."); if (__other.__hold_.index() == 0) - return variant<_Iter, _Sent>{in_place_index<0>, _VSTD::__unchecked_get<0>(__other.__hold_)}; - return variant<_Iter, _Sent>{in_place_index<1>, _VSTD::__unchecked_get<1>(__other.__hold_)}; + return variant<_Iter, _Sent>{in_place_index<0>, std::__unchecked_get<0>(__other.__hold_)}; + return variant<_Iter, _Sent>{in_place_index<1>, std::__unchecked_get<1>(__other.__hold_)}; }()) {} template @@ -92,15 +92,15 @@ // If they're the same index, just assign. if (__idx == 0 && __other_idx == 0) - _VSTD::__unchecked_get<0>(__hold_) = _VSTD::__unchecked_get<0>(__other.__hold_); + std::__unchecked_get<0>(__hold_) = std::__unchecked_get<0>(__other.__hold_); else if (__idx == 1 && __other_idx == 1) - _VSTD::__unchecked_get<1>(__hold_) = _VSTD::__unchecked_get<1>(__other.__hold_); + std::__unchecked_get<1>(__hold_) = std::__unchecked_get<1>(__other.__hold_); // Otherwise replace with the oposite element. else if (__other_idx == 1) - __hold_.template emplace<1>(_VSTD::__unchecked_get<1>(__other.__hold_)); + __hold_.template emplace<1>(std::__unchecked_get<1>(__other.__hold_)); else if (__other_idx == 0) - __hold_.template emplace<0>(_VSTD::__unchecked_get<0>(__other.__hold_)); + __hold_.template emplace<0>(std::__unchecked_get<0>(__other.__hold_)); return *this; } @@ -109,7 +109,7 @@ { _LIBCPP_ASSERT(holds_alternative<_Iter>(__hold_), "Cannot dereference sentinel. Common iterator not holding an iterator."); - return *_VSTD::__unchecked_get<_Iter>(__hold_); + return *std::__unchecked_get<_Iter>(__hold_); } decltype(auto) operator*() const @@ -117,7 +117,7 @@ { _LIBCPP_ASSERT(holds_alternative<_Iter>(__hold_), "Cannot dereference sentinel. Common iterator not holding an iterator."); - return *_VSTD::__unchecked_get<_Iter>(__hold_); + return *std::__unchecked_get<_Iter>(__hold_); } template @@ -131,19 +131,19 @@ "Cannot dereference sentinel. Common iterator not holding an iterator."); if constexpr (is_pointer_v<_Iter> || requires(const _Iter& __i) { __i.operator->(); }) { - return _VSTD::__unchecked_get<_Iter>(__hold_); + return std::__unchecked_get<_Iter>(__hold_); } else if constexpr (is_reference_v>) { - auto&& __tmp = *_VSTD::__unchecked_get<_Iter>(__hold_); - return _VSTD::addressof(__tmp); + auto&& __tmp = *std::__unchecked_get<_Iter>(__hold_); + return std::addressof(__tmp); } else { - return __proxy(*_VSTD::__unchecked_get<_Iter>(__hold_)); + return __proxy(*std::__unchecked_get<_Iter>(__hold_)); } } common_iterator& operator++() { _LIBCPP_ASSERT(holds_alternative<_Iter>(__hold_), "Cannot increment sentinel. Common iterator not holding an iterator."); - ++_VSTD::__unchecked_get<_Iter>(__hold_); return *this; + ++std::__unchecked_get<_Iter>(__hold_); return *this; } decltype(auto) operator++(int) { @@ -156,7 +156,7 @@ return __tmp; } else if constexpr (requires (_Iter& __i) { { *__i++ } -> __referenceable; } || !__postfix_proxy::__valid_for_iter) { - return _VSTD::__unchecked_get<_Iter>(__hold_)++; + return std::__unchecked_get<_Iter>(__hold_)++; } else { __postfix_proxy __p(**this); ++*this; @@ -178,9 +178,9 @@ return true; if (__x_index == 0) - return _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_S2>(__y.__hold_); + return std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_S2>(__y.__hold_); - return _VSTD::__unchecked_get<_Sent>(__x.__hold_) == _VSTD::__unchecked_get<_I2>(__y.__hold_); + return std::__unchecked_get<_Sent>(__x.__hold_) == std::__unchecked_get<_I2>(__y.__hold_); } template _S2> @@ -197,12 +197,12 @@ return true; if (__x_index == 0 && __y_index == 0) - return _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_I2>(__y.__hold_); + return std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_I2>(__y.__hold_); if (__x_index == 0) - return _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_S2>(__y.__hold_); + return std::__unchecked_get<_Iter>(__x.__hold_) == std::__unchecked_get<_S2>(__y.__hold_); - return _VSTD::__unchecked_get<_Sent>(__x.__hold_) == _VSTD::__unchecked_get<_I2>(__y.__hold_); + return std::__unchecked_get<_Sent>(__x.__hold_) == std::__unchecked_get<_I2>(__y.__hold_); } template _I2, sized_sentinel_for<_Iter> _S2> @@ -219,12 +219,12 @@ return 0; if (__x_index == 0 && __y_index == 0) - return _VSTD::__unchecked_get<_Iter>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_); + return std::__unchecked_get<_Iter>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_); if (__x_index == 0) - return _VSTD::__unchecked_get<_Iter>(__x.__hold_) - _VSTD::__unchecked_get<_S2>(__y.__hold_); + return std::__unchecked_get<_Iter>(__x.__hold_) - std::__unchecked_get<_S2>(__y.__hold_); - return _VSTD::__unchecked_get<_Sent>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_); + return std::__unchecked_get<_Sent>(__x.__hold_) - std::__unchecked_get<_I2>(__y.__hold_); } friend iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& __i) @@ -233,7 +233,7 @@ { _LIBCPP_ASSERT(holds_alternative<_Iter>(__i.__hold_), "Cannot iter_move a sentinel. Common iterator not holding an iterator."); - return ranges::iter_move( _VSTD::__unchecked_get<_Iter>(__i.__hold_)); + return ranges::iter_move( std::__unchecked_get<_Iter>(__i.__hold_)); } template _I2, class _S2> @@ -244,7 +244,7 @@ "Cannot swap __y with a sentinel. Common iterator (__x) not holding an iterator."); _LIBCPP_ASSERT(holds_alternative<_Iter>(__y.__hold_), "Cannot swap __x with a sentinel. Common iterator (__y) not holding an iterator."); - return ranges::iter_swap( _VSTD::__unchecked_get<_Iter>(__x.__hold_), _VSTD::__unchecked_get<_Iter>(__y.__hold_)); + return ranges::iter_swap( std::__unchecked_get<_Iter>(__x.__hold_), std::__unchecked_get<_Iter>(__y.__hold_)); } }; diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h --- a/libcxx/include/__iterator/concepts.h +++ b/libcxx/include/__iterator/concepts.h @@ -52,10 +52,10 @@ template concept indirectly_writable = requires(_Out&& __o, _Tp&& __t) { - *__o = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving - *_VSTD::forward<_Out>(__o) = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving - const_cast&&>(*__o) = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving - const_cast&&>(*_VSTD::forward<_Out>(__o)) = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving + *__o = std::forward<_Tp>(__t); // not required to be equality-preserving + *std::forward<_Out>(__o) = std::forward<_Tp>(__t); // not required to be equality-preserving + const_cast&&>(*__o) = std::forward<_Tp>(__t); // not required to be equality-preserving + const_cast&&>(*std::forward<_Out>(__o)) = std::forward<_Tp>(__t); // not required to be equality-preserving }; // [iterator.concept.winc] @@ -127,7 +127,7 @@ input_or_output_iterator<_Ip> && indirectly_writable<_Ip, _Tp> && requires (_Ip __it, _Tp&& __t) { - *__it++ = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving + *__it++ = std::forward<_Tp>(__t); // not required to be equality-preserving }; // [iterator.concept.forward] @@ -170,7 +170,7 @@ is_lvalue_reference_v> && same_as, remove_cvref_t>> && requires(const _Ip& __i) { - { _VSTD::to_address(__i) } -> same_as>>; + { std::to_address(__i) } -> same_as>>; }; template diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h --- a/libcxx/include/__iterator/counted_iterator.h +++ b/libcxx/include/__iterator/counted_iterator.h @@ -76,7 +76,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr counted_iterator(_Iter __iter, iter_difference_t<_Iter> __n) - : __current_(_VSTD::move(__iter)), __count_(__n) { + : __current_(std::move(__iter)), __count_(__n) { _LIBCPP_ASSERT(__n >= 0, "__n must not be negative."); } @@ -99,7 +99,7 @@ constexpr const _Iter& base() const& { return __current_; } _LIBCPP_HIDE_FROM_ABI - constexpr _Iter base() && { return _VSTD::move(__current_); } + constexpr _Iter base() && { return std::move(__current_); } _LIBCPP_HIDE_FROM_ABI constexpr iter_difference_t<_Iter> count() const noexcept { return __count_; } @@ -122,7 +122,7 @@ constexpr auto operator->() const noexcept requires contiguous_iterator<_Iter> { - return _VSTD::to_address(__current_); + return std::to_address(__current_); } _LIBCPP_HIDE_FROM_ABI diff --git a/libcxx/include/__iterator/distance.h b/libcxx/include/__iterator/distance.h --- a/libcxx/include/__iterator/distance.h +++ b/libcxx/include/__iterator/distance.h @@ -43,7 +43,7 @@ typename iterator_traits<_InputIter>::difference_type distance(_InputIter __first, _InputIter __last) { - return _VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category()); + return std::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category()); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__iterator/front_insert_iterator.h b/libcxx/include/__iterator/front_insert_iterator.h --- a/libcxx/include/__iterator/front_insert_iterator.h +++ b/libcxx/include/__iterator/front_insert_iterator.h @@ -45,12 +45,12 @@ typedef void reference; typedef _Container container_type; - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit front_insert_iterator(_Container& __x) : container(std::addressof(__x)) {} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(const typename _Container::value_type& __value_) {container->push_front(__value_); return *this;} #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(typename _Container::value_type&& __value_) - {container->push_front(_VSTD::move(__value_)); return *this;} + {container->push_front(std::move(__value_)); return *this;} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator++() {return *this;} diff --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h --- a/libcxx/include/__iterator/insert_iterator.h +++ b/libcxx/include/__iterator/insert_iterator.h @@ -56,12 +56,12 @@ typedef _Container container_type; _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i) - : container(_VSTD::addressof(__x)), iter(__i) {} + : container(std::addressof(__x)), iter(__i) {} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(const typename _Container::value_type& __value_) {iter = container->insert(iter, __value_); ++iter; return *this;} #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(typename _Container::value_type&& __value_) - {iter = container->insert(iter, _VSTD::move(__value_)); ++iter; return *this;} + {iter = container->insert(iter, std::move(__value_)); ++iter; return *this;} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator++() {return *this;} diff --git a/libcxx/include/__iterator/istream_iterator.h b/libcxx/include/__iterator/istream_iterator.h --- a/libcxx/include/__iterator/istream_iterator.h +++ b/libcxx/include/__iterator/istream_iterator.h @@ -45,14 +45,14 @@ _Tp __value_; public: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {} - _LIBCPP_INLINE_VISIBILITY istream_iterator(istream_type& __s) : __in_stream_(_VSTD::addressof(__s)) + _LIBCPP_INLINE_VISIBILITY istream_iterator(istream_type& __s) : __in_stream_(std::addressof(__s)) { if (!(*__in_stream_ >> __value_)) __in_stream_ = nullptr; } _LIBCPP_INLINE_VISIBILITY const _Tp& operator*() const {return __value_;} - _LIBCPP_INLINE_VISIBILITY const _Tp* operator->() const {return _VSTD::addressof((operator*()));} + _LIBCPP_INLINE_VISIBILITY const _Tp* operator->() const {return std::addressof((operator*()));} _LIBCPP_INLINE_VISIBILITY istream_iterator& operator++() { if (!(*__in_stream_ >> __value_)) diff --git a/libcxx/include/__iterator/iter_move.h b/libcxx/include/__iterator/iter_move.h --- a/libcxx/include/__iterator/iter_move.h +++ b/libcxx/include/__iterator/iter_move.h @@ -30,7 +30,7 @@ template concept __unqualified_iter_move = requires(_Ip&& __i) { - iter_move(_VSTD::forward<_Ip>(__i)); + iter_move(std::forward<_Ip>(__i)); }; // [iterator.cust.move]/1 @@ -44,9 +44,9 @@ template requires __class_or_enum> && __unqualified_iter_move<_Ip> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const - noexcept(noexcept(iter_move(_VSTD::forward<_Ip>(__i)))) + noexcept(noexcept(iter_move(std::forward<_Ip>(__i)))) { - return iter_move(_VSTD::forward<_Ip>(__i)); + return iter_move(std::forward<_Ip>(__i)); } // [iterator.cust.move]/1.2 @@ -55,14 +55,14 @@ // 1.2.2 otherwise, *E. template requires (!(__class_or_enum> && __unqualified_iter_move<_Ip>)) && - requires(_Ip&& __i) { *_VSTD::forward<_Ip>(__i); } + requires(_Ip&& __i) { *std::forward<_Ip>(__i); } [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const - noexcept(noexcept(*_VSTD::forward<_Ip>(__i))) + noexcept(noexcept(*std::forward<_Ip>(__i))) { - if constexpr (is_lvalue_reference_v(__i))>) { - return _VSTD::move(*_VSTD::forward<_Ip>(__i)); + if constexpr (is_lvalue_reference_v(__i))>) { + return std::move(*std::forward<_Ip>(__i)); } else { - return *_VSTD::forward<_Ip>(__i); + return *std::forward<_Ip>(__i); } } diff --git a/libcxx/include/__iterator/iter_swap.h b/libcxx/include/__iterator/iter_swap.h --- a/libcxx/include/__iterator/iter_swap.h +++ b/libcxx/include/__iterator/iter_swap.h @@ -35,7 +35,7 @@ template concept __unqualified_iter_swap = requires(_T1&& __x, _T2&& __y) { - iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y)); + iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y)); }; template @@ -48,9 +48,9 @@ requires __unqualified_iter_swap<_T1, _T2> _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_T1&& __x, _T2&& __y) const - noexcept(noexcept(iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y)))) + noexcept(noexcept(iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y)))) { - (void)iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y)); + (void)iter_swap(std::forward<_T1>(__x), std::forward<_T2>(__y)); } template @@ -58,9 +58,9 @@ __readable_swappable<_T1, _T2> _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_T1&& __x, _T2&& __y) const - noexcept(noexcept(ranges::swap(*_VSTD::forward<_T1>(__x), *_VSTD::forward<_T2>(__y)))) + noexcept(noexcept(ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y)))) { - ranges::swap(*_VSTD::forward<_T1>(__x), *_VSTD::forward<_T2>(__y)); + ranges::swap(*std::forward<_T1>(__x), *std::forward<_T2>(__y)); } template @@ -72,11 +72,11 @@ constexpr void operator()(_T1&& __x, _T2&& __y) const noexcept(noexcept(iter_value_t<_T2>(ranges::iter_move(__y))) && noexcept(*__y = ranges::iter_move(__x)) && - noexcept(*_VSTD::forward<_T1>(__x) = declval>())) + noexcept(*std::forward<_T1>(__x) = declval>())) { iter_value_t<_T2> __old(ranges::iter_move(__y)); *__y = ranges::iter_move(__x); - *_VSTD::forward<_T1>(__x) = _VSTD::move(__old); + *std::forward<_T1>(__x) = std::move(__old); } }; } // end namespace __iter_swap diff --git a/libcxx/include/__iterator/next.h b/libcxx/include/__iterator/next.h --- a/libcxx/include/__iterator/next.h +++ b/libcxx/include/__iterator/next.h @@ -32,7 +32,7 @@ _LIBCPP_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value, "Attempt to next(it, n) with negative n on a non-bidirectional iterator"); - _VSTD::advance(__x, __n); + std::advance(__x, __n); return __x; } diff --git a/libcxx/include/__iterator/ostream_iterator.h b/libcxx/include/__iterator/ostream_iterator.h --- a/libcxx/include/__iterator/ostream_iterator.h +++ b/libcxx/include/__iterator/ostream_iterator.h @@ -49,9 +49,9 @@ const char_type* __delim_; public: _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s) _NOEXCEPT - : __out_stream_(_VSTD::addressof(__s)), __delim_(nullptr) {} + : __out_stream_(std::addressof(__s)), __delim_(nullptr) {} _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT - : __out_stream_(_VSTD::addressof(__s)), __delim_(__delimiter) {} + : __out_stream_(std::addressof(__s)), __delim_(__delimiter) {} _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator=(const _Tp& __value_) { *__out_stream_ << __value_; diff --git a/libcxx/include/__iterator/prev.h b/libcxx/include/__iterator/prev.h --- a/libcxx/include/__iterator/prev.h +++ b/libcxx/include/__iterator/prev.h @@ -31,7 +31,7 @@ prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) { _LIBCPP_ASSERT(__n <= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value, "Attempt to prev(it, n) with a positive n on a non-bidirectional iterator"); - _VSTD::advance(__x, -__n); + std::advance(__x, -__n); return __x; } diff --git a/libcxx/include/__iterator/reverse_access.h b/libcxx/include/__iterator/reverse_access.h --- a/libcxx/include/__iterator/reverse_access.h +++ b/libcxx/include/__iterator/reverse_access.h @@ -83,16 +83,16 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 -auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c)) +auto crbegin(const _Cp& __c) -> decltype(std::rbegin(__c)) { - return _VSTD::rbegin(__c); + return std::rbegin(__c); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 -auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c)) +auto crend(const _Cp& __c) -> decltype(std::rend(__c)) { - return _VSTD::rend(__c); + return std::rend(__c); } #endif diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h --- a/libcxx/include/__iterator/reverse_iterator.h +++ b/libcxx/include/__iterator/reverse_iterator.h @@ -115,7 +115,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference operator*() const {_Iter __tmp = current; return *--__tmp;} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 - pointer operator->() const {return _VSTD::addressof(operator*());} + pointer operator->() const {return std::addressof(operator*());} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reverse_iterator& operator++() {--current; return *this;} _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 diff --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h --- a/libcxx/include/__iterator/wrap_iter.h +++ b/libcxx/include/__iterator/wrap_iter.h @@ -43,7 +43,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter() _NOEXCEPT : __i() { - _VSTD::__debug_db_insert_i(this); + std::__debug_db_insert_i(this); } template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter(const __wrap_iter<_Up>& __u, @@ -52,7 +52,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 if (!__libcpp_is_constant_evaluated()) - __get_db()->__iterator_copy(this, _VSTD::addressof(__u)); + __get_db()->__iterator_copy(this, std::addressof(__u)); #endif } #if _LIBCPP_DEBUG_LEVEL == 2 @@ -61,15 +61,15 @@ : __i(__x.base()) { if (!__libcpp_is_constant_evaluated()) - __get_db()->__iterator_copy(this, _VSTD::addressof(__x)); + __get_db()->__iterator_copy(this, std::addressof(__x)); } _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator=(const __wrap_iter& __x) { - if (this != _VSTD::addressof(__x)) + if (this != std::addressof(__x)) { if (!__libcpp_is_constant_evaluated()) - __get_db()->__iterator_copy(this, _VSTD::addressof(__x)); + __get_db()->__iterator_copy(this, std::addressof(__x)); __i = __x.__i; } return *this; @@ -91,7 +91,7 @@ { _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), "Attempted to dereference a non-dereferenceable iterator"); - return _VSTD::__to_address(__i); + return std::__to_address(__i); } _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator++() _NOEXCEPT { @@ -169,7 +169,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(_VSTD::addressof(__x), _VSTD::addressof(__y)), + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(std::addressof(__x), std::addressof(__y)), "Attempted to compare incomparable iterators"); return __x.base() < __y.base(); } @@ -249,7 +249,7 @@ operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT #endif // C++03 { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(_VSTD::addressof(__x), _VSTD::addressof(__y)), + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(std::addressof(__x), std::addressof(__y)), "Attempted to subtract incompatible iterators"); return __x.base() - __y.base(); } @@ -276,7 +276,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type *to_address(pointer __w) _NOEXCEPT { - return _VSTD::__to_address(__w.base()); + return std::__to_address(__w.base()); } }; diff --git a/libcxx/include/__locale b/libcxx/include/__locale --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -80,7 +80,7 @@ // locale name, otherwise it will be a semicolon-separated string listing // each category. In the second case, we know at least one category won't // be what we want, so we only have to check the first case. - if (_VSTD::strcmp(__l.__get_locale(), __lc) != 0) { + if (std::strcmp(__l.__get_locale(), __lc) != 0) { __locale_all = _strdup(__lc); if (__locale_all == nullptr) __throw_bad_alloc(); @@ -232,10 +232,10 @@ locale locale::combine(const locale& __other) const { - if (!_VSTD::has_facet<_Facet>(__other)) + if (!std::has_facet<_Facet>(__other)) __throw_runtime_error("locale::combine: locale missing facet"); - return locale(*this, &const_cast<_Facet&>(_VSTD::use_facet<_Facet>(__other))); + return locale(*this, &const_cast<_Facet&>(std::use_facet<_Facet>(__other))); } template @@ -394,7 +394,7 @@ locale::operator()(const basic_string<_CharT, _Traits, _Allocator>& __x, const basic_string<_CharT, _Traits, _Allocator>& __y) const { - return _VSTD::use_facet<_VSTD::collate<_CharT> >(*this).compare( + return std::use_facet >(*this).compare( __x.data(), __x.data() + __x.size(), __y.data(), __y.data() + __y.size()) < 0; } diff --git a/libcxx/include/__memory/allocation_guard.h b/libcxx/include/__memory/allocation_guard.h --- a/libcxx/include/__memory/allocation_guard.h +++ b/libcxx/include/__memory/allocation_guard.h @@ -48,7 +48,7 @@ template // we perform the allocator conversion inside the constructor _LIBCPP_HIDE_FROM_ABI explicit __allocation_guard(_AllocT __alloc, _Size __n) - : __alloc_(_VSTD::move(__alloc)) + : __alloc_(std::move(__alloc)) , __n_(__n) , __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important { } diff --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h --- a/libcxx/include/__memory/allocator.h +++ b/libcxx/include/__memory/allocator.h @@ -102,7 +102,7 @@ if (__libcpp_is_constant_evaluated()) { return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } else { - return static_cast<_Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); + return static_cast<_Tp*>(std::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); } } @@ -111,7 +111,7 @@ if (__libcpp_is_constant_evaluated()) { ::operator delete(__p); } else { - _VSTD::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)); + std::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)); } } @@ -129,11 +129,11 @@ _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY pointer address(reference __x) const _NOEXCEPT { - return _VSTD::addressof(__x); + return std::addressof(__x); } _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const _NOEXCEPT { - return _VSTD::addressof(__x); + return std::addressof(__x); } _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17 @@ -148,7 +148,7 @@ template _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY void construct(_Up* __p, _Args&&... __args) { - ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); + ::new ((void*)__p) _Up(std::forward<_Args>(__args)...); } _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY @@ -184,7 +184,7 @@ if (__libcpp_is_constant_evaluated()) { return static_cast(::operator new(__n * sizeof(_Tp))); } else { - return static_cast(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); + return static_cast(std::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp))); } } @@ -193,7 +193,7 @@ if (__libcpp_is_constant_evaluated()) { ::operator delete(const_cast<_Tp*>(__p)); } else { - _VSTD::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)); + std::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)); } } @@ -211,7 +211,7 @@ _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const _NOEXCEPT { - return _VSTD::addressof(__x); + return std::addressof(__x); } _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17 @@ -226,7 +226,7 @@ template _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY void construct(_Up* __p, _Args&&... __args) { - ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); + ::new ((void*)__p) _Up(std::forward<_Args>(__args)...); } _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h --- a/libcxx/include/__memory/allocator_arg_t.h +++ b/libcxx/include/__memory/allocator_arg_t.h @@ -52,7 +52,7 @@ inline _LIBCPP_INLINE_VISIBILITY void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &, _Args &&... __args ) { - new (__storage) _Tp (_VSTD::forward<_Args>(__args)...); + new (__storage) _Tp (std::forward<_Args>(__args)...); } // FIXME: This should have a version which takes a non-const alloc. @@ -60,7 +60,7 @@ inline _LIBCPP_INLINE_VISIBILITY void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &__a, _Args &&... __args ) { - new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...); + new (__storage) _Tp (allocator_arg, __a, std::forward<_Args>(__args)...); } // FIXME: This should have a version which takes a non-const alloc. @@ -68,7 +68,7 @@ inline _LIBCPP_INLINE_VISIBILITY void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &__a, _Args &&... __args ) { - new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a); + new (__storage) _Tp (std::forward<_Args>(__args)..., __a); } #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -287,7 +287,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) { _LIBCPP_SUPPRESS_DEPRECATED_PUSH - __a.construct(__p, _VSTD::forward<_Args>(__args)...); + __a.construct(__p, std::forward<_Args>(__args)...); _LIBCPP_SUPPRESS_DEPRECATED_POP } template 17 - _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...); + std::construct_at(__p, std::forward<_Args>(__args)...); #else - ::new ((void*)__p) _Tp(_VSTD::forward<_Args>(__args)...); + ::new ((void*)__p) _Tp(std::forward<_Args>(__args)...); #endif } @@ -314,7 +314,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 static void destroy(allocator_type&, _Tp* __p) { #if _LIBCPP_STD_VER > 17 - _VSTD::destroy_at(__p); + std::destroy_at(__p); #else __p->~_Tp(); #endif diff --git a/libcxx/include/__memory/compressed_pair.h b/libcxx/include/__memory/compressed_pair.h --- a/libcxx/include/__memory/compressed_pair.h +++ b/libcxx/include/__memory/compressed_pair.h @@ -45,7 +45,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(_Up&& __u) - : __value_(_VSTD::forward<_Up>(__u)) + : __value_(std::forward<_Up>(__u)) { } @@ -55,7 +55,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indexes...>) - : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {} + : __value_(std::forward<_Args>(std::get<_Indexes>(__args))...) {} #endif _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return __value_; } @@ -84,7 +84,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(_Up&& __u) - : __value_type(_VSTD::forward<_Up>(__u)) + : __value_type(std::forward<_Up>(__u)) {} #ifndef _LIBCPP_CXX03_LANG @@ -92,7 +92,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indexes...>) - : __value_type(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {} + : __value_type(std::forward<_Args>(std::get<_Indexes>(__args))...) {} #endif _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return *this; } @@ -127,16 +127,16 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __compressed_pair(_U1&& __t1, _U2&& __t2) - : _Base1(_VSTD::forward<_U1>(__t1)), _Base2(_VSTD::forward<_U2>(__t2)) {} + : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {} #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args, tuple<_Args2...> __second_args) - : _Base1(__pc, _VSTD::move(__first_args), + : _Base1(__pc, std::move(__first_args), typename __make_tuple_indices::type()), - _Base2(__pc, _VSTD::move(__second_args), + _Base2(__pc, std::move(__second_args), typename __make_tuple_indices::type()) {} #endif @@ -167,7 +167,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 void swap(__compressed_pair& __x) _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) { - using _VSTD::swap; + using std::swap; swap(first(), __x.first()); swap(second(), __x.second()); } diff --git a/libcxx/include/__memory/construct_at.h b/libcxx/include/__memory/construct_at.h --- a/libcxx/include/__memory/construct_at.h +++ b/libcxx/include/__memory/construct_at.h @@ -35,7 +35,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&& ...__args) { _LIBCPP_ASSERT(__location, "null pointer given to construct_at"); - return ::new (_VSTD::__voidify(*__location)) _Tp(_VSTD::forward<_Args>(__args)...); + return ::new (std::__voidify(*__location)) _Tp(std::forward<_Args>(__args)...); } #endif @@ -61,7 +61,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __destroy_at(_Tp* __loc) { _LIBCPP_ASSERT(__loc, "null pointer given to destroy_at"); - _VSTD::__destroy(_VSTD::begin(*__loc), _VSTD::end(*__loc)); + std::__destroy(std::begin(*__loc), std::end(*__loc)); } #endif @@ -69,7 +69,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator __destroy(_ForwardIterator __first, _ForwardIterator __last) { for (; __first != __last; ++__first) - _VSTD::__destroy_at(_VSTD::addressof(*__first)); + std::__destroy_at(std::addressof(*__first)); return __first; } @@ -78,28 +78,28 @@ template , int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void destroy_at(_Tp* __loc) { - _VSTD::__destroy_at(__loc); + std::__destroy_at(__loc); } #if _LIBCPP_STD_VER > 17 template , int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void destroy_at(_Tp* __loc) { - _VSTD::__destroy_at(__loc); + std::__destroy_at(__loc); } #endif template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void destroy(_ForwardIterator __first, _ForwardIterator __last) { - (void)_VSTD::__destroy(_VSTD::move(__first), _VSTD::move(__last)); + (void)std::__destroy(std::move(__first), std::move(__last)); } template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator destroy_n(_ForwardIterator __first, _Size __n) { for (; __n > 0; (void)++__first, --__n) - _VSTD::__destroy_at(_VSTD::addressof(*__first)); + std::__destroy_at(std::addressof(*__first)); return __first; } diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/include/__memory/pointer_traits.h @@ -148,7 +148,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 static pointer pointer_to(typename conditional::value, __nat, element_type>::type& __r) _NOEXCEPT - {return _VSTD::addressof(__r);} + {return std::addressof(__r);} }; template @@ -185,9 +185,9 @@ template struct __to_address_helper { _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - static decltype(_VSTD::__to_address(declval().operator->())) + static decltype(std::__to_address(declval().operator->())) __call(const _Pointer& __p) _NOEXCEPT { - return _VSTD::__to_address(__p.operator->()); + return std::__to_address(__p.operator->()); } }; @@ -204,13 +204,13 @@ template inline _LIBCPP_INLINE_VISIBILITY constexpr auto to_address(_Tp *__p) noexcept { - return _VSTD::__to_address(__p); + return std::__to_address(__p); } template inline _LIBCPP_INLINE_VISIBILITY constexpr auto to_address(const _Pointer& __p) noexcept { - return _VSTD::__to_address(__p); + return std::__to_address(__p); } #endif diff --git a/libcxx/include/__memory/ranges_construct_at.h b/libcxx/include/__memory/ranges_construct_at.h --- a/libcxx/include/__memory/ranges_construct_at.h +++ b/libcxx/include/__memory/ranges_construct_at.h @@ -45,7 +45,7 @@ )> _LIBCPP_HIDE_FROM_ABI constexpr _Tp* operator()(_Tp* __location, _Args&& ...__args) const { - return _VSTD::construct_at(__location, _VSTD::forward<_Args>(__args)...); + return std::construct_at(__location, std::forward<_Args>(__args)...); } }; @@ -65,7 +65,7 @@ template _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Tp* __location) const noexcept { - _VSTD::destroy_at(__location); + std::destroy_at(__location); } }; @@ -86,7 +86,7 @@ requires destructible> _LIBCPP_HIDE_FROM_ABI constexpr _InputIterator operator()(_InputIterator __first, _Sentinel __last) const noexcept { - return _VSTD::__destroy(_VSTD::move(__first), _VSTD::move(__last)); + return std::__destroy(std::move(__first), std::move(__last)); } template <__nothrow_input_range _InputRange> @@ -114,7 +114,7 @@ requires destructible> _LIBCPP_HIDE_FROM_ABI constexpr _InputIterator operator()(_InputIterator __first, iter_difference_t<_InputIterator> __n) const noexcept { - return _VSTD::destroy_n(_VSTD::move(__first), __n); + return std::destroy_n(std::move(__first), __n); } }; diff --git a/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/libcxx/include/__memory/ranges_uninitialized_algorithms.h --- a/libcxx/include/__memory/ranges_uninitialized_algorithms.h +++ b/libcxx/include/__memory/ranges_uninitialized_algorithms.h @@ -48,8 +48,8 @@ requires default_initializable> _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last) const { using _ValueType = remove_reference_t>; - return _VSTD::__uninitialized_default_construct<_ValueType>( - _VSTD::move(__first), _VSTD::move(__last)); + return std::__uninitialized_default_construct<_ValueType>( + std::move(__first), std::move(__last)); } template <__nothrow_forward_range _ForwardRange> @@ -77,7 +77,7 @@ _ForwardIterator operator()(_ForwardIterator __first, iter_difference_t<_ForwardIterator> __n) const { using _ValueType = remove_reference_t>; - return _VSTD::__uninitialized_default_construct_n<_ValueType>(_VSTD::move(__first), __n); + return std::__uninitialized_default_construct_n<_ValueType>(std::move(__first), __n); } }; @@ -101,8 +101,8 @@ requires default_initializable> _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last) const { using _ValueType = remove_reference_t>; - return _VSTD::__uninitialized_value_construct<_ValueType>( - _VSTD::move(__first), _VSTD::move(__last)); + return std::__uninitialized_value_construct<_ValueType>( + std::move(__first), std::move(__last)); } template <__nothrow_forward_range _ForwardRange> @@ -133,7 +133,7 @@ _ForwardIterator operator()(_ForwardIterator __first, iter_difference_t<_ForwardIterator> __n) const { using _ValueType = remove_reference_t>; - return _VSTD::__uninitialized_value_construct_n<_ValueType>(_VSTD::move(__first), __n); + return std::__uninitialized_value_construct_n<_ValueType>(std::move(__first), __n); } }; @@ -159,7 +159,7 @@ requires constructible_from, const _Tp&> _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last, const _Tp& __x) const { using _ValueType = remove_reference_t>; - return _VSTD::__uninitialized_fill<_ValueType>(_VSTD::move(__first), _VSTD::move(__last), __x); + return std::__uninitialized_fill<_ValueType>(std::move(__first), std::move(__last), __x); } template <__nothrow_forward_range _ForwardRange, class _Tp> @@ -190,7 +190,7 @@ iter_difference_t<_ForwardIterator> __n, const _Tp& __x) const { using _ValueType = remove_reference_t>; - return _VSTD::__uninitialized_fill_n<_ValueType>(_VSTD::move(__first), __n, __x); + return std::__uninitialized_fill_n<_ValueType>(std::move(__first), __n, __x); } }; @@ -220,9 +220,9 @@ operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const { using _ValueType = remove_reference_t>; - auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast), - _VSTD::move(__ofirst), _VSTD::move(__olast)); - return {_VSTD::move(__result.first), _VSTD::move(__result.second)}; + auto __result = std::__uninitialized_copy<_ValueType>(std::move(__ifirst), std::move(__ilast), + std::move(__ofirst), std::move(__olast)); + return {std::move(__result.first), std::move(__result.second)}; } template @@ -258,9 +258,9 @@ operator()(_InputIterator __ifirst, iter_difference_t<_InputIterator> __n, _OutputIterator __ofirst, _Sentinel __olast) const { using _ValueType = remove_reference_t>; - auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n, - _VSTD::move(__ofirst), _VSTD::move(__olast)); - return {_VSTD::move(__result.first), _VSTD::move(__result.second)}; + auto __result = std::__uninitialized_copy_n<_ValueType>(std::move(__ifirst), __n, + std::move(__ofirst), std::move(__olast)); + return {std::move(__result.first), std::move(__result.second)}; } }; @@ -290,9 +290,9 @@ using _ValueType = remove_reference_t>; auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); }; - auto __result = _VSTD::__uninitialized_move<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast), - _VSTD::move(__ofirst), _VSTD::move(__olast), __iter_move); - return {_VSTD::move(__result.first), _VSTD::move(__result.second)}; + auto __result = std::__uninitialized_move<_ValueType>(std::move(__ifirst), std::move(__ilast), + std::move(__ofirst), std::move(__olast), __iter_move); + return {std::move(__result.first), std::move(__result.second)}; } template @@ -330,9 +330,9 @@ using _ValueType = remove_reference_t>; auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); }; - auto __result = _VSTD::__uninitialized_move_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst), - _VSTD::move(__olast), __iter_move); - return {_VSTD::move(__result.first), _VSTD::move(__result.second)}; + auto __result = std::__uninitialized_move_n<_ValueType>(std::move(__ifirst), __n, std::move(__ofirst), + std::move(__olast), __iter_move); + return {std::move(__result.first), std::move(__result.second)}; } }; diff --git a/libcxx/include/__memory/raw_storage_iterator.h b/libcxx/include/__memory/raw_storage_iterator.h --- a/libcxx/include/__memory/raw_storage_iterator.h +++ b/libcxx/include/__memory/raw_storage_iterator.h @@ -48,10 +48,10 @@ _LIBCPP_INLINE_VISIBILITY explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {} _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(const _Tp& __element) - {::new ((void*)_VSTD::addressof(*__x_)) _Tp(__element); return *this;} + {::new ((void*)std::addressof(*__x_)) _Tp(__element); return *this;} #if _LIBCPP_STD_VER >= 14 _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(_Tp&& __element) - {::new ((void*)_VSTD::addressof(*__x_)) _Tp(_VSTD::move(__element)); return *this;} + {::new ((void*)std::addressof(*__x_)) _Tp(std::move(__element)); return *this;} #endif _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator++() {++__x_; return *this;} _LIBCPP_INLINE_VISIBILITY raw_storage_iterator operator++(int) diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -137,7 +137,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_weak_ptr(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -235,7 +235,7 @@ public: _LIBCPP_INLINE_VISIBILITY __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a) - : __data_(__compressed_pair<_Tp, _Dp>(__p, _VSTD::move(__d)), _VSTD::move(__a)) {} + : __data_(__compressed_pair<_Tp, _Dp>(__p, std::move(__d)), std::move(__a)) {} #ifndef _LIBCPP_NO_RTTI virtual const void* __get_deleter(const type_info&) const _NOEXCEPT; @@ -252,7 +252,7 @@ const void* __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT { - return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : nullptr; + return __t == typeid(_Dp) ? std::addressof(__data_.first().second()) : nullptr; } #endif // _LIBCPP_NO_RTTI @@ -285,14 +285,14 @@ template _LIBCPP_HIDE_FROM_ABI explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args) - : __storage_(_VSTD::move(__a)) + : __storage_(std::move(__a)) { #if _LIBCPP_STD_VER > 17 using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type; _TpAlloc __tmp(*__get_alloc()); - allocator_traits<_TpAlloc>::construct(__tmp, __get_elem(), _VSTD::forward<_Args>(__args)...); + allocator_traits<_TpAlloc>::construct(__tmp, __get_elem(), std::forward<_Args>(__args)...); #else - ::new ((void*)__get_elem()) _Tp(_VSTD::forward<_Args>(__args)...); + ::new ((void*)__get_elem()) _Tp(std::forward<_Args>(__args)...); #endif } @@ -335,7 +335,7 @@ char __blob_[sizeof(_CompressedPair)]; _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) { - ::new ((void*)__get_alloc()) _Alloc(_VSTD::move(__a)); + ::new ((void*)__get_alloc()) _Alloc(std::move(__a)); } _LIBCPP_HIDE_FROM_ABI ~_Storage() { __get_alloc()->~_Alloc(); @@ -475,7 +475,7 @@ typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT; typedef __shared_ptr_pointer<_Yp*, _Dp, _AllocT > _CntrlBlk; #ifndef _LIBCPP_CXX03_LANG - __cntrl_ = new _CntrlBlk(__p, _VSTD::move(__d), _AllocT()); + __cntrl_ = new _CntrlBlk(__p, std::move(__d), _AllocT()); #else __cntrl_ = new _CntrlBlk(__p, __d, _AllocT()); #endif // not _LIBCPP_CXX03_LANG @@ -504,13 +504,13 @@ typedef __allocator_destructor<_A2> _D2; _A2 __a2(__a); unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1)); - ::new ((void*)_VSTD::addressof(*__hold2.get())) + ::new ((void*)std::addressof(*__hold2.get())) #ifndef _LIBCPP_CXX03_LANG - _CntrlBlk(__p, _VSTD::move(__d), __a); + _CntrlBlk(__p, std::move(__d), __a); #else _CntrlBlk(__p, __d, __a); #endif // not _LIBCPP_CXX03_LANG - __cntrl_ = _VSTD::addressof(*__hold2.release()); + __cntrl_ = std::addressof(*__hold2.release()); __enable_weak_this(__p, __p); #ifndef _LIBCPP_NO_EXCEPTIONS } @@ -534,7 +534,7 @@ typedef typename __shared_ptr_default_allocator<_Tp>::type _AllocT; typedef __shared_ptr_pointer _CntrlBlk; #ifndef _LIBCPP_CXX03_LANG - __cntrl_ = new _CntrlBlk(__p, _VSTD::move(__d), _AllocT()); + __cntrl_ = new _CntrlBlk(__p, std::move(__d), _AllocT()); #else __cntrl_ = new _CntrlBlk(__p, __d, _AllocT()); #endif // not _LIBCPP_CXX03_LANG @@ -562,13 +562,13 @@ typedef __allocator_destructor<_A2> _D2; _A2 __a2(__a); unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1)); - ::new ((void*)_VSTD::addressof(*__hold2.get())) + ::new ((void*)std::addressof(*__hold2.get())) #ifndef _LIBCPP_CXX03_LANG - _CntrlBlk(__p, _VSTD::move(__d), __a); + _CntrlBlk(__p, std::move(__d), __a); #else _CntrlBlk(__p, __d, __a); #endif // not _LIBCPP_CXX03_LANG - __cntrl_ = _VSTD::addressof(*__hold2.release()); + __cntrl_ = std::addressof(*__hold2.release()); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) @@ -690,7 +690,7 @@ typedef __shared_ptr_pointer::pointer, reference_wrapper::type>, _AllocT > _CntrlBlk; - __cntrl_ = new _CntrlBlk(__r.get(), _VSTD::ref(__r.get_deleter()), _AllocT()); + __cntrl_ = new _CntrlBlk(__r.get(), std::ref(__r.get_deleter()), _AllocT()); __enable_weak_this(__r.get(), __r.get()); } __r.release(); @@ -721,7 +721,7 @@ _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>& operator=(shared_ptr&& __r) _NOEXCEPT { - shared_ptr(_VSTD::move(__r)).swap(*this); + shared_ptr(std::move(__r)).swap(*this); return *this; } @@ -729,7 +729,7 @@ _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>& operator=(shared_ptr<_Yp>&& __r) { - shared_ptr(_VSTD::move(__r)).swap(*this); + shared_ptr(std::move(__r)).swap(*this); return *this; } @@ -741,7 +741,7 @@ _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>& operator=(auto_ptr<_Yp>&& __r) { - shared_ptr(_VSTD::move(__r)).swap(*this); + shared_ptr(std::move(__r)).swap(*this); return *this; } #endif @@ -752,15 +752,15 @@ _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>& operator=(unique_ptr<_Yp, _Dp>&& __r) { - shared_ptr(_VSTD::move(__r)).swap(*this); + shared_ptr(std::move(__r)).swap(*this); return *this; } _LIBCPP_HIDE_FROM_ABI void swap(shared_ptr& __r) _NOEXCEPT { - _VSTD::swap(__ptr_, __r.__ptr_); - _VSTD::swap(__cntrl_, __r.__cntrl_); + std::swap(__ptr_, __r.__ptr_); + std::swap(__cntrl_, __r.__cntrl_); } _LIBCPP_HIDE_FROM_ABI @@ -951,16 +951,16 @@ using _ControlBlock = __shared_ptr_emplace<_Tp, _Alloc>; using _ControlBlockAllocator = typename __allocator_traits_rebind<_Alloc, _ControlBlock>::type; __allocation_guard<_ControlBlockAllocator> __guard(__a, 1); - ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...); + ::new ((void*)std::addressof(*__guard.__get())) _ControlBlock(__a, std::forward<_Args>(__args)...); auto __control_block = __guard.__release_ptr(); - return shared_ptr<_Tp>::__create_with_control_block((*__control_block).__get_elem(), _VSTD::addressof(*__control_block)); + return shared_ptr<_Tp>::__create_with_control_block((*__control_block).__get_elem(), std::addressof(*__control_block)); } template::value> > _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> make_shared(_Args&& ...__args) { - return _VSTD::allocate_shared<_Tp>(allocator<_Tp>(), _VSTD::forward<_Args>(__args)...); + return std::allocate_shared<_Tp>(allocator<_Tp>(), std::forward<_Args>(__args)...); } template @@ -1367,7 +1367,7 @@ weak_ptr<_Tp>& weak_ptr<_Tp>::operator=(weak_ptr&& __r) _NOEXCEPT { - weak_ptr(_VSTD::move(__r)).swap(*this); + weak_ptr(std::move(__r)).swap(*this); return *this; } @@ -1381,7 +1381,7 @@ >::type weak_ptr<_Tp>::operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT { - weak_ptr(_VSTD::move(__r)).swap(*this); + weak_ptr(std::move(__r)).swap(*this); return *this; } @@ -1404,8 +1404,8 @@ void weak_ptr<_Tp>::swap(weak_ptr& __r) _NOEXCEPT { - _VSTD::swap(__ptr_, __r.__ptr_); - _VSTD::swap(__cntrl_, __r.__cntrl_); + std::swap(__ptr_, __r.__ptr_); + std::swap(__cntrl_, __r.__cntrl_); } template @@ -1672,12 +1672,12 @@ __m.lock(); if (__p->__owner_equivalent(*__v)) { - _VSTD::swap(__temp, *__p); + std::swap(__temp, *__p); *__p = __w; __m.unlock(); return true; } - _VSTD::swap(__temp, *__v); + std::swap(__temp, *__v); *__v = *__p; __m.unlock(); return false; diff --git a/libcxx/include/__memory/temporary_buffer.h b/libcxx/include/__memory/temporary_buffer.h --- a/libcxx/include/__memory/temporary_buffer.h +++ b/libcxx/include/__memory/temporary_buffer.h @@ -70,13 +70,13 @@ inline _LIBCPP_INLINE_VISIBILITY void return_temporary_buffer(_Tp* __p) _NOEXCEPT { - _VSTD::__libcpp_deallocate_unsized((void*)__p, _LIBCPP_ALIGNOF(_Tp)); + std::__libcpp_deallocate_unsized((void*)__p, _LIBCPP_ALIGNOF(_Tp)); } struct __return_temporary_buffer { template - _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) const {_VSTD::return_temporary_buffer(__p);} + _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) const {std::return_temporary_buffer(__p);} }; _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__memory/uninitialized_algorithms.h b/libcxx/include/__memory/uninitialized_algorithms.h --- a/libcxx/include/__memory/uninitialized_algorithms.h +++ b/libcxx/include/__memory/uninitialized_algorithms.h @@ -43,24 +43,24 @@ try { #endif for (; __ifirst != __ilast && __idx != __olast; ++__ifirst, (void)++__idx) - ::new (_VSTD::__voidify(*__idx)) _ValueType(*__ifirst); + ::new (std::__voidify(*__idx)) _ValueType(*__ifirst); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__ofirst, __idx); + std::__destroy(__ofirst, __idx); throw; } #endif - return pair<_InputIterator, _ForwardIterator>(_VSTD::move(__ifirst), _VSTD::move(__idx)); + return pair<_InputIterator, _ForwardIterator>(std::move(__ifirst), std::move(__idx)); } template _ForwardIterator uninitialized_copy(_InputIterator __ifirst, _InputIterator __ilast, _ForwardIterator __ofirst) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; - auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast), - _VSTD::move(__ofirst), __unreachable_sentinel()); - return _VSTD::move(__result.second); + auto __result = std::__uninitialized_copy<_ValueType>(std::move(__ifirst), std::move(__ilast), + std::move(__ofirst), __unreachable_sentinel()); + return std::move(__result.second); } // uninitialized_copy_n @@ -74,24 +74,24 @@ try { #endif for (; __n > 0 && __idx != __olast; ++__ifirst, (void)++__idx, (void)--__n) - ::new (_VSTD::__voidify(*__idx)) _ValueType(*__ifirst); + ::new (std::__voidify(*__idx)) _ValueType(*__ifirst); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__ofirst, __idx); + std::__destroy(__ofirst, __idx); throw; } #endif - return pair<_InputIterator, _ForwardIterator>(_VSTD::move(__ifirst), _VSTD::move(__idx)); + return pair<_InputIterator, _ForwardIterator>(std::move(__ifirst), std::move(__idx)); } template inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_copy_n(_InputIterator __ifirst, _Size __n, _ForwardIterator __ofirst) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; - auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst), + auto __result = std::__uninitialized_copy_n<_ValueType>(std::move(__ifirst), __n, std::move(__ofirst), __unreachable_sentinel()); - return _VSTD::move(__result.second); + return std::move(__result.second); } // uninitialized_fill @@ -106,12 +106,12 @@ { #endif for (; __idx != __last; ++__idx) - ::new (_VSTD::__voidify(*__idx)) _ValueType(__x); + ::new (std::__voidify(*__idx)) _ValueType(__x); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__first, __idx); + std::__destroy(__first, __idx); throw; } #endif @@ -124,7 +124,7 @@ void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; - (void)_VSTD::__uninitialized_fill<_ValueType>(__first, __last, __x); + (void)std::__uninitialized_fill<_ValueType>(__first, __last, __x); } // uninitialized_fill_n @@ -139,12 +139,12 @@ { #endif for (; __n > 0; ++__idx, (void) --__n) - ::new (_VSTD::__voidify(*__idx)) _ValueType(__x); + ::new (std::__voidify(*__idx)) _ValueType(__x); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__first, __idx); + std::__destroy(__first, __idx); throw; } #endif @@ -157,7 +157,7 @@ _ForwardIterator uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; - return _VSTD::__uninitialized_fill_n<_ValueType>(__first, __n, __x); + return std::__uninitialized_fill_n<_ValueType>(__first, __n, __x); } #if _LIBCPP_STD_VER > 14 @@ -172,10 +172,10 @@ try { #endif for (; __idx != __last; ++__idx) - ::new (_VSTD::__voidify(*__idx)) _ValueType; + ::new (std::__voidify(*__idx)) _ValueType; #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__first, __idx); + std::__destroy(__first, __idx); throw; } #endif @@ -187,8 +187,8 @@ inline _LIBCPP_HIDE_FROM_ABI void uninitialized_default_construct(_ForwardIterator __first, _ForwardIterator __last) { using _ValueType = typename iterator_traits<_ForwardIterator>::value_type; - (void)_VSTD::__uninitialized_default_construct<_ValueType>( - _VSTD::move(__first), _VSTD::move(__last)); + (void)std::__uninitialized_default_construct<_ValueType>( + std::move(__first), std::move(__last)); } // uninitialized_default_construct_n @@ -201,10 +201,10 @@ try { #endif for (; __n > 0; ++__idx, (void) --__n) - ::new (_VSTD::__voidify(*__idx)) _ValueType; + ::new (std::__voidify(*__idx)) _ValueType; #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__first, __idx); + std::__destroy(__first, __idx); throw; } #endif @@ -216,7 +216,7 @@ inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Size __n) { using _ValueType = typename iterator_traits<_ForwardIterator>::value_type; - return _VSTD::__uninitialized_default_construct_n<_ValueType>(_VSTD::move(__first), __n); + return std::__uninitialized_default_construct_n<_ValueType>(std::move(__first), __n); } // uninitialized_value_construct @@ -229,10 +229,10 @@ try { #endif for (; __idx != __last; ++__idx) - ::new (_VSTD::__voidify(*__idx)) _ValueType(); + ::new (std::__voidify(*__idx)) _ValueType(); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__first, __idx); + std::__destroy(__first, __idx); throw; } #endif @@ -244,8 +244,8 @@ inline _LIBCPP_HIDE_FROM_ABI void uninitialized_value_construct(_ForwardIterator __first, _ForwardIterator __last) { using _ValueType = typename iterator_traits<_ForwardIterator>::value_type; - (void)_VSTD::__uninitialized_value_construct<_ValueType>( - _VSTD::move(__first), _VSTD::move(__last)); + (void)std::__uninitialized_value_construct<_ValueType>( + std::move(__first), std::move(__last)); } // uninitialized_value_construct_n @@ -258,10 +258,10 @@ try { #endif for (; __n > 0; ++__idx, (void) --__n) - ::new (_VSTD::__voidify(*__idx)) _ValueType(); + ::new (std::__voidify(*__idx)) _ValueType(); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__first, __idx); + std::__destroy(__first, __idx); throw; } #endif @@ -273,7 +273,7 @@ inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_value_construct_n(_ForwardIterator __first, _Size __n) { using _ValueType = typename iterator_traits<_ForwardIterator>::value_type; - return __uninitialized_value_construct_n<_ValueType>(_VSTD::move(__first), __n); + return __uninitialized_value_construct_n<_ValueType>(std::move(__first), __n); } // uninitialized_move @@ -288,27 +288,27 @@ try { #endif for (; __ifirst != __ilast && __idx != __olast; ++__idx, (void)++__ifirst) { - ::new (_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst)); + ::new (std::__voidify(*__idx)) _ValueType(__iter_move(__ifirst)); } #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__ofirst, __idx); + std::__destroy(__ofirst, __idx); throw; } #endif - return {_VSTD::move(__ifirst), _VSTD::move(__idx)}; + return {std::move(__ifirst), std::move(__idx)}; } template inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_move(_InputIterator __ifirst, _InputIterator __ilast, _ForwardIterator __ofirst) { using _ValueType = typename iterator_traits<_ForwardIterator>::value_type; - auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _VSTD::move(*__iter); }; + auto __iter_move = [](auto&& __iter) -> decltype(auto) { return std::move(*__iter); }; - auto __result = _VSTD::__uninitialized_move<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast), - _VSTD::move(__ofirst), __unreachable_sentinel(), __iter_move); - return _VSTD::move(__result.second); + auto __result = std::__uninitialized_move<_ValueType>(std::move(__ifirst), std::move(__ilast), + std::move(__ofirst), __unreachable_sentinel(), __iter_move); + return std::move(__result.second); } // uninitialized_move_n @@ -322,24 +322,24 @@ try { #endif for (; __n > 0 && __idx != __olast; ++__idx, (void)++__ifirst, --__n) - ::new (_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst)); + ::new (std::__voidify(*__idx)) _ValueType(__iter_move(__ifirst)); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) { - _VSTD::__destroy(__ofirst, __idx); + std::__destroy(__ofirst, __idx); throw; } #endif - return {_VSTD::move(__ifirst), _VSTD::move(__idx)}; + return {std::move(__ifirst), std::move(__idx)}; } template inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator> uninitialized_move_n(_InputIterator __ifirst, _Size __n, _ForwardIterator __ofirst) { using _ValueType = typename iterator_traits<_ForwardIterator>::value_type; - auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _VSTD::move(*__iter); }; + auto __iter_move = [](auto&& __iter) -> decltype(auto) { return std::move(*__iter); }; - return _VSTD::__uninitialized_move_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst), + return std::__uninitialized_move_n<_ValueType>(std::move(__ifirst), __n, std::move(__ofirst), __unreachable_sentinel(), __iter_move); } diff --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h --- a/libcxx/include/__memory/unique_ptr.h +++ b/libcxx/include/__memory/unique_ptr.h @@ -196,7 +196,7 @@ class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > > _LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT - : __ptr_(__p, _VSTD::move(__d)) { + : __ptr_(__p, std::move(__d)) { static_assert(!is_reference::value, "rvalue deleter bound to reference"); } @@ -208,7 +208,7 @@ _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&& __u) _NOEXCEPT - : __ptr_(__u.release(), _VSTD::forward(__u.get_deleter())) { + : __ptr_(__u.release(), std::forward(__u.get_deleter())) { } template _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT - : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {} + : __ptr_(__u.release(), std::forward<_Ep>(__u.get_deleter())) {} #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) template @@ -232,7 +232,7 @@ _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT { reset(__u.release()); - __ptr_.second() = _VSTD::forward(__u.get_deleter()); + __ptr_.second() = std::forward(__u.get_deleter()); return *this; } @@ -243,7 +243,7 @@ _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT { reset(__u.release()); - __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter()); + __ptr_.second() = std::forward<_Ep>(__u.get_deleter()); return *this; } @@ -429,7 +429,7 @@ class = _EnableIfPointerConvertible<_Pp> > _LIBCPP_INLINE_VISIBILITY unique_ptr(_Pp __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT - : __ptr_(__p, _VSTD::move(__d)) { + : __ptr_(__p, std::move(__d)) { static_assert(!is_reference::value, "rvalue deleter bound to reference"); } @@ -438,7 +438,7 @@ class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > > _LIBCPP_INLINE_VISIBILITY unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __d) _NOEXCEPT - : __ptr_(nullptr, _VSTD::move(__d)) { + : __ptr_(nullptr, std::move(__d)) { static_assert(!is_reference::value, "rvalue deleter bound to reference"); } @@ -451,13 +451,13 @@ _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&& __u) _NOEXCEPT - : __ptr_(__u.release(), _VSTD::forward(__u.get_deleter())) { + : __ptr_(__u.release(), std::forward(__u.get_deleter())) { } _LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT { reset(__u.release()); - __ptr_.second() = _VSTD::forward(__u.get_deleter()); + __ptr_.second() = std::forward(__u.get_deleter()); return *this; } @@ -467,7 +467,7 @@ > _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT - : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) { + : __ptr_(__u.release(), std::forward<_Ep>(__u.get_deleter())) { } template && __u) _NOEXCEPT { reset(__u.release()); - __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter()); + __ptr_.second() = std::forward<_Ep>(__u.get_deleter()); return *this; } @@ -722,7 +722,7 @@ typename __unique_if<_Tp>::__unique_single make_unique(_Args&&... __args) { - return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...)); + return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); } template diff --git a/libcxx/include/__memory/voidify.h b/libcxx/include/__memory/voidify.h --- a/libcxx/include/__memory/voidify.h +++ b/libcxx/include/__memory/voidify.h @@ -22,7 +22,7 @@ template _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void* __voidify(_Tp& __from) { // Cast away cv-qualifiers to allow modifying elements of a range through const iterators. - return const_cast(static_cast(_VSTD::addressof(__from))); + return const_cast(static_cast(std::addressof(__from))); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base --- a/libcxx/include/__mutex_base +++ b/libcxx/include/__mutex_base @@ -116,24 +116,24 @@ unique_lock() _NOEXCEPT : __m_(nullptr), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY explicit unique_lock(mutex_type& __m) - : __m_(_VSTD::addressof(__m)), __owns_(true) {__m_->lock();} + : __m_(std::addressof(__m)), __owns_(true) {__m_->lock();} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT - : __m_(_VSTD::addressof(__m)), __owns_(false) {} + : __m_(std::addressof(__m)), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, try_to_lock_t) - : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock()) {} + : __m_(std::addressof(__m)), __owns_(__m.try_lock()) {} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, adopt_lock_t) - : __m_(_VSTD::addressof(__m)), __owns_(true) {} + : __m_(std::addressof(__m)), __owns_(true) {} template _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __t) - : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_until(__t)) {} + : __m_(std::addressof(__m)), __owns_(__m.try_lock_until(__t)) {} template _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __d) - : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_for(__d)) {} + : __m_(std::addressof(__m)), __owns_(__m.try_lock_for(__d)) {} _LIBCPP_INLINE_VISIBILITY ~unique_lock() { @@ -173,8 +173,8 @@ _LIBCPP_INLINE_VISIBILITY void swap(unique_lock& __u) _NOEXCEPT { - _VSTD::swap(__m_, __u.__m_); - _VSTD::swap(__owns_, __u.__owns_); + std::swap(__m_, __u.__m_); + std::swap(__owns_, __u.__owns_); } _LIBCPP_INLINE_VISIBILITY mutex_type* release() _NOEXCEPT @@ -415,7 +415,7 @@ if (__t <= __now) return cv_status::timeout; - __clock_tp_ns __t_ns = __clock_tp_ns(_VSTD::__safe_nanosecond_cast(__t.time_since_epoch())); + __clock_tp_ns __t_ns = __clock_tp_ns(std::__safe_nanosecond_cast(__t.time_since_epoch())); __do_timed_wait(__lk, __t_ns); return _Clock::now() < __t ? cv_status::no_timeout : cv_status::timeout; @@ -448,13 +448,13 @@ #if defined(_LIBCPP_HAS_COND_CLOCKWAIT) using __clock_tp_ns = time_point; - __ns_rep __now_count_ns = _VSTD::__safe_nanosecond_cast(__c_now.time_since_epoch()).count(); + __ns_rep __now_count_ns = std::__safe_nanosecond_cast(__c_now.time_since_epoch()).count(); #else using __clock_tp_ns = time_point; - __ns_rep __now_count_ns = _VSTD::__safe_nanosecond_cast(system_clock::now().time_since_epoch()).count(); + __ns_rep __now_count_ns = std::__safe_nanosecond_cast(system_clock::now().time_since_epoch()).count(); #endif - __ns_rep __d_ns_count = _VSTD::__safe_nanosecond_cast(__d).count(); + __ns_rep __d_ns_count = std::__safe_nanosecond_cast(__d).count(); if (__now_count_ns > numeric_limits<__ns_rep>::max() - __d_ns_count) { __do_timed_wait(__lk, __clock_tp_ns::max()); @@ -474,7 +474,7 @@ _Predicate __pred) { return wait_until(__lk, chrono::steady_clock::now() + __d, - _VSTD::move(__pred)); + std::move(__pred)); } #if defined(_LIBCPP_HAS_COND_CLOCKWAIT) diff --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle --- a/libcxx/include/__node_handle +++ b/libcxx/include/__node_handle @@ -105,7 +105,7 @@ void __release_ptr() { __ptr_ = nullptr; - __alloc_ = _VSTD::nullopt; + __alloc_ = std::nullopt; } _LIBCPP_INLINE_VISIBILITY @@ -136,17 +136,17 @@ _LIBCPP_INLINE_VISIBILITY __basic_node_handle(__basic_node_handle&& __other) noexcept : __ptr_(__other.__ptr_), - __alloc_(_VSTD::move(__other.__alloc_)) + __alloc_(std::move(__other.__alloc_)) { __other.__ptr_ = nullptr; - __other.__alloc_ = _VSTD::nullopt; + __other.__alloc_ = std::nullopt; } _LIBCPP_INLINE_VISIBILITY __basic_node_handle& operator=(__basic_node_handle&& __other) { _LIBCPP_ASSERT( - __alloc_ == _VSTD::nullopt || + __alloc_ == std::nullopt || __alloc_traits::propagate_on_container_move_assignment::value || __alloc_ == __other.__alloc_, "node_type with incompatible allocator passed to " @@ -156,11 +156,11 @@ __ptr_ = __other.__ptr_; if (__alloc_traits::propagate_on_container_move_assignment::value || - __alloc_ == _VSTD::nullopt) - __alloc_ = _VSTD::move(__other.__alloc_); + __alloc_ == std::nullopt) + __alloc_ = std::move(__other.__alloc_); __other.__ptr_ = nullptr; - __other.__alloc_ = _VSTD::nullopt; + __other.__alloc_ = std::nullopt; return *this; } @@ -179,10 +179,10 @@ __alloc_traits::propagate_on_container_swap::value || __alloc_traits::is_always_equal::value) { - using _VSTD::swap; + using std::swap; swap(__ptr_, __other.__ptr_); if (__alloc_traits::propagate_on_container_swap::value || - __alloc_ == _VSTD::nullopt || __other.__alloc_ == _VSTD::nullopt) + __alloc_ == std::nullopt || __other.__alloc_ == std::nullopt) swap(__alloc_, __other.__alloc_); } diff --git a/libcxx/include/__nullptr b/libcxx/include/__nullptr --- a/libcxx/include/__nullptr +++ b/libcxx/include/__nullptr @@ -45,7 +45,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR nullptr_t __get_nullptr_t() {return nullptr_t(0);} -#define nullptr _VSTD::__get_nullptr_t() +#define nullptr std::__get_nullptr_t() _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__numeric/accumulate.h b/libcxx/include/__numeric/accumulate.h --- a/libcxx/include/__numeric/accumulate.h +++ b/libcxx/include/__numeric/accumulate.h @@ -26,7 +26,7 @@ { for (; __first != __last; ++__first) #if _LIBCPP_STD_VER > 17 - __init = _VSTD::move(__init) + *__first; + __init = std::move(__init) + *__first; #else __init = __init + *__first; #endif @@ -40,7 +40,7 @@ { for (; __first != __last; ++__first) #if _LIBCPP_STD_VER > 17 - __init = __binary_op(_VSTD::move(__init), *__first); + __init = __binary_op(std::move(__init), *__first); #else __init = __binary_op(__init, *__first); #endif diff --git a/libcxx/include/__numeric/adjacent_difference.h b/libcxx/include/__numeric/adjacent_difference.h --- a/libcxx/include/__numeric/adjacent_difference.h +++ b/libcxx/include/__numeric/adjacent_difference.h @@ -33,11 +33,11 @@ { typename iterator_traits<_InputIterator>::value_type __val(*__first); #if _LIBCPP_STD_VER > 17 - *__result = __val - _VSTD::move(__acc); + *__result = __val - std::move(__acc); #else *__result = __val - __acc; #endif - __acc = _VSTD::move(__val); + __acc = std::move(__val); } } return __result; @@ -57,11 +57,11 @@ { typename iterator_traits<_InputIterator>::value_type __val(*__first); #if _LIBCPP_STD_VER > 17 - *__result = __binary_op(__val, _VSTD::move(__acc)); + *__result = __binary_op(__val, std::move(__acc)); #else *__result = __binary_op(__val, __acc); #endif - __acc = _VSTD::move(__val); + __acc = std::move(__val); } } return __result; diff --git a/libcxx/include/__numeric/exclusive_scan.h b/libcxx/include/__numeric/exclusive_scan.h --- a/libcxx/include/__numeric/exclusive_scan.h +++ b/libcxx/include/__numeric/exclusive_scan.h @@ -28,12 +28,12 @@ if (__first != __last) { _Tp __tmp(__b(__init, *__first)); while (true) { - *__result = _VSTD::move(__init); + *__result = std::move(__init); ++__result; ++__first; if (__first == __last) break; - __init = _VSTD::move(__tmp); + __init = std::move(__tmp); __tmp = __b(__init, *__first); } } @@ -43,7 +43,7 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init) { - return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>()); + return std::exclusive_scan(__first, __last, __result, __init, std::plus<>()); } #endif // _LIBCPP_STD_VER > 14 diff --git a/libcxx/include/__numeric/gcd_lcm.h b/libcxx/include/__numeric/gcd_lcm.h --- a/libcxx/include/__numeric/gcd_lcm.h +++ b/libcxx/include/__numeric/gcd_lcm.h @@ -51,7 +51,7 @@ _Tp __gcd(_Tp __m, _Tp __n) { static_assert((!is_signed<_Tp>::value), ""); - return __n == 0 ? __m : _VSTD::__gcd<_Tp>(__n, __m % __n); + return __n == 0 ? __m : std::__gcd<_Tp>(__n, __m % __n); } template @@ -64,7 +64,7 @@ static_assert((!is_same::type, bool>::value), "Second argument to gcd cannot be bool" ); using _Rp = common_type_t<_Tp,_Up>; using _Wp = make_unsigned_t<_Rp>; - return static_cast<_Rp>(_VSTD::__gcd( + return static_cast<_Rp>(std::__gcd( static_cast<_Wp>(__ct_abs<_Rp, _Tp>()(__m)), static_cast<_Wp>(__ct_abs<_Rp, _Up>()(__n)))); } @@ -81,7 +81,7 @@ return 0; using _Rp = common_type_t<_Tp,_Up>; - _Rp __val1 = __ct_abs<_Rp, _Tp>()(__m) / _VSTD::gcd(__m, __n); + _Rp __val1 = __ct_abs<_Rp, _Tp>()(__m) / std::gcd(__m, __n); _Rp __val2 = __ct_abs<_Rp, _Up>()(__n); _LIBCPP_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm"); return __val1 * __val2; diff --git a/libcxx/include/__numeric/inclusive_scan.h b/libcxx/include/__numeric/inclusive_scan.h --- a/libcxx/include/__numeric/inclusive_scan.h +++ b/libcxx/include/__numeric/inclusive_scan.h @@ -40,7 +40,7 @@ typename iterator_traits<_InputIterator>::value_type __init = *__first; *__result++ = __init; if (++__first != __last) - return _VSTD::inclusive_scan(__first, __last, __result, __b, __init); + return std::inclusive_scan(__first, __last, __result, __b, __init); } return __result; @@ -50,7 +50,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { - return _VSTD::inclusive_scan(__first, __last, __result, _VSTD::plus<>()); + return std::inclusive_scan(__first, __last, __result, std::plus<>()); } #endif // _LIBCPP_STD_VER > 14 diff --git a/libcxx/include/__numeric/inner_product.h b/libcxx/include/__numeric/inner_product.h --- a/libcxx/include/__numeric/inner_product.h +++ b/libcxx/include/__numeric/inner_product.h @@ -26,7 +26,7 @@ { for (; __first1 != __last1; ++__first1, (void) ++__first2) #if _LIBCPP_STD_VER > 17 - __init = _VSTD::move(__init) + *__first1 * *__first2; + __init = std::move(__init) + *__first1 * *__first2; #else __init = __init + *__first1 * *__first2; #endif @@ -41,7 +41,7 @@ { for (; __first1 != __last1; ++__first1, (void) ++__first2) #if _LIBCPP_STD_VER > 17 - __init = __binary_op1(_VSTD::move(__init), __binary_op2(*__first1, *__first2)); + __init = __binary_op1(std::move(__init), __binary_op2(*__first1, *__first2)); #else __init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); #endif diff --git a/libcxx/include/__numeric/midpoint.h b/libcxx/include/__numeric/midpoint.h --- a/libcxx/include/__numeric/midpoint.h +++ b/libcxx/include/__numeric/midpoint.h @@ -50,7 +50,7 @@ && (sizeof(remove_pointer_t<_TPtr>) > 0), _TPtr> midpoint(_TPtr __a, _TPtr __b) noexcept { - return __a + _VSTD::midpoint(ptrdiff_t(0), __b - __a); + return __a + std::midpoint(ptrdiff_t(0), __b - __a); } diff --git a/libcxx/include/__numeric/partial_sum.h b/libcxx/include/__numeric/partial_sum.h --- a/libcxx/include/__numeric/partial_sum.h +++ b/libcxx/include/__numeric/partial_sum.h @@ -32,7 +32,7 @@ for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result) { #if _LIBCPP_STD_VER > 17 - __t = _VSTD::move(__t) + *__first; + __t = std::move(__t) + *__first; #else __t = __t + *__first; #endif @@ -55,7 +55,7 @@ for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result) { #if _LIBCPP_STD_VER > 17 - __t = __binary_op(_VSTD::move(__t), *__first); + __t = __binary_op(std::move(__t), *__first); #else __t = __binary_op(__t, *__first); #endif diff --git a/libcxx/include/__numeric/reduce.h b/libcxx/include/__numeric/reduce.h --- a/libcxx/include/__numeric/reduce.h +++ b/libcxx/include/__numeric/reduce.h @@ -32,13 +32,13 @@ template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterator __first, _InputIterator __last, _Tp __init) { - return _VSTD::reduce(__first, __last, __init, _VSTD::plus<>()); + return std::reduce(__first, __last, __init, std::plus<>()); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename iterator_traits<_InputIterator>::value_type reduce(_InputIterator __first, _InputIterator __last) { - return _VSTD::reduce(__first, __last, typename iterator_traits<_InputIterator>::value_type{}); + return std::reduce(__first, __last, typename iterator_traits<_InputIterator>::value_type{}); } #endif diff --git a/libcxx/include/__numeric/transform_inclusive_scan.h b/libcxx/include/__numeric/transform_inclusive_scan.h --- a/libcxx/include/__numeric/transform_inclusive_scan.h +++ b/libcxx/include/__numeric/transform_inclusive_scan.h @@ -45,7 +45,7 @@ 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); + return std::transform_inclusive_scan(__first, __last, __result, __b, __u, __init); } return __result; diff --git a/libcxx/include/__numeric/transform_reduce.h b/libcxx/include/__numeric/transform_reduce.h --- a/libcxx/include/__numeric/transform_reduce.h +++ b/libcxx/include/__numeric/transform_reduce.h @@ -44,8 +44,8 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) { - return _VSTD::transform_reduce(__first1, __last1, __first2, _VSTD::move(__init), _VSTD::plus<>(), - _VSTD::multiplies<>()); + return std::transform_reduce(__first1, __last1, __first2, std::move(__init), std::plus<>(), + std::multiplies<>()); } #endif diff --git a/libcxx/include/__random/binomial_distribution.h b/libcxx/include/__random/binomial_distribution.h --- a/libcxx/include/__random/binomial_distribution.h +++ b/libcxx/include/__random/binomial_distribution.h @@ -131,10 +131,10 @@ if (0 < __p_ && __p_ < 1) { __r0_ = static_cast((__t_ + 1) * __p_); - __pr_ = _VSTD::exp(__libcpp_lgamma(__t_ + 1.) - + __pr_ = std::exp(__libcpp_lgamma(__t_ + 1.) - __libcpp_lgamma(__r0_ + 1.) - - __libcpp_lgamma(__t_ - __r0_ + 1.) + __r0_ * _VSTD::log(__p_) + - (__t_ - __r0_) * _VSTD::log(1 - __p_)); + __libcpp_lgamma(__t_ - __r0_ + 1.) + __r0_ * std::log(__p_) + + (__t_ - __r0_) * std::log(1 - __p_)); __odds_ratio_ = __p_ / (1 - __p_); } } diff --git a/libcxx/include/__random/cauchy_distribution.h b/libcxx/include/__random/cauchy_distribution.h --- a/libcxx/include/__random/cauchy_distribution.h +++ b/libcxx/include/__random/cauchy_distribution.h @@ -118,7 +118,7 @@ { uniform_real_distribution __gen; // purposefully let tan arg get as close to pi/2 as it wants, tan will return a finite - return __p.a() + __p.b() * _VSTD::tan(3.1415926535897932384626433832795 * __gen(__g)); + return __p.a() + __p.b() * std::tan(3.1415926535897932384626433832795 * __gen(__g)); } template diff --git a/libcxx/include/__random/discard_block_engine.h b/libcxx/include/__random/discard_block_engine.h --- a/libcxx/include/__random/discard_block_engine.h +++ b/libcxx/include/__random/discard_block_engine.h @@ -64,7 +64,7 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit discard_block_engine(_Engine&& __e) - : __e_(_VSTD::move(__e)), __n_(0) {} + : __e_(std::move(__e)), __n_(0) {} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {} diff --git a/libcxx/include/__random/discrete_distribution.h b/libcxx/include/__random/discrete_distribution.h --- a/libcxx/include/__random/discrete_distribution.h +++ b/libcxx/include/__random/discrete_distribution.h @@ -177,11 +177,11 @@ { if (__p_.size() > 1) { - double __s = _VSTD::accumulate(__p_.begin(), __p_.end(), 0.0); + double __s = std::accumulate(__p_.begin(), __p_.end(), 0.0); for (vector::iterator __i = __p_.begin(), __e = __p_.end(); __i < __e; ++__i) *__i /= __s; vector __t(__p_.size() - 1); - _VSTD::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin()); + std::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin()); swap(__p_, __t); } else @@ -198,7 +198,7 @@ { size_t __n = __p_.size(); vector __p(__n+1); - _VSTD::adjacent_difference(__p_.begin(), __p_.end(), __p.begin()); + std::adjacent_difference(__p_.begin(), __p_.end(), __p.begin()); if (__n > 0) __p[__n] = 1 - __p_[__n-1]; else @@ -213,7 +213,7 @@ { uniform_real_distribution __gen; return static_cast<_IntType>( - _VSTD::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) - + std::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) - __p.__p_.begin()); } diff --git a/libcxx/include/__random/exponential_distribution.h b/libcxx/include/__random/exponential_distribution.h --- a/libcxx/include/__random/exponential_distribution.h +++ b/libcxx/include/__random/exponential_distribution.h @@ -109,10 +109,10 @@ _RealType exponential_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p) { - return -_VSTD::log + return -std::log ( result_type(1) - - _VSTD::generate_canonical::digits>(__g) ) / __p.lambda(); diff --git a/libcxx/include/__random/extreme_value_distribution.h b/libcxx/include/__random/extreme_value_distribution.h --- a/libcxx/include/__random/extreme_value_distribution.h +++ b/libcxx/include/__random/extreme_value_distribution.h @@ -117,7 +117,7 @@ extreme_value_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p) { return __p.a() - __p.b() * - _VSTD::log(-_VSTD::log(1-uniform_real_distribution()(__g))); + std::log(-std::log(1-uniform_real_distribution()(__g))); } template diff --git a/libcxx/include/__random/gamma_distribution.h b/libcxx/include/__random/gamma_distribution.h --- a/libcxx/include/__random/gamma_distribution.h +++ b/libcxx/include/__random/gamma_distribution.h @@ -134,7 +134,7 @@ const result_type __w = __u * (1 - __u); if (__w != 0) { - const result_type __y = _VSTD::sqrt(__c / __w) * + const result_type __y = std::sqrt(__c / __w) * (__u - result_type(0.5)); __x = __b + __y; if (__x >= 0) @@ -142,7 +142,7 @@ const result_type __z = 64 * __w * __w * __w * __v * __v; if (__z <= 1 - 2 * __y * __y / __x) break; - if (_VSTD::log(__z) <= 2 * (__b * _VSTD::log(__x / __b) - __y)) + if (std::log(__z) <= 2 * (__b * std::log(__x / __b) - __y)) break; } } @@ -156,14 +156,14 @@ const result_type __es = __egen(__g); if (__u <= 1 - __a) { - __x = _VSTD::pow(__u, 1 / __a); + __x = std::pow(__u, 1 / __a); if (__x <= __es) break; } else { - const result_type __e = -_VSTD::log((1-__u)/__a); - __x = _VSTD::pow(1 - __a + __a * __e, 1 / __a); + const result_type __e = -std::log((1-__u)/__a); + __x = std::pow(1 - __a + __a * __e, 1 / __a); if (__x <= __e + __es) break; } diff --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h --- a/libcxx/include/__random/independent_bits_engine.h +++ b/libcxx/include/__random/independent_bits_engine.h @@ -101,7 +101,7 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit independent_bits_engine(_Engine&& __e) - : __e_(_VSTD::move(__e)) {} + : __e_(std::move(__e)) {} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit independent_bits_engine(result_type __sd) : __e_(__sd) {} diff --git a/libcxx/include/__random/lognormal_distribution.h b/libcxx/include/__random/lognormal_distribution.h --- a/libcxx/include/__random/lognormal_distribution.h +++ b/libcxx/include/__random/lognormal_distribution.h @@ -100,7 +100,7 @@ template _LIBCPP_INLINE_VISIBILITY result_type operator()(_URNG& __g, const param_type& __p) - {return _VSTD::exp(const_cast&>(__p.__nd_)(__g));} + {return std::exp(const_cast&>(__p.__nd_)(__g));} // property functions _LIBCPP_INLINE_VISIBILITY @@ -219,7 +219,7 @@ _LIBCPP_INLINE_VISIBILITY result_type operator()(_URNG& __g) { - return _VSTD::exp(__nd_(__g)); + return std::exp(__nd_(__g)); } template @@ -227,7 +227,7 @@ result_type operator()(_URNG& __g, const param_type& __p) { typename normal_distribution::param_type __pn(__p.m(), __p.s()); - return _VSTD::exp(__nd_(__g, __pn)); + return std::exp(__nd_(__g, __pn)); } // property functions diff --git a/libcxx/include/__random/mersenne_twister_engine.h b/libcxx/include/__random/mersenne_twister_engine.h --- a/libcxx/include/__random/mersenne_twister_engine.h +++ b/libcxx/include/__random/mersenne_twister_engine.h @@ -423,37 +423,37 @@ _Bp, _Tp, _Cp, _Lp, _Fp>& __y) { if (__x.__i_ == __y.__i_) - return _VSTD::equal(__x.__x_, __x.__x_ + _Np, __y.__x_); + return std::equal(__x.__x_, __x.__x_ + _Np, __y.__x_); if (__x.__i_ == 0 || __y.__i_ == 0) { - size_t __j = _VSTD::min(_Np - __x.__i_, _Np - __y.__i_); - if (!_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j, + size_t __j = std::min(_Np - __x.__i_, _Np - __y.__i_); + if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j, __y.__x_ + __y.__i_)) return false; if (__x.__i_ == 0) - return _VSTD::equal(__x.__x_ + __j, __x.__x_ + _Np, __y.__x_); - return _VSTD::equal(__x.__x_, __x.__x_ + (_Np - __j), __y.__x_ + __j); + return std::equal(__x.__x_ + __j, __x.__x_ + _Np, __y.__x_); + return std::equal(__x.__x_, __x.__x_ + (_Np - __j), __y.__x_ + __j); } if (__x.__i_ < __y.__i_) { size_t __j = _Np - __y.__i_; - if (!_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j), + if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j), __y.__x_ + __y.__i_)) return false; - if (!_VSTD::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Np, + if (!std::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Np, __y.__x_)) return false; - return _VSTD::equal(__x.__x_, __x.__x_ + __x.__i_, + return std::equal(__x.__x_, __x.__x_ + __x.__i_, __y.__x_ + (_Np - (__x.__i_ + __j))); } size_t __j = _Np - __x.__i_; - if (!_VSTD::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j), + if (!std::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j), __x.__x_ + __x.__i_)) return false; - if (!_VSTD::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Np, + if (!std::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Np, __x.__x_)) return false; - return _VSTD::equal(__y.__x_, __y.__x_ + __y.__i_, + return std::equal(__y.__x_, __y.__x_ + __y.__i_, __x.__x_ + (_Np - (__y.__i_ + __j))); } diff --git a/libcxx/include/__random/normal_distribution.h b/libcxx/include/__random/normal_distribution.h --- a/libcxx/include/__random/normal_distribution.h +++ b/libcxx/include/__random/normal_distribution.h @@ -149,7 +149,7 @@ __v = _Uni(__g); __s = __u * __u + __v * __v; } while (__s > 1 || __s == 0); - result_type _Fp = _VSTD::sqrt(-2 * _VSTD::log(__s) / __s); + result_type _Fp = std::sqrt(-2 * std::log(__s) / __s); _V_ = __v * _Fp; _V_hot_ = true; _Up = __u * _Fp; diff --git a/libcxx/include/__random/piecewise_constant_distribution.h b/libcxx/include/__random/piecewise_constant_distribution.h --- a/libcxx/include/__random/piecewise_constant_distribution.h +++ b/libcxx/include/__random/piecewise_constant_distribution.h @@ -186,14 +186,14 @@ piecewise_constant_distribution<_RealType>::param_type::__init() { // __densities_ contains non-normalized areas - result_type __total_area = _VSTD::accumulate(__densities_.begin(), + result_type __total_area = std::accumulate(__densities_.begin(), __densities_.end(), result_type()); for (size_t __i = 0; __i < __densities_.size(); ++__i) __densities_[__i] /= __total_area; // __densities_ contains normalized areas __areas_.assign(__densities_.size(), result_type()); - _VSTD::partial_sum(__densities_.begin(), __densities_.end() - 1, + std::partial_sum(__densities_.begin(), __densities_.end() - 1, __areas_.begin() + 1); // __areas_ contains partial sums of normalized areas: [0, __densities_ - 1] __densities_.back() = 1 - __areas_.back(); // correct round off error @@ -286,7 +286,7 @@ { typedef uniform_real_distribution _Gen; result_type __u = _Gen()(__g); - ptrdiff_t __k = _VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(), + ptrdiff_t __k = std::upper_bound(__p.__areas_.begin(), __p.__areas_.end(), __u) - __p.__areas_.begin() - 1; return (__u - __p.__areas_[__k]) / __p.__densities_[__k] + __p.__b_[__k]; } diff --git a/libcxx/include/__random/piecewise_linear_distribution.h b/libcxx/include/__random/piecewise_linear_distribution.h --- a/libcxx/include/__random/piecewise_linear_distribution.h +++ b/libcxx/include/__random/piecewise_linear_distribution.h @@ -291,7 +291,7 @@ { typedef uniform_real_distribution _Gen; result_type __u = _Gen()(__g); - ptrdiff_t __k = _VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(), + ptrdiff_t __k = std::upper_bound(__p.__areas_.begin(), __p.__areas_.end(), __u) - __p.__areas_.begin() - 1; __u -= __p.__areas_[__k]; const result_type __dk = __p.__densities_[__k]; @@ -303,7 +303,7 @@ const result_type __bk1 = __p.__b_[__k+1]; const result_type __deltab = __bk1 - __bk; return (__bk * __dk1 - __bk1 * __dk + - _VSTD::sqrt(__deltab * (__deltab * __dk * __dk + 2 * __deltad * __u))) / + std::sqrt(__deltab * (__deltab * __dk * __dk + 2 * __deltad * __u))) / __deltad; } diff --git a/libcxx/include/__random/poisson_distribution.h b/libcxx/include/__random/poisson_distribution.h --- a/libcxx/include/__random/poisson_distribution.h +++ b/libcxx/include/__random/poisson_distribution.h @@ -128,7 +128,7 @@ { __s_ = 0; __d_ = 0; - __l_ = _VSTD::exp(-__mean_); + __l_ = std::exp(-__mean_); __omega_ = 0; __c3_ = 0; __c2_ = 0; @@ -138,9 +138,9 @@ } else { - __s_ = _VSTD::sqrt(__mean_); + __s_ = std::sqrt(__mean_); __d_ = 6 * __mean_ * __mean_; - __l_ = _VSTD::trunc(__mean_ - 1.1484); + __l_ = std::trunc(__mean_ - 1.1484); __omega_ = .3989423 / __s_; double __b1_ = .4166667E-1 / __mean_; double __b2_ = .3 * __b1_ * __b1_; @@ -172,13 +172,13 @@ double __u; if (__g > 0) { - __tx = _VSTD::trunc(__g); + __tx = std::trunc(__g); if (__tx >= __pr.__l_) - return _VSTD::__clamp_to_integral(__tx); + return std::__clamp_to_integral(__tx); __difmuk = __pr.__mean_ - __tx; __u = __urd(__urng); if (__pr.__d_ * __u >= __difmuk * __difmuk * __difmuk) - return _VSTD::__clamp_to_integral(__tx); + return std::__clamp_to_integral(__tx); } exponential_distribution __edist; for (bool __using_exp_dist = false; true; __using_exp_dist = true) @@ -194,7 +194,7 @@ __u += __u - 1; __t = 1.8 + (__u < 0 ? -__e : __e); } while (__t <= -.6744); - __tx = _VSTD::trunc(__pr.__mean_ + __pr.__s_ * __t); + __tx = std::trunc(__pr.__mean_ + __pr.__s_ * __t); __difmuk = __pr.__mean_ - __tx; __using_exp_dist = true; } @@ -205,20 +205,20 @@ const double __fac[] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880}; __px = -__pr.__mean_; - __py = _VSTD::pow(__pr.__mean_, (double)__tx) / __fac[static_cast(__tx)]; + __py = std::pow(__pr.__mean_, (double)__tx) / __fac[static_cast(__tx)]; } else { double __del = .8333333E-1 / __tx; __del -= 4.8 * __del * __del * __del; double __v = __difmuk / __tx; - if (_VSTD::abs(__v) > 0.25) - __px = __tx * _VSTD::log(1 + __v) - __difmuk - __del; + if (std::abs(__v) > 0.25) + __px = __tx * std::log(1 + __v) - __difmuk - __del; else __px = __tx * __v * __v * (((((((.1250060 * __v + -.1384794) * __v + .1421878) * __v + -.1661269) * __v + .2000118) * __v + -.2500068) * __v + .3333333) * __v + -.5) - __del; - __py = .3989423 / _VSTD::sqrt(__tx); + __py = .3989423 / std::sqrt(__tx); } double __r = (0.5 - __difmuk) / __pr.__s_; double __r2 = __r * __r; @@ -227,18 +227,18 @@ __r2 + __pr.__c1_) * __r2 + __pr.__c0_); if (__using_exp_dist) { - if (__pr.__c_ * _VSTD::abs(__u) <= __py * _VSTD::exp(__px + __e) - - __fy * _VSTD::exp(__fx + __e)) + if (__pr.__c_ * std::abs(__u) <= __py * std::exp(__px + __e) - + __fy * std::exp(__fx + __e)) break; } else { - if (__fy - __u * __fy <= __py * _VSTD::exp(__px - __fx)) + if (__fy - __u * __fy <= __py * std::exp(__px - __fx)) break; } } } - return _VSTD::__clamp_to_integral(__tx); + return std::__clamp_to_integral(__tx); } template diff --git a/libcxx/include/__random/seed_seq.h b/libcxx/include/__random/seed_seq.h --- a/libcxx/include/__random/seed_seq.h +++ b/libcxx/include/__random/seed_seq.h @@ -61,7 +61,7 @@ template _LIBCPP_INLINE_VISIBILITY void param(_OutputIterator __dest) const - {_VSTD::copy(__v_.begin(), __v_.end(), __dest);} + {std::copy(__v_.begin(), __v_.end(), __dest);} seed_seq(const seed_seq&) = delete; void operator=(const seed_seq&) = delete; @@ -84,7 +84,7 @@ { if (__first != __last) { - _VSTD::fill(__first, __last, 0x8b8b8b8b); + std::fill(__first, __last, 0x8b8b8b8b); const size_t __n = static_cast(__last - __first); const size_t __s = __v_.size(); const size_t __t = (__n >= 623) ? 11 @@ -94,7 +94,7 @@ : (__n - 1) / 2; const size_t __p = (__n - __t) / 2; const size_t __q = __p + __t; - const size_t __m = _VSTD::max(__s + 1, __n); + const size_t __m = std::max(__s + 1, __n); // __k = 0; { result_type __r = 1664525 * _Tp(__first[0] ^ __first[__p] diff --git a/libcxx/include/__random/shuffle_order_engine.h b/libcxx/include/__random/shuffle_order_engine.h --- a/libcxx/include/__random/shuffle_order_engine.h +++ b/libcxx/include/__random/shuffle_order_engine.h @@ -91,7 +91,7 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit shuffle_order_engine(_Engine&& __e) - : __e_(_VSTD::move(__e)) {__init();} + : __e_(std::move(__e)) {__init();} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();} @@ -220,7 +220,7 @@ const shuffle_order_engine<_Eng, _Kp>& __x, const shuffle_order_engine<_Eng, _Kp>& __y) { - return __x._Y_ == __y._Y_ && _VSTD::equal(__x._V_, __x._V_ + _Kp, __y._V_) && + return __x._Y_ == __y._Y_ && std::equal(__x._V_, __x._V_ + _Kp, __y._V_) && __x.__e_ == __y.__e_; } diff --git a/libcxx/include/__random/student_t_distribution.h b/libcxx/include/__random/student_t_distribution.h --- a/libcxx/include/__random/student_t_distribution.h +++ b/libcxx/include/__random/student_t_distribution.h @@ -112,7 +112,7 @@ student_t_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p) { gamma_distribution __gd(__p.n() * .5, 2); - return __nd_(__g) * _VSTD::sqrt(__p.n()/__gd(__g)); + return __nd_(__g) * std::sqrt(__p.n()/__gd(__g)); } template diff --git a/libcxx/include/__random/subtract_with_carry_engine.h b/libcxx/include/__random/subtract_with_carry_engine.h --- a/libcxx/include/__random/subtract_with_carry_engine.h +++ b/libcxx/include/__random/subtract_with_carry_engine.h @@ -259,37 +259,37 @@ if (__x.__c_ != __y.__c_) return false; if (__x.__i_ == __y.__i_) - return _VSTD::equal(__x.__x_, __x.__x_ + _Rp, __y.__x_); + return std::equal(__x.__x_, __x.__x_ + _Rp, __y.__x_); if (__x.__i_ == 0 || __y.__i_ == 0) { - size_t __j = _VSTD::min(_Rp - __x.__i_, _Rp - __y.__i_); - if (!_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j, + size_t __j = std::min(_Rp - __x.__i_, _Rp - __y.__i_); + if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j, __y.__x_ + __y.__i_)) return false; if (__x.__i_ == 0) - return _VSTD::equal(__x.__x_ + __j, __x.__x_ + _Rp, __y.__x_); - return _VSTD::equal(__x.__x_, __x.__x_ + (_Rp - __j), __y.__x_ + __j); + return std::equal(__x.__x_ + __j, __x.__x_ + _Rp, __y.__x_); + return std::equal(__x.__x_, __x.__x_ + (_Rp - __j), __y.__x_ + __j); } if (__x.__i_ < __y.__i_) { size_t __j = _Rp - __y.__i_; - if (!_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j), + if (!std::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j), __y.__x_ + __y.__i_)) return false; - if (!_VSTD::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Rp, + if (!std::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Rp, __y.__x_)) return false; - return _VSTD::equal(__x.__x_, __x.__x_ + __x.__i_, + return std::equal(__x.__x_, __x.__x_ + __x.__i_, __y.__x_ + (_Rp - (__x.__i_ + __j))); } size_t __j = _Rp - __x.__i_; - if (!_VSTD::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j), + if (!std::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j), __x.__x_ + __x.__i_)) return false; - if (!_VSTD::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Rp, + if (!std::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Rp, __x.__x_)) return false; - return _VSTD::equal(__y.__x_, __y.__x_ + __y.__i_, + return std::equal(__y.__x_, __y.__x_ + __y.__i_, __x.__x_ + (_Rp - (__y.__i_ + __j))); } diff --git a/libcxx/include/__random/uniform_real_distribution.h b/libcxx/include/__random/uniform_real_distribution.h --- a/libcxx/include/__random/uniform_real_distribution.h +++ b/libcxx/include/__random/uniform_real_distribution.h @@ -116,7 +116,7 @@ uniform_real_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p) { return (__p.b() - __p.a()) - * _VSTD::generate_canonical<_RealType, numeric_limits<_RealType>::digits>(__g) + * std::generate_canonical<_RealType, numeric_limits<_RealType>::digits>(__g) + __p.a(); } diff --git a/libcxx/include/__random/weibull_distribution.h b/libcxx/include/__random/weibull_distribution.h --- a/libcxx/include/__random/weibull_distribution.h +++ b/libcxx/include/__random/weibull_distribution.h @@ -86,7 +86,7 @@ _LIBCPP_INLINE_VISIBILITY result_type operator()(_URNG& __g, const param_type& __p) {return __p.b() * - _VSTD::pow(exponential_distribution()(__g), 1/__p.a());} + std::pow(exponential_distribution()(__g), 1/__p.a());} // property functions _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/__ranges/all.h b/libcxx/include/__ranges/all.h --- a/libcxx/include/__ranges/all.h +++ b/libcxx/include/__ranges/all.h @@ -38,30 +38,30 @@ requires ranges::view> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const - noexcept(noexcept(_LIBCPP_AUTO_CAST(_VSTD::forward<_Tp>(__t)))) + noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t)))) { - return _LIBCPP_AUTO_CAST(_VSTD::forward<_Tp>(__t)); + return _LIBCPP_AUTO_CAST(std::forward<_Tp>(__t)); } template requires (!ranges::view>) && - requires (_Tp&& __t) { ranges::ref_view{_VSTD::forward<_Tp>(__t)}; } + requires (_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; } [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const - noexcept(noexcept(ranges::ref_view{_VSTD::forward<_Tp>(__t)})) + noexcept(noexcept(ranges::ref_view{std::forward<_Tp>(__t)})) { - return ranges::ref_view{_VSTD::forward<_Tp>(__t)}; + return ranges::ref_view{std::forward<_Tp>(__t)}; } template requires (!ranges::view> && - !requires (_Tp&& __t) { ranges::ref_view{_VSTD::forward<_Tp>(__t)}; } && - requires (_Tp&& __t) { ranges::owning_view{_VSTD::forward<_Tp>(__t)}; }) + !requires (_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; } && + requires (_Tp&& __t) { ranges::owning_view{std::forward<_Tp>(__t)}; }) [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const - noexcept(noexcept(ranges::owning_view{_VSTD::forward<_Tp>(__t)})) + noexcept(noexcept(ranges::owning_view{std::forward<_Tp>(__t)})) { - return ranges::owning_view{_VSTD::forward<_Tp>(__t)}; + return ranges::owning_view{std::forward<_Tp>(__t)}; } }; } diff --git a/libcxx/include/__ranges/common_view.h b/libcxx/include/__ranges/common_view.h --- a/libcxx/include/__ranges/common_view.h +++ b/libcxx/include/__ranges/common_view.h @@ -44,13 +44,13 @@ common_view() requires default_initializable<_View> = default; _LIBCPP_HIDE_FROM_ABI - constexpr explicit common_view(_View __v) : __base_(_VSTD::move(__v)) { } + constexpr explicit common_view(_View __v) : __base_(std::move(__v)) { } _LIBCPP_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; } _LIBCPP_HIDE_FROM_ABI - constexpr _View base() && { return _VSTD::move(__base_); } + constexpr _View base() && { return std::move(__base_); } _LIBCPP_HIDE_FROM_ABI constexpr auto begin() { @@ -109,16 +109,16 @@ requires common_range<_Range> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const - noexcept(noexcept(views::all(_VSTD::forward<_Range>(__range)))) - -> decltype( views::all(_VSTD::forward<_Range>(__range))) - { return views::all(_VSTD::forward<_Range>(__range)); } + noexcept(noexcept(views::all(std::forward<_Range>(__range)))) + -> decltype( views::all(std::forward<_Range>(__range))) + { return views::all(std::forward<_Range>(__range)); } template [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const - noexcept(noexcept(common_view{_VSTD::forward<_Range>(__range)})) - -> decltype( common_view{_VSTD::forward<_Range>(__range)}) - { return common_view{_VSTD::forward<_Range>(__range)}; } + noexcept(noexcept(common_view{std::forward<_Range>(__range)})) + -> decltype( common_view{std::forward<_Range>(__range)}) + { return common_view{std::forward<_Range>(__range)}; } }; } diff --git a/libcxx/include/__ranges/copyable_box.h b/libcxx/include/__ranges/copyable_box.h --- a/libcxx/include/__ranges/copyable_box.h +++ b/libcxx/include/__ranges/copyable_box.h @@ -49,7 +49,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr explicit __copyable_box(in_place_t, _Args&& ...__args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) - : __val_(in_place, _VSTD::forward<_Args>(__args)...) + : __val_(in_place, std::forward<_Args>(__args)...) { } _LIBCPP_HIDE_FROM_ABI @@ -65,7 +65,7 @@ constexpr __copyable_box& operator=(__copyable_box const& __other) noexcept(is_nothrow_copy_constructible_v<_Tp>) { - if (this != _VSTD::addressof(__other)) { + if (this != std::addressof(__other)) { if (__other.__has_value()) __val_.emplace(*__other); else __val_.reset(); } @@ -79,8 +79,8 @@ constexpr __copyable_box& operator=(__copyable_box&& __other) noexcept(is_nothrow_move_constructible_v<_Tp>) { - if (this != _VSTD::addressof(__other)) { - if (__other.__has_value()) __val_.emplace(_VSTD::move(*__other)); + if (this != std::addressof(__other)) { + if (__other.__has_value()) __val_.emplace(std::move(*__other)); else __val_.reset(); } return *this; @@ -124,7 +124,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr explicit __copyable_box(in_place_t, _Args&& ...__args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) - : __val_(_VSTD::forward<_Args>(__args)...) + : __val_(std::forward<_Args>(__args)...) { } _LIBCPP_HIDE_FROM_ABI @@ -144,9 +144,9 @@ _LIBCPP_HIDE_FROM_ABI constexpr __copyable_box& operator=(__copyable_box const& __other) noexcept { static_assert(is_nothrow_copy_constructible_v<_Tp>); - if (this != _VSTD::addressof(__other)) { - _VSTD::destroy_at(_VSTD::addressof(__val_)); - _VSTD::construct_at(_VSTD::addressof(__val_), __other.__val_); + if (this != std::addressof(__other)) { + std::destroy_at(std::addressof(__val_)); + std::construct_at(std::addressof(__val_), __other.__val_); } return *this; } @@ -154,9 +154,9 @@ _LIBCPP_HIDE_FROM_ABI constexpr __copyable_box& operator=(__copyable_box&& __other) noexcept { static_assert(is_nothrow_move_constructible_v<_Tp>); - if (this != _VSTD::addressof(__other)) { - _VSTD::destroy_at(_VSTD::addressof(__val_)); - _VSTD::construct_at(_VSTD::addressof(__val_), _VSTD::move(__other.__val_)); + if (this != std::addressof(__other)) { + std::destroy_at(std::addressof(__val_)); + std::construct_at(std::addressof(__val_), std::move(__other.__val_)); } return *this; } @@ -164,8 +164,8 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Tp const& operator*() const noexcept { return __val_; } _LIBCPP_HIDE_FROM_ABI constexpr _Tp& operator*() noexcept { return __val_; } - _LIBCPP_HIDE_FROM_ABI constexpr const _Tp *operator->() const noexcept { return _VSTD::addressof(__val_); } - _LIBCPP_HIDE_FROM_ABI constexpr _Tp *operator->() noexcept { return _VSTD::addressof(__val_); } + _LIBCPP_HIDE_FROM_ABI constexpr const _Tp *operator->() const noexcept { return std::addressof(__val_); } + _LIBCPP_HIDE_FROM_ABI constexpr _Tp *operator->() noexcept { return std::addressof(__val_); } _LIBCPP_HIDE_FROM_ABI constexpr bool __has_value() const noexcept { return true; } }; diff --git a/libcxx/include/__ranges/counted.h b/libcxx/include/__ranges/counted.h --- a/libcxx/include/__ranges/counted.h +++ b/libcxx/include/__ranges/counted.h @@ -39,9 +39,9 @@ template _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_It __it, iter_difference_t<_It> __count) - noexcept(noexcept(span(_VSTD::to_address(__it), static_cast(__count)))) + noexcept(noexcept(span(std::to_address(__it), static_cast(__count)))) // Deliberately omit return-type SFINAE, because to_address is not SFINAE-friendly - { return span(_VSTD::to_address(__it), static_cast(__count)); } + { return span(std::to_address(__it), static_cast(__count)); } template _LIBCPP_HIDE_FROM_ABI @@ -53,17 +53,17 @@ template _LIBCPP_HIDE_FROM_ABI static constexpr auto __go(_It __it, iter_difference_t<_It> __count) - noexcept(noexcept(subrange(counted_iterator(_VSTD::move(__it), __count), default_sentinel))) - -> decltype( subrange(counted_iterator(_VSTD::move(__it), __count), default_sentinel)) - { return subrange(counted_iterator(_VSTD::move(__it), __count), default_sentinel); } + noexcept(noexcept(subrange(counted_iterator(std::move(__it), __count), default_sentinel))) + -> decltype( subrange(counted_iterator(std::move(__it), __count), default_sentinel)) + { return subrange(counted_iterator(std::move(__it), __count), default_sentinel); } template> _Diff> requires input_or_output_iterator> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_It&& __it, _Diff&& __count) const - noexcept(noexcept(__go(_VSTD::forward<_It>(__it), _VSTD::forward<_Diff>(__count)))) - -> decltype( __go(_VSTD::forward<_It>(__it), _VSTD::forward<_Diff>(__count))) - { return __go(_VSTD::forward<_It>(__it), _VSTD::forward<_Diff>(__count)); } + noexcept(noexcept(__go(std::forward<_It>(__it), std::forward<_Diff>(__count)))) + -> decltype( __go(std::forward<_It>(__it), std::forward<_Diff>(__count))) + { return __go(std::forward<_It>(__it), std::forward<_Diff>(__count)); } }; } // namespace __counted diff --git a/libcxx/include/__ranges/data.h b/libcxx/include/__ranges/data.h --- a/libcxx/include/__ranges/data.h +++ b/libcxx/include/__ranges/data.h @@ -60,8 +60,8 @@ template<__ranges_begin_invocable _Tp> _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const - noexcept(noexcept(_VSTD::to_address(ranges::begin(__t)))) { - return _VSTD::to_address(ranges::begin(__t)); + noexcept(noexcept(std::to_address(ranges::begin(__t)))) { + return std::to_address(ranges::begin(__t)); } }; } diff --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h --- a/libcxx/include/__ranges/drop_view.h +++ b/libcxx/include/__ranges/drop_view.h @@ -55,13 +55,13 @@ _LIBCPP_HIDE_FROM_ABI constexpr drop_view(_View __base, range_difference_t<_View> __count) : __count_(__count) - , __base_(_VSTD::move(__base)) + , __base_(std::move(__base)) { _LIBCPP_ASSERT(__count_ >= 0, "count must be greater than or equal to zero."); } _LIBCPP_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; } - _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return _VSTD::move(__base_); } + _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); } _LIBCPP_HIDE_FROM_ABI constexpr auto begin() diff --git a/libcxx/include/__ranges/iota_view.h b/libcxx/include/__ranges/iota_view.h --- a/libcxx/include/__ranges/iota_view.h +++ b/libcxx/include/__ranges/iota_view.h @@ -111,7 +111,7 @@ __iterator() requires default_initializable<_Start> = default; _LIBCPP_HIDE_FROM_ABI - constexpr explicit __iterator(_Start __value) : __value_(_VSTD::move(__value)) {} + constexpr explicit __iterator(_Start __value) : __value_(std::move(__value)) {} _LIBCPP_HIDE_FROM_ABI constexpr _Start operator*() const noexcept(is_nothrow_copy_constructible_v<_Start>) { @@ -276,7 +276,7 @@ public: _LIBCPP_HIDE_FROM_ABI __sentinel() = default; - constexpr explicit __sentinel(_Bound __bound) : __bound_(_VSTD::move(__bound)) {} + constexpr explicit __sentinel(_Bound __bound) : __bound_(std::move(__bound)) {} _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator& __x, const __sentinel& __y) { @@ -306,11 +306,11 @@ iota_view() requires default_initializable<_Start> = default; _LIBCPP_HIDE_FROM_ABI - constexpr explicit iota_view(_Start __value) : __value_(_VSTD::move(__value)) { } + constexpr explicit iota_view(_Start __value) : __value_(std::move(__value)) { } _LIBCPP_HIDE_FROM_ABI constexpr iota_view(type_identity_t<_Start> __value, type_identity_t<_Bound> __bound) - : __value_(_VSTD::move(__value)), __bound_(_VSTD::move(__bound)) { + : __value_(std::move(__value)), __bound_(std::move(__bound)) { // Validate the precondition if possible. if constexpr (totally_ordered_with<_Start, _Bound>) { _LIBCPP_ASSERT(ranges::less_equal()(__value_, __bound_), @@ -321,17 +321,17 @@ _LIBCPP_HIDE_FROM_ABI constexpr iota_view(__iterator __first, __iterator __last) requires same_as<_Start, _Bound> - : iota_view(_VSTD::move(__first.__value_), _VSTD::move(__last.__value_)) {} + : iota_view(std::move(__first.__value_), std::move(__last.__value_)) {} _LIBCPP_HIDE_FROM_ABI constexpr iota_view(__iterator __first, _Bound __last) requires same_as<_Bound, unreachable_sentinel_t> - : iota_view(_VSTD::move(__first.__value_), _VSTD::move(__last)) {} + : iota_view(std::move(__first.__value_), std::move(__last)) {} _LIBCPP_HIDE_FROM_ABI constexpr iota_view(__iterator __first, __sentinel __last) requires (!same_as<_Start, _Bound> && !same_as<_Start, unreachable_sentinel_t>) - : iota_view(_VSTD::move(__first.__value_), _VSTD::move(__last.__bound_)) {} + : iota_view(std::move(__first.__value_), std::move(__last.__bound_)) {} _LIBCPP_HIDE_FROM_ABI constexpr __iterator begin() const { return __iterator{__value_}; } @@ -358,13 +358,13 @@ if constexpr (__integer_like<_Start> && __integer_like<_Bound>) { if (__value_ < 0) { if (__bound_ < 0) { - return _VSTD::__to_unsigned_like(-__value_) - _VSTD::__to_unsigned_like(-__bound_); + return std::__to_unsigned_like(-__value_) - std::__to_unsigned_like(-__bound_); } - return _VSTD::__to_unsigned_like(__bound_) + _VSTD::__to_unsigned_like(-__value_); + return std::__to_unsigned_like(__bound_) + std::__to_unsigned_like(-__value_); } - return _VSTD::__to_unsigned_like(__bound_) - _VSTD::__to_unsigned_like(__value_); + return std::__to_unsigned_like(__bound_) - std::__to_unsigned_like(__value_); } - return _VSTD::__to_unsigned_like(__bound_ - __value_); + return std::__to_unsigned_like(__bound_ - __value_); } }; @@ -382,16 +382,16 @@ template _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Start&& __start) const - noexcept(noexcept(ranges::iota_view(_VSTD::forward<_Start>(__start)))) - -> decltype( ranges::iota_view(_VSTD::forward<_Start>(__start))) - { return ranges::iota_view(_VSTD::forward<_Start>(__start)); } + noexcept(noexcept(ranges::iota_view(std::forward<_Start>(__start)))) + -> decltype( ranges::iota_view(std::forward<_Start>(__start))) + { return ranges::iota_view(std::forward<_Start>(__start)); } template _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Start&& __start, _Bound&& __bound) const - noexcept(noexcept(ranges::iota_view(_VSTD::forward<_Start>(__start), _VSTD::forward<_Bound>(__bound)))) - -> decltype( ranges::iota_view(_VSTD::forward<_Start>(__start), _VSTD::forward<_Bound>(__bound))) - { return ranges::iota_view(_VSTD::forward<_Start>(__start), _VSTD::forward<_Bound>(__bound)); } + noexcept(noexcept(ranges::iota_view(std::forward<_Start>(__start), std::forward<_Bound>(__bound)))) + -> decltype( ranges::iota_view(std::forward<_Start>(__start), std::forward<_Bound>(__bound))) + { return ranges::iota_view(std::forward<_Start>(__start), std::forward<_Bound>(__bound)); } }; } // namespace __iota diff --git a/libcxx/include/__ranges/join_view.h b/libcxx/include/__ranges/join_view.h --- a/libcxx/include/__ranges/join_view.h +++ b/libcxx/include/__ranges/join_view.h @@ -76,13 +76,13 @@ _LIBCPP_HIDE_FROM_ABI constexpr explicit join_view(_View __base) - : __base_(_VSTD::move(__base)) {} + : __base_(std::move(__base)) {} _LIBCPP_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; } _LIBCPP_HIDE_FROM_ABI - constexpr _View base() && { return _VSTD::move(__base_); } + constexpr _View base() && { return std::move(__base_); } _LIBCPP_HIDE_FROM_ABI constexpr auto begin() { @@ -152,7 +152,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __sentinel(__sentinel __s) requires _Const && convertible_to, sentinel_t<_Base>> - : __end_(_VSTD::move(__s.__end_)) {} + : __end_(std::move(__s.__end_)) {} template requires sentinel_for, iterator_t<__maybe_const<_OtherConst, _View>>> @@ -223,8 +223,8 @@ _LIBCPP_HIDE_FROM_ABI constexpr __iterator(_Parent& __parent, _Outer __outer) - : __outer_(_VSTD::move(__outer)) - , __parent_(_VSTD::addressof(__parent)) { + : __outer_(std::move(__outer)) + , __parent_(std::addressof(__parent)) { __satisfy(); } @@ -233,8 +233,8 @@ requires _Const && convertible_to, _Outer> && convertible_to, _Inner> - : __outer_(_VSTD::move(__i.__outer_)) - , __inner_(_VSTD::move(__i.__inner_)) + : __outer_(std::move(__i.__outer_)) + , __inner_(std::move(__i.__inner_)) , __parent_(__i.__parent_) {} _LIBCPP_HIDE_FROM_ABI diff --git a/libcxx/include/__ranges/non_propagating_cache.h b/libcxx/include/__ranges/non_propagating_cache.h --- a/libcxx/include/__ranges/non_propagating_cache.h +++ b/libcxx/include/__ranges/non_propagating_cache.h @@ -45,7 +45,7 @@ // constructing the contained type from an iterator. struct __wrapper { template - constexpr explicit __wrapper(__forward_tag, _Args&& ...__args) : __t_(_VSTD::forward<_Args>(__args)...) { } + constexpr explicit __wrapper(__forward_tag, _Args&& ...__args) : __t_(std::forward<_Args>(__args)...) { } template constexpr explicit __wrapper(__from_tag, _Fn const& __f) : __t_(__f()) { } _Tp __t_; @@ -70,7 +70,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __non_propagating_cache& operator=(__non_propagating_cache const& __other) noexcept { - if (this != _VSTD::addressof(__other)) { + if (this != std::addressof(__other)) { __value_.reset(); } return *this; @@ -100,7 +100,7 @@ template _LIBCPP_HIDE_FROM_ABI constexpr _Tp& __emplace(_Args&& ...__args) { - return __value_.emplace(__forward_tag{}, _VSTD::forward<_Args>(__args)...).__t_; + return __value_.emplace(__forward_tag{}, std::forward<_Args>(__args)...).__t_; } }; diff --git a/libcxx/include/__ranges/owning_view.h b/libcxx/include/__ranges/owning_view.h --- a/libcxx/include/__ranges/owning_view.h +++ b/libcxx/include/__ranges/owning_view.h @@ -38,15 +38,15 @@ public: owning_view() requires default_initializable<_Rp> = default; - _LIBCPP_HIDE_FROM_ABI constexpr owning_view(_Rp&& __r) : __r_(_VSTD::move(__r)) {} + _LIBCPP_HIDE_FROM_ABI constexpr owning_view(_Rp&& __r) : __r_(std::move(__r)) {} owning_view(owning_view&&) = default; owning_view& operator=(owning_view&&) = default; _LIBCPP_HIDE_FROM_ABI constexpr _Rp& base() & noexcept { return __r_; } _LIBCPP_HIDE_FROM_ABI constexpr const _Rp& base() const& noexcept { return __r_; } - _LIBCPP_HIDE_FROM_ABI constexpr _Rp&& base() && noexcept { return _VSTD::move(__r_); } - _LIBCPP_HIDE_FROM_ABI constexpr const _Rp&& base() const&& noexcept { return _VSTD::move(__r_); } + _LIBCPP_HIDE_FROM_ABI constexpr _Rp&& base() && noexcept { return std::move(__r_); } + _LIBCPP_HIDE_FROM_ABI constexpr const _Rp&& base() const&& noexcept { return std::move(__r_); } _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_Rp> begin() { return ranges::begin(__r_); } _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Rp> end() { return ranges::end(__r_); } diff --git a/libcxx/include/__ranges/range_adaptor.h b/libcxx/include/__ranges/range_adaptor.h --- a/libcxx/include/__ranges/range_adaptor.h +++ b/libcxx/include/__ranges/range_adaptor.h @@ -39,7 +39,7 @@ // i.e. something that can be called via the `x | f` notation. template struct __range_adaptor_closure_t : _Fn, __range_adaptor_closure<__range_adaptor_closure_t<_Fn>> { - constexpr explicit __range_adaptor_closure_t(_Fn&& __f) : _Fn(_VSTD::move(__f)) { } + constexpr explicit __range_adaptor_closure_t(_Fn&& __f) : _Fn(std::move(__f)) { } }; template @@ -53,7 +53,7 @@ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI friend constexpr decltype(auto) operator|(_View&& __view, _Closure&& __closure) noexcept(is_nothrow_invocable_v<_Closure, _View>) - { return _VSTD::invoke(_VSTD::forward<_Closure>(__closure), _VSTD::forward<_View>(__view)); } + { return std::invoke(std::forward<_Closure>(__closure), std::forward<_View>(__view)); } template <_RangeAdaptorClosure _Closure, _RangeAdaptorClosure _OtherClosure> requires same_as<_Tp, remove_cvref_t<_Closure>> && @@ -63,7 +63,7 @@ friend constexpr auto operator|(_Closure&& __c1, _OtherClosure&& __c2) noexcept(is_nothrow_constructible_v, _Closure> && is_nothrow_constructible_v, _OtherClosure>) - { return __range_adaptor_closure_t(_VSTD::__compose(_VSTD::forward<_OtherClosure>(__c2), _VSTD::forward<_Closure>(__c1))); } + { return __range_adaptor_closure_t(std::__compose(std::forward<_OtherClosure>(__c2), std::forward<_Closure>(__c1))); } }; #endif // !defined(_LIBCPP_HAS_NO_RANGES) diff --git a/libcxx/include/__ranges/ref_view.h b/libcxx/include/__ranges/ref_view.h --- a/libcxx/include/__ranges/ref_view.h +++ b/libcxx/include/__ranges/ref_view.h @@ -47,7 +47,7 @@ convertible_to<_Tp, _Range&> && requires { __fun(declval<_Tp>()); } _LIBCPP_HIDE_FROM_ABI constexpr ref_view(_Tp&& __t) - : __range_(_VSTD::addressof(static_cast<_Range&>(_VSTD::forward<_Tp>(__t)))) + : __range_(std::addressof(static_cast<_Range&>(std::forward<_Tp>(__t)))) {} _LIBCPP_HIDE_FROM_ABI constexpr _Range& base() const { return *__range_; } diff --git a/libcxx/include/__ranges/reverse_view.h b/libcxx/include/__ranges/reverse_view.h --- a/libcxx/include/__ranges/reverse_view.h +++ b/libcxx/include/__ranges/reverse_view.h @@ -51,13 +51,13 @@ reverse_view() requires default_initializable<_View> = default; _LIBCPP_HIDE_FROM_ABI - constexpr explicit reverse_view(_View __view) : __base_(_VSTD::move(__view)) {} + constexpr explicit reverse_view(_View __view) : __base_(std::move(__view)) {} _LIBCPP_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; } _LIBCPP_HIDE_FROM_ABI - constexpr _View base() && { return _VSTD::move(__base_); } + constexpr _View base() && { return std::move(__base_); } _LIBCPP_HIDE_FROM_ABI constexpr reverse_iterator> begin() { @@ -65,7 +65,7 @@ if (__cached_begin_.__has_value()) return *__cached_begin_; - auto __tmp = _VSTD::make_reverse_iterator(ranges::next(ranges::begin(__base_), ranges::end(__base_))); + auto __tmp = std::make_reverse_iterator(ranges::next(ranges::begin(__base_), ranges::end(__base_))); if constexpr (_UseCache) __cached_begin_.__emplace(__tmp); return __tmp; @@ -73,22 +73,22 @@ _LIBCPP_HIDE_FROM_ABI constexpr reverse_iterator> begin() requires common_range<_View> { - return _VSTD::make_reverse_iterator(ranges::end(__base_)); + return std::make_reverse_iterator(ranges::end(__base_)); } _LIBCPP_HIDE_FROM_ABI constexpr auto begin() const requires common_range { - return _VSTD::make_reverse_iterator(ranges::end(__base_)); + return std::make_reverse_iterator(ranges::end(__base_)); } _LIBCPP_HIDE_FROM_ABI constexpr reverse_iterator> end() { - return _VSTD::make_reverse_iterator(ranges::begin(__base_)); + return std::make_reverse_iterator(ranges::begin(__base_)); } _LIBCPP_HIDE_FROM_ABI constexpr auto end() const requires common_range { - return _VSTD::make_reverse_iterator(ranges::begin(__base_)); + return std::make_reverse_iterator(ranges::begin(__base_)); } _LIBCPP_HIDE_FROM_ABI @@ -143,9 +143,9 @@ requires __is_reverse_view> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const - noexcept(noexcept(_VSTD::forward<_Range>(__range).base())) - -> decltype( _VSTD::forward<_Range>(__range).base()) - { return _VSTD::forward<_Range>(__range).base(); } + noexcept(noexcept(std::forward<_Range>(__range).base())) + -> decltype( std::forward<_Range>(__range).base()) + { return std::forward<_Range>(__range).base(); } template>::type> @@ -171,9 +171,9 @@ !__is_unsized_reverse_subrange>) [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range) const - noexcept(noexcept(reverse_view{_VSTD::forward<_Range>(__range)})) - -> decltype( reverse_view{_VSTD::forward<_Range>(__range)}) - { return reverse_view{_VSTD::forward<_Range>(__range)}; } + noexcept(noexcept(reverse_view{std::forward<_Range>(__range)})) + -> decltype( reverse_view{std::forward<_Range>(__range)}) + { return reverse_view{std::forward<_Range>(__range)}; } }; } diff --git a/libcxx/include/__ranges/single_view.h b/libcxx/include/__ranges/single_view.h --- a/libcxx/include/__ranges/single_view.h +++ b/libcxx/include/__ranges/single_view.h @@ -40,13 +40,13 @@ constexpr explicit single_view(const _Tp& __t) : __value_(in_place, __t) {} _LIBCPP_HIDE_FROM_ABI - constexpr explicit single_view(_Tp&& __t) : __value_(in_place, _VSTD::move(__t)) {} + constexpr explicit single_view(_Tp&& __t) : __value_(in_place, std::move(__t)) {} template requires constructible_from<_Tp, _Args...> _LIBCPP_HIDE_FROM_ABI constexpr explicit single_view(in_place_t, _Args&&... __args) - : __value_{in_place, _VSTD::forward<_Args>(__args)...} {} + : __value_{in_place, std::forward<_Args>(__args)...} {} _LIBCPP_HIDE_FROM_ABI constexpr _Tp* begin() noexcept { return data(); } diff --git a/libcxx/include/__ranges/size.h b/libcxx/include/__ranges/size.h --- a/libcxx/include/__ranges/size.h +++ b/libcxx/include/__ranges/size.h @@ -94,7 +94,7 @@ template<__difference _Tp> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __integer_like auto operator()(_Tp&& __t) const noexcept(noexcept(ranges::end(__t) - ranges::begin(__t))) { - return _VSTD::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t)); + return std::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t)); } }; } diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h --- a/libcxx/include/__ranges/subrange.h +++ b/libcxx/include/__ranges/subrange.h @@ -54,8 +54,8 @@ requires derived_from, integral_constant>; typename tuple_element_t<0, remove_const_t<_Tp>>; typename tuple_element_t<1, remove_const_t<_Tp>>; - { _VSTD::get<0>(__t) } -> convertible_to&>; - { _VSTD::get<1>(__t) } -> convertible_to&>; + { std::get<0>(__t) } -> convertible_to&>; + { std::get<1>(__t) } -> convertible_to&>; }; template @@ -91,14 +91,14 @@ _LIBCPP_HIDE_FROM_ABI constexpr subrange(__convertible_to_non_slicing<_Iter> auto __iter, _Sent __sent) requires _MustProvideSizeAtConstruction - : __begin_(_VSTD::move(__iter)), __end_(_VSTD::move(__sent)) + : __begin_(std::move(__iter)), __end_(std::move(__sent)) { } _LIBCPP_HIDE_FROM_ABI constexpr subrange(__convertible_to_non_slicing<_Iter> auto __iter, _Sent __sent, make_unsigned_t> __n) requires (_Kind == subrange_kind::sized) - : __begin_(_VSTD::move(__iter)), __end_(_VSTD::move(__sent)), __size_(__n) + : __begin_(std::move(__iter)), __end_(std::move(__sent)), __size_(__n) { if constexpr (sized_sentinel_for<_Sent, _Iter>) _LIBCPP_ASSERT((__end_ - __begin_) == static_cast>(__n), @@ -147,7 +147,7 @@ } [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Iter begin() requires (!copyable<_Iter>) { - return _VSTD::move(__begin_); + return std::move(__begin_); } _LIBCPP_HIDE_FROM_ABI @@ -166,7 +166,7 @@ if constexpr (_StoreSize) return __size_; else - return _VSTD::__to_unsigned_like(__end_ - __begin_); + return std::__to_unsigned_like(__end_ - __begin_); } [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange next(iter_difference_t<_Iter> __n = 1) const& @@ -179,7 +179,7 @@ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange next(iter_difference_t<_Iter> __n = 1) && { advance(__n); - return _VSTD::move(*this); + return std::move(*this); } [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange prev(iter_difference_t<_Iter> __n = 1) const @@ -196,14 +196,14 @@ if (__n < 0) { ranges::advance(__begin_, __n); if constexpr (_StoreSize) - __size_ += _VSTD::__to_unsigned_like(-__n); + __size_ += std::__to_unsigned_like(-__n); return *this; } } auto __d = __n - ranges::advance(__begin_, __n, __end_); if constexpr (_StoreSize) - __size_ -= _VSTD::__to_unsigned_like(__d); + __size_ -= std::__to_unsigned_like(__d); return *this; } }; diff --git a/libcxx/include/__ranges/take_view.h b/libcxx/include/__ranges/take_view.h --- a/libcxx/include/__ranges/take_view.h +++ b/libcxx/include/__ranges/take_view.h @@ -50,13 +50,13 @@ _LIBCPP_HIDE_FROM_ABI constexpr take_view(_View __base, range_difference_t<_View> __count) - : __base_(_VSTD::move(__base)), __count_(__count) {} + : __base_(std::move(__base)), __count_(__count) {} _LIBCPP_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; } _LIBCPP_HIDE_FROM_ABI - constexpr _View base() && { return _VSTD::move(__base_); } + constexpr _View base() && { return std::move(__base_); } _LIBCPP_HIDE_FROM_ABI constexpr auto begin() requires (!__simple_view<_View>) { @@ -119,14 +119,14 @@ constexpr auto size() requires sized_range<_View> { auto __n = ranges::size(__base_); // TODO: use ranges::min here. - return _VSTD::min(__n, static_cast(__count_)); + return std::min(__n, static_cast(__count_)); } _LIBCPP_HIDE_FROM_ABI constexpr auto size() const requires sized_range { auto __n = ranges::size(__base_); // TODO: use ranges::min here. - return _VSTD::min(__n, static_cast(__count_)); + return std::min(__n, static_cast(__count_)); } }; @@ -146,12 +146,12 @@ __sentinel() = default; _LIBCPP_HIDE_FROM_ABI - constexpr explicit __sentinel(sentinel_t<_Base> __end) : __end_(_VSTD::move(__end)) {} + constexpr explicit __sentinel(sentinel_t<_Base> __end) : __end_(std::move(__end)) {} _LIBCPP_HIDE_FROM_ABI constexpr __sentinel(__sentinel __s) requires _Const && convertible_to, sentinel_t<_Base>> - : __end_(_VSTD::move(__s.__end_)) {} + : __end_(std::move(__s.__end_)) {} _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Base> base() const { return __end_; } diff --git a/libcxx/include/__ranges/transform_view.h b/libcxx/include/__ranges/transform_view.h --- a/libcxx/include/__ranges/transform_view.h +++ b/libcxx/include/__ranges/transform_view.h @@ -72,12 +72,12 @@ _LIBCPP_HIDE_FROM_ABI constexpr transform_view(_View __base, _Fn __func) - : __func_(_VSTD::in_place, _VSTD::move(__func)), __base_(_VSTD::move(__base)) {} + : __func_(std::in_place, std::move(__func)), __base_(std::move(__base)) {} _LIBCPP_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; } _LIBCPP_HIDE_FROM_ABI - constexpr _View base() && { return _VSTD::move(__base_); } + constexpr _View base() && { return std::move(__base_); } _LIBCPP_HIDE_FROM_ABI constexpr __iterator begin() { @@ -184,7 +184,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __iterator(_Parent& __parent, iterator_t<_Base> __current) - : __parent_(_VSTD::addressof(__parent)), __current_(_VSTD::move(__current)) {} + : __parent_(std::addressof(__parent)), __current_(std::move(__current)) {} // Note: `__i` should always be `__iterator`, but directly using // `__iterator` is ill-formed when `_Const` is false @@ -192,7 +192,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __iterator(__iterator __i) requires _Const && convertible_to, iterator_t<_Base>> - : __parent_(__i.__parent_), __current_(_VSTD::move(__i.__current_)) {} + : __parent_(__i.__parent_), __current_(std::move(__i.__current_)) {} _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_Base> base() const& @@ -203,14 +203,14 @@ _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_Base> base() && { - return _VSTD::move(__current_); + return std::move(__current_); } _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*() const - noexcept(noexcept(_VSTD::invoke(*__parent_->__func_, *__current_))) + noexcept(noexcept(std::invoke(*__parent_->__func_, *__current_))) { - return _VSTD::invoke(*__parent_->__func_, *__current_); + return std::invoke(*__parent_->__func_, *__current_); } _LIBCPP_HIDE_FROM_ABI @@ -266,10 +266,10 @@ _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator[](difference_type __n) const - noexcept(noexcept(_VSTD::invoke(*__parent_->__func_, __current_[__n]))) + noexcept(noexcept(std::invoke(*__parent_->__func_, __current_[__n]))) requires random_access_range<_Base> { - return _VSTD::invoke(*__parent_->__func_, __current_[__n]); + return std::invoke(*__parent_->__func_, __current_[__n]); } _LIBCPP_HIDE_FROM_ABI @@ -347,7 +347,7 @@ noexcept(noexcept(*__i)) { if constexpr (is_lvalue_reference_v) - return _VSTD::move(*__i); + return std::move(*__i); else return *__i; } @@ -381,7 +381,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __sentinel(__sentinel __i) requires _Const && convertible_to, sentinel_t<_Base>> - : __end_(_VSTD::move(__i.__end_)) {} + : __end_(std::move(__i.__end_)) {} _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Base> base() const { return __end_; } @@ -416,16 +416,16 @@ template [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Range&& __range, _Fn&& __f) const - noexcept(noexcept(transform_view(_VSTD::forward<_Range>(__range), _VSTD::forward<_Fn>(__f)))) - -> decltype( transform_view(_VSTD::forward<_Range>(__range), _VSTD::forward<_Fn>(__f))) - { return transform_view(_VSTD::forward<_Range>(__range), _VSTD::forward<_Fn>(__f)); } + noexcept(noexcept(transform_view(std::forward<_Range>(__range), std::forward<_Fn>(__f)))) + -> decltype( transform_view(std::forward<_Range>(__range), std::forward<_Fn>(__f))) + { return transform_view(std::forward<_Range>(__range), std::forward<_Fn>(__f)); } template requires constructible_from, _Fn> [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f) const noexcept(is_nothrow_constructible_v, _Fn>) - { return __range_adaptor_closure_t(_VSTD::__bind_back(*this, _VSTD::forward<_Fn>(__f))); } + { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Fn>(__f))); } }; } diff --git a/libcxx/include/__ranges/view_interface.h b/libcxx/include/__ranges/view_interface.h --- a/libcxx/include/__ranges/view_interface.h +++ b/libcxx/include/__ranges/view_interface.h @@ -91,19 +91,19 @@ template _LIBCPP_HIDE_FROM_ABI constexpr auto data() - noexcept(noexcept(_VSTD::to_address(ranges::begin(__derived())))) + noexcept(noexcept(std::to_address(ranges::begin(__derived())))) requires contiguous_iterator> { - return _VSTD::to_address(ranges::begin(__derived())); + return std::to_address(ranges::begin(__derived())); } template _LIBCPP_HIDE_FROM_ABI constexpr auto data() const - noexcept(noexcept(_VSTD::to_address(ranges::begin(__derived())))) + noexcept(noexcept(std::to_address(ranges::begin(__derived())))) requires range && contiguous_iterator> { - return _VSTD::to_address(ranges::begin(__derived())); + return std::to_address(ranges::begin(__derived())); } template diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer --- a/libcxx/include/__split_buffer +++ b/libcxx/include/__split_buffer @@ -143,7 +143,7 @@ void __move_assign_alloc(__split_buffer& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { - __alloc() = _VSTD::move(__c.__alloc()); + __alloc() = std::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY @@ -200,7 +200,7 @@ { _ConstructTransaction __tx(&this->__end_, __n); for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) { - __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_)); + __alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_)); } } @@ -217,7 +217,7 @@ _ConstructTransaction __tx(&this->__end_, __n); for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) { __alloc_traits::construct(this->__alloc(), - _VSTD::__to_address(__tx.__pos_), __x); + std::__to_address(__tx.__pos_), __x); } } @@ -237,14 +237,14 @@ if (__end_ == __end_cap()) { size_type __old_cap = __end_cap() - __first_; - size_type __new_cap = _VSTD::max(2 * __old_cap, 8); + size_type __new_cap = std::max(2 * __old_cap, 8); __split_buffer __buf(__new_cap, 0, __a); for (pointer __p = __begin_; __p != __end_; ++__p, (void) ++__buf.__end_) __alloc_traits::construct(__buf.__alloc(), - _VSTD::__to_address(__buf.__end_), _VSTD::move(*__p)); + std::__to_address(__buf.__end_), std::move(*__p)); swap(__buf); } - __alloc_traits::construct(__a, _VSTD::__to_address(this->__end_), *__first); + __alloc_traits::construct(__a, std::__to_address(this->__end_), *__first); ++this->__end_; } } @@ -258,10 +258,10 @@ >::type __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last) { - _ConstructTransaction __tx(&this->__end_, _VSTD::distance(__first, __last)); + _ConstructTransaction __tx(&this->__end_, std::distance(__first, __last)); for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void) ++__first) { __alloc_traits::construct(this->__alloc(), - _VSTD::__to_address(__tx.__pos_), *__first); + std::__to_address(__tx.__pos_), *__first); } } @@ -271,7 +271,7 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type) { while (__begin_ != __new_begin) - __alloc_traits::destroy(__alloc(), _VSTD::__to_address(__begin_++)); + __alloc_traits::destroy(__alloc(), std::__to_address(__begin_++)); } template @@ -288,7 +288,7 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT { while (__new_last != __end_) - __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__end_)); + __alloc_traits::destroy(__alloc(), std::__to_address(--__end_)); } template @@ -341,10 +341,10 @@ template __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c) _NOEXCEPT_(is_nothrow_move_constructible::value) - : __first_(_VSTD::move(__c.__first_)), - __begin_(_VSTD::move(__c.__begin_)), - __end_(_VSTD::move(__c.__end_)), - __end_cap_(_VSTD::move(__c.__end_cap_)) + : __first_(std::move(__c.__first_)), + __begin_(std::move(__c.__begin_)), + __end_(std::move(__c.__end_)), + __end_cap_(std::move(__c.__end_cap_)) { __c.__first_ = nullptr; __c.__begin_ = nullptr; @@ -404,11 +404,11 @@ _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value|| __is_nothrow_swappable<__alloc_rr>::value) { - _VSTD::swap(__first_, __x.__first_); - _VSTD::swap(__begin_, __x.__begin_); - _VSTD::swap(__end_, __x.__end_); - _VSTD::swap(__end_cap(), __x.__end_cap()); - _VSTD::__swap_allocator(__alloc(), __x.__alloc()); + std::swap(__first_, __x.__first_); + std::swap(__begin_, __x.__begin_); + std::swap(__end_, __x.__end_); + std::swap(__end_cap(), __x.__end_cap()); + std::__swap_allocator(__alloc(), __x.__alloc()); } template @@ -420,10 +420,10 @@ __split_buffer __t(__n, 0, __alloc()); __t.__construct_at_end(move_iterator(__begin_), move_iterator(__end_)); - _VSTD::swap(__first_, __t.__first_); - _VSTD::swap(__begin_, __t.__begin_); - _VSTD::swap(__end_, __t.__end_); - _VSTD::swap(__end_cap(), __t.__end_cap()); + std::swap(__first_, __t.__first_); + std::swap(__begin_, __t.__begin_); + std::swap(__end_, __t.__end_); + std::swap(__end_cap(), __t.__end_cap()); } } @@ -441,10 +441,10 @@ __t.__construct_at_end(move_iterator(__begin_), move_iterator(__end_)); __t.__end_ = __t.__begin_ + (__end_ - __begin_); - _VSTD::swap(__first_, __t.__first_); - _VSTD::swap(__begin_, __t.__begin_); - _VSTD::swap(__end_, __t.__end_); - _VSTD::swap(__end_cap(), __t.__end_cap()); + std::swap(__first_, __t.__first_); + std::swap(__begin_, __t.__begin_); + std::swap(__end_, __t.__end_); + std::swap(__end_cap(), __t.__end_cap()); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) @@ -464,7 +464,7 @@ { difference_type __d = __end_cap() - __end_; __d = (__d + 1) / 2; - __begin_ = _VSTD::move_backward(__begin_, __end_, __end_ + __d); + __begin_ = std::move_backward(__begin_, __end_, __end_ + __d); __end_ += __d; } else @@ -473,13 +473,13 @@ __split_buffer __t(__c, (__c + 3) / 4, __alloc()); __t.__construct_at_end(move_iterator(__begin_), move_iterator(__end_)); - _VSTD::swap(__first_, __t.__first_); - _VSTD::swap(__begin_, __t.__begin_); - _VSTD::swap(__end_, __t.__end_); - _VSTD::swap(__end_cap(), __t.__end_cap()); + std::swap(__first_, __t.__first_); + std::swap(__begin_, __t.__begin_); + std::swap(__end_, __t.__end_); + std::swap(__end_cap(), __t.__end_cap()); } } - __alloc_traits::construct(__alloc(), _VSTD::__to_address(__begin_-1), __x); + __alloc_traits::construct(__alloc(), std::__to_address(__begin_-1), __x); --__begin_; } @@ -493,7 +493,7 @@ { difference_type __d = __end_cap() - __end_; __d = (__d + 1) / 2; - __begin_ = _VSTD::move_backward(__begin_, __end_, __end_ + __d); + __begin_ = std::move_backward(__begin_, __end_, __end_ + __d); __end_ += __d; } else @@ -502,14 +502,14 @@ __split_buffer __t(__c, (__c + 3) / 4, __alloc()); __t.__construct_at_end(move_iterator(__begin_), move_iterator(__end_)); - _VSTD::swap(__first_, __t.__first_); - _VSTD::swap(__begin_, __t.__begin_); - _VSTD::swap(__end_, __t.__end_); - _VSTD::swap(__end_cap(), __t.__end_cap()); + std::swap(__first_, __t.__first_); + std::swap(__begin_, __t.__begin_); + std::swap(__end_, __t.__end_); + std::swap(__end_cap(), __t.__end_cap()); } } - __alloc_traits::construct(__alloc(), _VSTD::__to_address(__begin_-1), - _VSTD::move(__x)); + __alloc_traits::construct(__alloc(), std::__to_address(__begin_-1), + std::move(__x)); --__begin_; } @@ -524,7 +524,7 @@ { difference_type __d = __begin_ - __first_; __d = (__d + 1) / 2; - __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d); + __end_ = std::move(__begin_, __end_, __begin_ - __d); __begin_ -= __d; } else @@ -533,13 +533,13 @@ __split_buffer __t(__c, __c / 4, __alloc()); __t.__construct_at_end(move_iterator(__begin_), move_iterator(__end_)); - _VSTD::swap(__first_, __t.__first_); - _VSTD::swap(__begin_, __t.__begin_); - _VSTD::swap(__end_, __t.__end_); - _VSTD::swap(__end_cap(), __t.__end_cap()); + std::swap(__first_, __t.__first_); + std::swap(__begin_, __t.__begin_); + std::swap(__end_, __t.__end_); + std::swap(__end_cap(), __t.__end_cap()); } } - __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_), __x); + __alloc_traits::construct(__alloc(), std::__to_address(__end_), __x); ++__end_; } @@ -553,7 +553,7 @@ { difference_type __d = __begin_ - __first_; __d = (__d + 1) / 2; - __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d); + __end_ = std::move(__begin_, __end_, __begin_ - __d); __begin_ -= __d; } else @@ -562,14 +562,14 @@ __split_buffer __t(__c, __c / 4, __alloc()); __t.__construct_at_end(move_iterator(__begin_), move_iterator(__end_)); - _VSTD::swap(__first_, __t.__first_); - _VSTD::swap(__begin_, __t.__begin_); - _VSTD::swap(__end_, __t.__end_); - _VSTD::swap(__end_cap(), __t.__end_cap()); + std::swap(__first_, __t.__first_); + std::swap(__begin_, __t.__begin_); + std::swap(__end_, __t.__end_); + std::swap(__end_cap(), __t.__end_cap()); } } - __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_), - _VSTD::move(__x)); + __alloc_traits::construct(__alloc(), std::__to_address(__end_), + std::move(__x)); ++__end_; } @@ -584,7 +584,7 @@ { difference_type __d = __begin_ - __first_; __d = (__d + 1) / 2; - __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d); + __end_ = std::move(__begin_, __end_, __begin_ - __d); __begin_ -= __d; } else @@ -593,14 +593,14 @@ __split_buffer __t(__c, __c / 4, __alloc()); __t.__construct_at_end(move_iterator(__begin_), move_iterator(__end_)); - _VSTD::swap(__first_, __t.__first_); - _VSTD::swap(__begin_, __t.__begin_); - _VSTD::swap(__end_, __t.__end_); - _VSTD::swap(__end_cap(), __t.__end_cap()); + std::swap(__first_, __t.__first_); + std::swap(__begin_, __t.__begin_); + std::swap(__end_, __t.__end_); + std::swap(__end_cap(), __t.__end_cap()); } } - __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_), - _VSTD::forward<_Args>(__args)...); + __alloc_traits::construct(__alloc(), std::__to_address(__end_), + std::forward<_Args>(__args)...); ++__end_; } diff --git a/libcxx/include/__std_stream b/libcxx/include/__std_stream --- a/libcxx/include/__std_stream +++ b/libcxx/include/__std_stream @@ -116,7 +116,7 @@ return __result; } char __extbuf[__limit]; - int __nread = _VSTD::max(1, __encoding_); + int __nread = std::max(1, __encoding_); for (int __i = 0; __i < __nread; ++__i) { int __c = getc(__file_); @@ -139,7 +139,7 @@ &__1buf, &__1buf + 1, __inxt); switch (__r) { - case _VSTD::codecvt_base::ok: + case std::codecvt_base::ok: break; case codecvt_base::partial: *__st_ = __sv_st; @@ -155,11 +155,11 @@ break; case codecvt_base::error: return traits_type::eof(); - case _VSTD::codecvt_base::noconv: + case std::codecvt_base::noconv: __1buf = static_cast(__extbuf[0]); break; } - } while (__r == _VSTD::codecvt_base::partial); + } while (__r == std::codecvt_base::partial); } if (!__consume) { @@ -197,9 +197,9 @@ switch (__cv_->out(*__st_, &__ci, &__ci + 1, __inxt, __extbuf, __extbuf + sizeof(__extbuf), __enxt)) { - case _VSTD::codecvt_base::ok: + case std::codecvt_base::ok: break; - case _VSTD::codecvt_base::noconv: + case std::codecvt_base::noconv: __extbuf[0] = static_cast(__last_consumed_); __enxt = __extbuf + 1; break; diff --git a/libcxx/include/__string b/libcxx/include/__string --- a/libcxx/include/__string +++ b/libcxx/include/__string @@ -293,7 +293,7 @@ _CharT* __copy_constexpr(_CharT* __dest, const _CharT* __source, size_t __n) _NOEXCEPT { _LIBCPP_ASSERT(__libcpp_is_constant_evaluated(), "__copy_constexpr() should always be constant evaluated"); - _VSTD::copy_n(__source, __n, __dest); + std::copy_n(__source, __n, __dest); return __dest; } @@ -305,8 +305,8 @@ if (__n == 0) return __dest; _CharT* __allocation = new _CharT[__n]; - _VSTD::__copy_constexpr(__allocation, __source, __n); - _VSTD::__copy_constexpr(__dest, static_cast(__allocation), __n); + std::__copy_constexpr(__allocation, __source, __n); + std::__copy_constexpr(__dest, static_cast(__allocation), __n); delete[] __allocation; return __dest; } @@ -316,7 +316,7 @@ _CharT* __assign_constexpr(_CharT* __s, size_t __n, _CharT __a) _NOEXCEPT { _LIBCPP_ASSERT(__libcpp_is_constant_evaluated(), "__assign_constexpr() should always be constant evaluated"); - _VSTD::fill_n(__s, __n, __a); + std::fill_n(__s, __n, __a); return __s; } @@ -361,8 +361,8 @@ char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT { return __libcpp_is_constant_evaluated() - ? _VSTD::__move_constexpr(__s1, __s2, __n) - : __n == 0 ? __s1 : (char_type*)_VSTD::memmove(__s1, __s2, __n); + ? std::__move_constexpr(__s1, __s2, __n) + : __n == 0 ? __s1 : (char_type*)std::memmove(__s1, __s2, __n); } static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT @@ -371,15 +371,15 @@ _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range"); } return __libcpp_is_constant_evaluated() - ? _VSTD::__copy_constexpr(__s1, __s2, __n) - : __n == 0 ? __s1 : (char_type*)_VSTD::memcpy(__s1, __s2, __n); + ? std::__copy_constexpr(__s1, __s2, __n) + : __n == 0 ? __s1 : (char_type*)std::memcpy(__s1, __s2, __n); } static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT { return __libcpp_is_constant_evaluated() - ? _VSTD::__assign_constexpr(__s, __n, __a) - : __n == 0 ? __s : (char_type*)_VSTD::memset(__s, to_int_type(__a), __n); + ? std::__assign_constexpr(__s, __n, __a) + : __n == 0 ? __s : (char_type*)std::memset(__s, to_int_type(__a), __n); } static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT @@ -403,7 +403,7 @@ #if __has_feature(cxx_constexpr_string_builtins) return __builtin_memcmp(__s1, __s2, __n); #elif _LIBCPP_STD_VER <= 14 - return _VSTD::memcmp(__s1, __s2, __n); + return std::memcmp(__s1, __s2, __n); #else for (; __n; --__n, ++__s1, ++__s2) { @@ -425,7 +425,7 @@ #if __has_feature(cxx_constexpr_string_builtins) return __builtin_char_memchr(__s, to_int_type(__a), __n); #elif _LIBCPP_STD_VER <= 14 - return (const char_type*) _VSTD::memchr(__s, to_int_type(__a), __n); + return (const char_type*) std::memchr(__s, to_int_type(__a), __n); #else for (; __n; --__n) { @@ -467,8 +467,8 @@ char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT { return __libcpp_is_constant_evaluated() - ? _VSTD::__move_constexpr(__s1, __s2, __n) - : __n == 0 ? __s1 : _VSTD::wmemmove(__s1, __s2, __n); + ? std::__move_constexpr(__s1, __s2, __n) + : __n == 0 ? __s1 : std::wmemmove(__s1, __s2, __n); } static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT @@ -477,15 +477,15 @@ _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range"); } return __libcpp_is_constant_evaluated() - ? _VSTD::__copy_constexpr(__s1, __s2, __n) - : __n == 0 ? __s1 : _VSTD::wmemcpy(__s1, __s2, __n); + ? std::__copy_constexpr(__s1, __s2, __n) + : __n == 0 ? __s1 : std::wmemcpy(__s1, __s2, __n); } static inline _LIBCPP_CONSTEXPR_AFTER_CXX17 char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT { return __libcpp_is_constant_evaluated() - ? _VSTD::__assign_constexpr(__s, __n, __a) - : __n == 0 ? __s : _VSTD::wmemset(__s, __a, __n); + ? std::__assign_constexpr(__s, __n, __a) + : __n == 0 ? __s : std::wmemset(__s, __a, __n); } static inline _LIBCPP_CONSTEXPR int_type not_eof(int_type __c) _NOEXCEPT {return eq_int_type(__c, eof()) ? ~eof() : __c;} @@ -508,7 +508,7 @@ #if __has_feature(cxx_constexpr_string_builtins) return __builtin_wmemcmp(__s1, __s2, __n); #elif _LIBCPP_STD_VER <= 14 - return _VSTD::wmemcmp(__s1, __s2, __n); + return std::wmemcmp(__s1, __s2, __n); #else for (; __n; --__n, ++__s1, ++__s2) { @@ -528,7 +528,7 @@ #if __has_feature(cxx_constexpr_string_builtins) return __builtin_wcslen(__s); #elif _LIBCPP_STD_VER <= 14 - return _VSTD::wcslen(__s); + return std::wcslen(__s); #else size_t __len = 0; for (; !eq(*__s, char_type(0)); ++__s) @@ -546,7 +546,7 @@ #if __has_feature(cxx_constexpr_string_builtins) return __builtin_wmemchr(__s, __a, __n); #elif _LIBCPP_STD_VER <= 14 - return _VSTD::wmemchr(__s, __a, __n); + return std::wmemchr(__s, __a, __n); #else for (; __n; --__n) { @@ -564,7 +564,7 @@ _LIBCPP_CONSTEXPR inline size_t __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT { #if _LIBCPP_DEBUG_LEVEL >= 1 - return __s ? _Traits::length(__s) : (_VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, "p == nullptr", "null pointer pass to non-null argument of char_traits<...>::length")), 0); + return __s ? _Traits::length(__s) : (std::__libcpp_debug_function(std::__libcpp_debug_info(__FILE__, __LINE__, "p == nullptr", "null pointer pass to non-null argument of char_traits<...>::length")), 0); #else return _Traits::length(__s); #endif @@ -601,8 +601,8 @@ char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT { return __libcpp_is_constant_evaluated() - ? _VSTD::__move_constexpr(__s1, __s2, __n) - : __n == 0 ? __s1 : (char_type*)_VSTD::memmove(__s1, __s2, __n); + ? std::__move_constexpr(__s1, __s2, __n) + : __n == 0 ? __s1 : (char_type*)std::memmove(__s1, __s2, __n); } static _LIBCPP_CONSTEXPR_AFTER_CXX17 @@ -612,16 +612,16 @@ _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range"); } return __libcpp_is_constant_evaluated() - ? _VSTD::__copy_constexpr(__s1, __s2, __n) - : __n == 0 ? __s1 : (char_type*)_VSTD::memcpy(__s1, __s2, __n); + ? std::__copy_constexpr(__s1, __s2, __n) + : __n == 0 ? __s1 : (char_type*)std::memcpy(__s1, __s2, __n); } static _LIBCPP_CONSTEXPR_AFTER_CXX17 char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT { return __libcpp_is_constant_evaluated() - ? _VSTD::__assign_constexpr(__s, __n, __a) - : __n == 0 ? __s : (char_type*)_VSTD::memset(__s, to_int_type(__a), __n); + ? std::__assign_constexpr(__s, __n, __a) + : __n == 0 ? __s : (char_type*)std::memset(__s, to_int_type(__a), __n); } static inline constexpr int_type not_eof(int_type __c) noexcept @@ -1030,12 +1030,12 @@ __str_rfind(const _CharT *__p, _SizeT __sz, const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT { - __pos = _VSTD::min(__pos, __sz); + __pos = std::min(__pos, __sz); if (__n < __sz - __pos) __pos += __n; else __pos = __sz; - const _CharT* __r = _VSTD::__find_end( + const _CharT* __r = std::__find_end( __p, __p + __pos, __s, __s + __n, _Traits::eq, random_access_iterator_tag(), random_access_iterator_tag()); if (__n > 0 && __r == __p + __pos) @@ -1051,7 +1051,7 @@ { if (__pos >= __sz || __n == 0) return __npos; - const _CharT* __r = _VSTD::__find_first_of_ce + const _CharT* __r = std::__find_first_of_ce (__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq ); if (__r == __p + __sz) return __npos; diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support --- a/libcxx/include/__threading_support +++ b/libcxx/include/__threading_support @@ -432,7 +432,7 @@ _LIBCPP_HIDE_FROM_ABI inline void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns) { - __libcpp_timespec_t __ts = _VSTD::__convert_to_timespec<__libcpp_timespec_t>(__ns); + __libcpp_timespec_t __ts = std::__convert_to_timespec<__libcpp_timespec_t>(__ns); while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR); } @@ -617,7 +617,7 @@ _LIBCPP_HIDE_FROM_ABI inline void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns) { - __libcpp_timespec_t __ts = _VSTD::__convert_to_timespec<__libcpp_timespec_t>(__ns); + __libcpp_timespec_t __ts = std::__convert_to_timespec<__libcpp_timespec_t>(__ns); thrd_sleep(&__ts, nullptr); } diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -110,10 +110,10 @@ if (__x->__right_ && !__x->__right_->__is_black_) return 0; } - unsigned __h = _VSTD::__tree_sub_invariant(__x->__left_); + unsigned __h = std::__tree_sub_invariant(__x->__left_); if (__h == 0) return 0; // invalid left subtree - if (__h != _VSTD::__tree_sub_invariant(__x->__right_)) + if (__h != std::__tree_sub_invariant(__x->__right_)) return 0; // invalid or different height right subtree return __h + __x->__is_black_; // return black height of this node } @@ -130,13 +130,13 @@ // check __x->__parent_ consistency if (__root->__parent_ == nullptr) return false; - if (!_VSTD::__tree_is_left_child(__root)) + if (!std::__tree_is_left_child(__root)) return false; // root must be black if (!__root->__is_black_) return false; // do normal node checks - return _VSTD::__tree_sub_invariant(__root) != 0; + return std::__tree_sub_invariant(__root) != 0; } // Returns: pointer to the left-most node under __x. @@ -170,8 +170,8 @@ __tree_next(_NodePtr __x) _NOEXCEPT { if (__x->__right_ != nullptr) - return _VSTD::__tree_min(__x->__right_); - while (!_VSTD::__tree_is_left_child(__x)) + return std::__tree_min(__x->__right_); + while (!std::__tree_is_left_child(__x)) __x = __x->__parent_unsafe(); return __x->__parent_unsafe(); } @@ -182,8 +182,8 @@ __tree_next_iter(_NodePtr __x) _NOEXCEPT { if (__x->__right_ != nullptr) - return static_cast<_EndNodePtr>(_VSTD::__tree_min(__x->__right_)); - while (!_VSTD::__tree_is_left_child(__x)) + return static_cast<_EndNodePtr>(std::__tree_min(__x->__right_)); + while (!std::__tree_is_left_child(__x)) __x = __x->__parent_unsafe(); return static_cast<_EndNodePtr>(__x->__parent_); } @@ -197,9 +197,9 @@ __tree_prev_iter(_EndNodePtr __x) _NOEXCEPT { if (__x->__left_ != nullptr) - return _VSTD::__tree_max(__x->__left_); + return std::__tree_max(__x->__left_); _NodePtr __xx = static_cast<_NodePtr>(__x); - while (_VSTD::__tree_is_left_child(__xx)) + while (std::__tree_is_left_child(__xx)) __xx = __xx->__parent_unsafe(); return __xx->__parent_unsafe(); } @@ -239,7 +239,7 @@ if (__x->__right_ != nullptr) __x->__right_->__set_parent(__x); __y->__parent_ = __x->__parent_; - if (_VSTD::__tree_is_left_child(__x)) + if (std::__tree_is_left_child(__x)) __x->__parent_->__left_ = __y; else __x->__parent_unsafe()->__right_ = __y; @@ -259,7 +259,7 @@ if (__x->__left_ != nullptr) __x->__left_->__set_parent(__x); __y->__parent_ = __x->__parent_; - if (_VSTD::__tree_is_left_child(__x)) + if (std::__tree_is_left_child(__x)) __x->__parent_->__left_ = __y; else __x->__parent_unsafe()->__right_ = __y; @@ -283,7 +283,7 @@ while (__x != __root && !__x->__parent_unsafe()->__is_black_) { // __x->__parent_ != __root because __x->__parent_->__is_black == false - if (_VSTD::__tree_is_left_child(__x->__parent_unsafe())) + if (std::__tree_is_left_child(__x->__parent_unsafe())) { _NodePtr __y = __x->__parent_unsafe()->__parent_unsafe()->__right_; if (__y != nullptr && !__y->__is_black_) @@ -296,16 +296,16 @@ } else { - if (!_VSTD::__tree_is_left_child(__x)) + if (!std::__tree_is_left_child(__x)) { __x = __x->__parent_unsafe(); - _VSTD::__tree_left_rotate(__x); + std::__tree_left_rotate(__x); } __x = __x->__parent_unsafe(); __x->__is_black_ = true; __x = __x->__parent_unsafe(); __x->__is_black_ = false; - _VSTD::__tree_right_rotate(__x); + std::__tree_right_rotate(__x); break; } } @@ -322,16 +322,16 @@ } else { - if (_VSTD::__tree_is_left_child(__x)) + if (std::__tree_is_left_child(__x)) { __x = __x->__parent_unsafe(); - _VSTD::__tree_right_rotate(__x); + std::__tree_right_rotate(__x); } __x = __x->__parent_unsafe(); __x->__is_black_ = true; __x = __x->__parent_unsafe(); __x->__is_black_ = false; - _VSTD::__tree_left_rotate(__x); + std::__tree_left_rotate(__x); break; } } @@ -354,7 +354,7 @@ // __y will have at most one child. // __y will be the initial hole in the tree (make the hole at a leaf) _NodePtr __y = (__z->__left_ == nullptr || __z->__right_ == nullptr) ? - __z : _VSTD::__tree_next(__z); + __z : std::__tree_next(__z); // __x is __y's possibly null single child _NodePtr __x = __y->__left_ != nullptr ? __y->__left_ : __y->__right_; // __w is __x's possibly null uncle (will become __x's sibling) @@ -362,7 +362,7 @@ // link __x to __y's parent, and find __w if (__x != nullptr) __x->__parent_ = __y->__parent_; - if (_VSTD::__tree_is_left_child(__y)) + if (std::__tree_is_left_child(__y)) { __y->__parent_->__left_ = __x; if (__y != __root) @@ -383,7 +383,7 @@ { // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr __y->__parent_ = __z->__parent_; - if (_VSTD::__tree_is_left_child(__z)) + if (std::__tree_is_left_child(__z)) __y->__parent_->__left_ = __y; else __y->__parent_unsafe()->__right_ = __y; @@ -423,13 +423,13 @@ // with a non-null black child). while (true) { - if (!_VSTD::__tree_is_left_child(__w)) // if x is left child + if (!std::__tree_is_left_child(__w)) // if x is left child { if (!__w->__is_black_) { __w->__is_black_ = true; __w->__parent_unsafe()->__is_black_ = false; - _VSTD::__tree_left_rotate(__w->__parent_unsafe()); + std::__tree_left_rotate(__w->__parent_unsafe()); // __x is still valid // reset __root only if necessary if (__root == __w->__left_) @@ -450,7 +450,7 @@ break; } // reset sibling, and it still can't be null - __w = _VSTD::__tree_is_left_child(__x) ? + __w = std::__tree_is_left_child(__x) ? __x->__parent_unsafe()->__right_ : __x->__parent_->__left_; // continue; @@ -462,7 +462,7 @@ // __w left child is non-null and red __w->__left_->__is_black_ = true; __w->__is_black_ = false; - _VSTD::__tree_right_rotate(__w); + std::__tree_right_rotate(__w); // __w is known not to be root, so root hasn't changed // reset sibling, and it still can't be null __w = __w->__parent_unsafe(); @@ -471,7 +471,7 @@ __w->__is_black_ = __w->__parent_unsafe()->__is_black_; __w->__parent_unsafe()->__is_black_ = true; __w->__right_->__is_black_ = true; - _VSTD::__tree_left_rotate(__w->__parent_unsafe()); + std::__tree_left_rotate(__w->__parent_unsafe()); break; } } @@ -481,7 +481,7 @@ { __w->__is_black_ = true; __w->__parent_unsafe()->__is_black_ = false; - _VSTD::__tree_right_rotate(__w->__parent_unsafe()); + std::__tree_right_rotate(__w->__parent_unsafe()); // __x is still valid // reset __root only if necessary if (__root == __w->__right_) @@ -502,7 +502,7 @@ break; } // reset sibling, and it still can't be null - __w = _VSTD::__tree_is_left_child(__x) ? + __w = std::__tree_is_left_child(__x) ? __x->__parent_unsafe()->__right_ : __x->__parent_->__left_; // continue; @@ -514,7 +514,7 @@ // __w right child is non-null and red __w->__right_->__is_black_ = true; __w->__is_black_ = false; - _VSTD::__tree_left_rotate(__w); + std::__tree_left_rotate(__w); // __w is known not to be root, so root hasn't changed // reset sibling, and it still can't be null __w = __w->__parent_unsafe(); @@ -523,7 +523,7 @@ __w->__is_black_ = __w->__parent_unsafe()->__is_black_; __w->__parent_unsafe()->__is_black_ = true; __w->__left_->__is_black_ = true; - _VSTD::__tree_right_rotate(__w->__parent_unsafe()); + std::__tree_right_rotate(__w->__parent_unsafe()); break; } } @@ -564,11 +564,11 @@ } _LIBCPP_INLINE_VISIBILITY static __container_value_type* __get_ptr(__node_value_type& __n) { - return _VSTD::addressof(__n); + return std::addressof(__n); } _LIBCPP_INLINE_VISIBILITY static __container_value_type&& __move(__node_value_type& __v) { - return _VSTD::move(__v); + return std::move(__v); } }; @@ -611,7 +611,7 @@ _LIBCPP_INLINE_VISIBILITY static __container_value_type* __get_ptr(__node_value_type& __n) { - return _VSTD::addressof(__n.__get_value()); + return std::addressof(__n.__get_value()); } _LIBCPP_INLINE_VISIBILITY @@ -841,7 +841,7 @@ _LIBCPP_INLINE_VISIBILITY __tree_iterator& operator++() { __ptr_ = static_cast<__iter_pointer>( - _VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_))); + std::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_))); return *this; } _LIBCPP_INLINE_VISIBILITY @@ -850,7 +850,7 @@ _LIBCPP_INLINE_VISIBILITY __tree_iterator& operator--() { - __ptr_ = static_cast<__iter_pointer>(_VSTD::__tree_prev_iter<__node_base_pointer>( + __ptr_ = static_cast<__iter_pointer>(std::__tree_prev_iter<__node_base_pointer>( static_cast<__end_node_pointer>(__ptr_))); return *this; } @@ -922,7 +922,7 @@ _LIBCPP_INLINE_VISIBILITY __tree_const_iterator& operator++() { __ptr_ = static_cast<__iter_pointer>( - _VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_))); + std::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_))); return *this; } @@ -932,7 +932,7 @@ _LIBCPP_INLINE_VISIBILITY __tree_const_iterator& operator--() { - __ptr_ = static_cast<__iter_pointer>(_VSTD::__tree_prev_iter<__node_base_pointer>( + __ptr_ = static_cast<__iter_pointer>(std::__tree_prev_iter<__node_base_pointer>( static_cast<__end_node_pointer>(__ptr_))); return *this; } @@ -1081,7 +1081,7 @@ {return static_cast<__node_pointer>(__end_node()->__left_);} __node_base_pointer* __root_ptr() const _NOEXCEPT { - return _VSTD::addressof(__end_node()->__left_); + return std::addressof(__end_node()->__left_); } typedef __tree_iterator iterator; @@ -1122,7 +1122,7 @@ _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT - {return _VSTD::min( + {return std::min( __node_traits::max_size(__node_alloc()), numeric_limits::max());} @@ -1161,7 +1161,7 @@ template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique(_Pp&& __x) { - return __emplace_unique_extract_key(_VSTD::forward<_Pp>(__x), + return __emplace_unique_extract_key(std::forward<_Pp>(__x), __can_extract_key<_Pp, key_type>()); } @@ -1171,41 +1171,41 @@ __can_extract_map_key<_First, key_type, __container_value_type>::value, pair >::type __emplace_unique(_First&& __f, _Second&& __s) { - return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f), - _VSTD::forward<_Second>(__s)); + return __emplace_unique_key_args(__f, std::forward<_First>(__f), + std::forward<_Second>(__s)); } template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique(_Args&&... __args) { - return __emplace_unique_impl(_VSTD::forward<_Args>(__args)...); + return __emplace_unique_impl(std::forward<_Args>(__args)...); } template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) { - return __emplace_unique_impl(_VSTD::forward<_Pp>(__x)); + return __emplace_unique_impl(std::forward<_Pp>(__x)); } template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) { - return __emplace_unique_key_args(__x, _VSTD::forward<_Pp>(__x)); + return __emplace_unique_key_args(__x, std::forward<_Pp>(__x)); } template _LIBCPP_INLINE_VISIBILITY pair __emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) { - return __emplace_unique_key_args(__x.first, _VSTD::forward<_Pp>(__x)); + return __emplace_unique_key_args(__x.first, std::forward<_Pp>(__x)); } template _LIBCPP_INLINE_VISIBILITY iterator __emplace_hint_unique(const_iterator __p, _Pp&& __x) { - return __emplace_hint_unique_extract_key(__p, _VSTD::forward<_Pp>(__x), + return __emplace_hint_unique_extract_key(__p, std::forward<_Pp>(__x), __can_extract_key<_Pp, key_type>()); } @@ -1216,35 +1216,35 @@ iterator >::type __emplace_hint_unique(const_iterator __p, _First&& __f, _Second&& __s) { return __emplace_hint_unique_key_args(__p, __f, - _VSTD::forward<_First>(__f), - _VSTD::forward<_Second>(__s)).first; + std::forward<_First>(__f), + std::forward<_Second>(__s)).first; } template _LIBCPP_INLINE_VISIBILITY iterator __emplace_hint_unique(const_iterator __p, _Args&&... __args) { - return __emplace_hint_unique_impl(__p, _VSTD::forward<_Args>(__args)...); + return __emplace_hint_unique_impl(__p, std::forward<_Args>(__args)...); } template _LIBCPP_INLINE_VISIBILITY iterator __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_fail_tag) { - return __emplace_hint_unique_impl(__p, _VSTD::forward<_Pp>(__x)); + return __emplace_hint_unique_impl(__p, std::forward<_Pp>(__x)); } template _LIBCPP_INLINE_VISIBILITY iterator __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_self_tag) { - return __emplace_hint_unique_key_args(__p, __x, _VSTD::forward<_Pp>(__x)).first; + return __emplace_hint_unique_key_args(__p, __x, std::forward<_Pp>(__x)).first; } template _LIBCPP_INLINE_VISIBILITY iterator __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_first_tag) { - return __emplace_hint_unique_key_args(__p, __x.first, _VSTD::forward<_Pp>(__x)).first; + return __emplace_hint_unique_key_args(__p, __x.first, std::forward<_Pp>(__x)).first; } _LIBCPP_INLINE_VISIBILITY @@ -1259,12 +1259,12 @@ _LIBCPP_INLINE_VISIBILITY pair __insert_unique(__container_value_type&& __v) { - return __emplace_unique_key_args(_NodeTypes::__get_key(__v), _VSTD::move(__v)); + return __emplace_unique_key_args(_NodeTypes::__get_key(__v), std::move(__v)); } _LIBCPP_INLINE_VISIBILITY iterator __insert_unique(const_iterator __p, __container_value_type&& __v) { - return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), _VSTD::move(__v)).first; + return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), std::move(__v)).first; } template ::type> _LIBCPP_INLINE_VISIBILITY pair __insert_unique(_Vp&& __v) { - return __emplace_unique(_VSTD::forward<_Vp>(__v)); + return __emplace_unique(std::forward<_Vp>(__v)); } template ::type> _LIBCPP_INLINE_VISIBILITY iterator __insert_unique(const_iterator __p, _Vp&& __v) { - return __emplace_hint_unique(__p, _VSTD::forward<_Vp>(__v)); + return __emplace_hint_unique(__p, std::forward<_Vp>(__v)); } _LIBCPP_INLINE_VISIBILITY iterator __insert_multi(__container_value_type&& __v) { - return __emplace_multi(_VSTD::move(__v)); + return __emplace_multi(std::move(__v)); } _LIBCPP_INLINE_VISIBILITY iterator __insert_multi(const_iterator __p, __container_value_type&& __v) { - return __emplace_hint_multi(__p, _VSTD::move(__v)); + return __emplace_hint_multi(__p, std::move(__v)); } template _LIBCPP_INLINE_VISIBILITY iterator __insert_multi(_Vp&& __v) { - return __emplace_multi(_VSTD::forward<_Vp>(__v)); + return __emplace_multi(std::forward<_Vp>(__v)); } template _LIBCPP_INLINE_VISIBILITY iterator __insert_multi(const_iterator __p, _Vp&& __v) { - return __emplace_hint_multi(__p, _VSTD::forward<_Vp>(__v)); + return __emplace_hint_multi(__p, std::forward<_Vp>(__v)); } _LIBCPP_INLINE_VISIBILITY @@ -1482,7 +1482,7 @@ _LIBCPP_INLINE_VISIBILITY void __move_assign_alloc(__tree& __t, true_type) _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) - {__node_alloc() = _VSTD::move(__t.__node_alloc());} + {__node_alloc() = std::move(__t.__node_alloc());} _LIBCPP_INLINE_VISIBILITY void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {} @@ -1592,27 +1592,27 @@ { if (__cache->__parent_ == nullptr) return nullptr; - if (_VSTD::__tree_is_left_child(static_cast<__node_base_pointer>(__cache))) + if (std::__tree_is_left_child(static_cast<__node_base_pointer>(__cache))) { __cache->__parent_->__left_ = nullptr; __cache = static_cast<__node_pointer>(__cache->__parent_); if (__cache->__right_ == nullptr) return __cache; - return static_cast<__node_pointer>(_VSTD::__tree_leaf(__cache->__right_)); + return static_cast<__node_pointer>(std::__tree_leaf(__cache->__right_)); } // __cache is right child __cache->__parent_unsafe()->__right_ = nullptr; __cache = static_cast<__node_pointer>(__cache->__parent_); if (__cache->__left_ == nullptr) return __cache; - return static_cast<__node_pointer>(_VSTD::__tree_leaf(__cache->__left_)); + return static_cast<__node_pointer>(std::__tree_leaf(__cache->__left_)); } template __tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(const __tree& __t) { - if (this != _VSTD::addressof(__t)) + if (this != std::addressof(__t)) { value_comp() = __t.value_comp(); __copy_assign_alloc(__t); @@ -1682,9 +1682,9 @@ _NOEXCEPT_( is_nothrow_move_constructible<__node_allocator>::value && is_nothrow_move_constructible::value) - : __begin_node_(_VSTD::move(__t.__begin_node_)), - __pair1_(_VSTD::move(__t.__pair1_)), - __pair3_(_VSTD::move(__t.__pair3_)) + : __begin_node_(std::move(__t.__begin_node_)), + __pair1_(std::move(__t.__pair1_)), + __pair3_(std::move(__t.__pair3_)) { if (size() == 0) __begin_node() = __end_node(); @@ -1700,7 +1700,7 @@ template __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t, const allocator_type& __a) : __pair1_(__default_init_tag(), __node_allocator(__a)), - __pair3_(0, _VSTD::move(__t.value_comp())) + __pair3_(0, std::move(__t.value_comp())) { if (__a == __t.__alloc()) { @@ -1733,7 +1733,7 @@ __begin_node_ = __t.__begin_node_; __pair1_.first() = __t.__pair1_.first(); __move_assign_alloc(__t); - __pair3_ = _VSTD::move(__t.__pair3_); + __pair3_ = std::move(__t.__pair3_); if (size() == 0) __begin_node() = __end_node(); else @@ -1753,13 +1753,13 @@ __move_assign(__t, true_type()); else { - value_comp() = _VSTD::move(__t.value_comp()); + value_comp() = std::move(__t.value_comp()); const_iterator __e = end(); if (size() != 0) { _DetachedTreeCache __cache(this); while (__cache.__get() != nullptr && __t.size() != 0) { - __cache.__get()->__value_ = _VSTD::move(__t.remove(__t.begin())->__value_); + __cache.__get()->__value_ = std::move(__t.remove(__t.begin())->__value_); __node_insert_multi(__cache.__get()); __cache.__advance(); } @@ -1818,10 +1818,10 @@ _NOEXCEPT_(__is_nothrow_swappable::value) #endif { - using _VSTD::swap; + using std::swap; swap(__begin_node_, __t.__begin_node_); swap(__pair1_.first(), __t.__pair1_.first()); - _VSTD::__swap_allocator(__node_alloc(), __t.__node_alloc()); + std::__swap_allocator(__node_alloc(), __t.__node_alloc()); __pair3_.swap(__t.__pair3_); if (size() == 0) __begin_node() = __end_node(); @@ -1977,7 +1977,7 @@ if (value_comp()(__v, __nd->__value_)) { if (__nd->__left_ != nullptr) { - __nd_ptr = _VSTD::addressof(__nd->__left_); + __nd_ptr = std::addressof(__nd->__left_); __nd = static_cast<__node_pointer>(__nd->__left_); } else { __parent = static_cast<__parent_pointer>(__nd); @@ -1987,7 +1987,7 @@ else if (value_comp()(__nd->__value_, __v)) { if (__nd->__right_ != nullptr) { - __nd_ptr = _VSTD::addressof(__nd->__right_); + __nd_ptr = std::addressof(__nd->__right_); __nd = static_cast<__node_pointer>(__nd->__right_); } else { __parent = static_cast<__parent_pointer>(__nd); @@ -2044,10 +2044,10 @@ else if (value_comp()(*__hint, __v)) // check after { // *__hint < __v - const_iterator __next = _VSTD::next(__hint); + const_iterator __next = std::next(__hint); if (__next == end() || value_comp()(__v, *__next)) { - // *__hint < __v < *_VSTD::next(__hint) + // *__hint < __v < *std::next(__hint) if (__hint.__get_np()->__right_ == nullptr) { __parent = static_cast<__parent_pointer>(__hint.__ptr_); @@ -2080,7 +2080,7 @@ __child = __new_node; if (__begin_node()->__left_ != nullptr) __begin_node() = static_cast<__iter_pointer>(__begin_node()->__left_); - _VSTD::__tree_balance_after_insert(__end_node()->__left_, __child); + std::__tree_balance_after_insert(__end_node()->__left_, __child); ++size(); } @@ -2095,7 +2095,7 @@ bool __inserted = false; if (__child == nullptr) { - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); __r = __h.release(); __inserted = true; @@ -2116,7 +2116,7 @@ bool __inserted = false; if (__child == nullptr) { - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); __r = __h.release(); __inserted = true; @@ -2133,7 +2133,7 @@ "Cannot construct from __value_type"); __node_allocator& __na = __node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); - __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _VSTD::forward<_Args>(__args)...); + __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), std::forward<_Args>(__args)...); __h.get_deleter().__value_constructed = true; return __h; } @@ -2144,7 +2144,7 @@ pair::iterator, bool> __tree<_Tp, _Compare, _Allocator>::__emplace_unique_impl(_Args&&... __args) { - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); __parent_pointer __parent; __node_base_pointer& __child = __find_equal(__parent, __h->__value_); __node_pointer __r = static_cast<__node_pointer>(__child); @@ -2163,7 +2163,7 @@ typename __tree<_Tp, _Compare, _Allocator>::iterator __tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_impl(const_iterator __p, _Args&&... __args) { - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); __parent_pointer __parent; __node_base_pointer __dummy; __node_base_pointer& __child = __find_equal(__p, __parent, __dummy, __h->__value_); @@ -2181,7 +2181,7 @@ typename __tree<_Tp, _Compare, _Allocator>::iterator __tree<_Tp, _Compare, _Allocator>::__emplace_multi(_Args&&... __args) { - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); __parent_pointer __parent; __node_base_pointer& __child = __find_leaf_high(__parent, _NodeTypes::__get_key(__h->__value_)); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); @@ -2194,7 +2194,7 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p, _Args&&... __args) { - __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...); + __node_holder __h = __construct_node(std::forward<_Args>(__args)...); __parent_pointer __parent; __node_base_pointer& __child = __find_leaf(__p, __parent, _NodeTypes::__get_key(__h->__value_)); __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get())); @@ -2250,7 +2250,7 @@ if (__begin_node() == __ptr) __begin_node() = __r.__ptr_; --size(); - _VSTD::__tree_remove(__end_node()->__left_, + std::__tree_remove(__end_node()->__left_, static_cast<__node_base_pointer>(__ptr)); return __r; } @@ -2273,7 +2273,7 @@ if (__child != nullptr) return _InsertReturnType{ iterator(static_cast<__node_pointer>(__child)), - false, _VSTD::move(__nh)}; + false, std::move(__nh)}; __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__ptr)); @@ -2519,7 +2519,7 @@ else if (value_comp()(__rt->__value_, __k)) __rt = static_cast<__node_pointer>(__rt->__right_); else - return _VSTD::distance( + return std::distance( __lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), static_cast<__iter_pointer>(__rt)), __upper_bound(__k, static_cast<__node_pointer>(__rt->__right_), __result) ); @@ -2629,7 +2629,7 @@ return _Pp(iterator(__rt), iterator( __rt->__right_ != nullptr ? - static_cast<__iter_pointer>(_VSTD::__tree_min(__rt->__right_)) + static_cast<__iter_pointer>(std::__tree_min(__rt->__right_)) : __result)); } return _Pp(iterator(__result), iterator(__result)); @@ -2657,7 +2657,7 @@ return _Pp(const_iterator(__rt), const_iterator( __rt->__right_ != nullptr ? - static_cast<__iter_pointer>(_VSTD::__tree_min(__rt->__right_)) + static_cast<__iter_pointer>(std::__tree_min(__rt->__right_)) : __result)); } return _Pp(const_iterator(__result), const_iterator(__result)); @@ -2726,7 +2726,7 @@ __begin_node() = static_cast<__iter_pointer>(__np->__parent_); } --size(); - _VSTD::__tree_remove(__end_node()->__left_, + std::__tree_remove(__end_node()->__left_, static_cast<__node_base_pointer>(__np)); return __node_holder(__np, _Dp(__node_alloc(), true)); } diff --git a/libcxx/include/__utility/cmp.h b/libcxx/include/__utility/cmp.h --- a/libcxx/include/__utility/cmp.h +++ b/libcxx/include/__utility/cmp.h @@ -58,7 +58,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr bool cmp_not_equal(_Tp __t, _Up __u) noexcept { - return !_VSTD::cmp_equal(__t, __u); + return !std::cmp_equal(__t, __u); } template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up> @@ -77,29 +77,29 @@ _LIBCPP_INLINE_VISIBILITY constexpr bool cmp_greater(_Tp __t, _Up __u) noexcept { - return _VSTD::cmp_less(__u, __t); + return std::cmp_less(__u, __t); } template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up> _LIBCPP_INLINE_VISIBILITY constexpr bool cmp_less_equal(_Tp __t, _Up __u) noexcept { - return !_VSTD::cmp_greater(__t, __u); + return !std::cmp_greater(__t, __u); } template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up> _LIBCPP_INLINE_VISIBILITY constexpr bool cmp_greater_equal(_Tp __t, _Up __u) noexcept { - return !_VSTD::cmp_less(__t, __u); + return !std::cmp_less(__t, __u); } template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up> _LIBCPP_INLINE_VISIBILITY constexpr bool in_range(_Up __u) noexcept { - return _VSTD::cmp_less_equal(__u, numeric_limits<_Tp>::max()) && - _VSTD::cmp_greater_equal(__u, numeric_limits<_Tp>::min()); + return std::cmp_less_equal(__u, numeric_limits<_Tp>::max()) && + std::cmp_greater_equal(__u, numeric_limits<_Tp>::min()); } #endif diff --git a/libcxx/include/__utility/exchange.h b/libcxx/include/__utility/exchange.h --- a/libcxx/include/__utility/exchange.h +++ b/libcxx/include/__utility/exchange.h @@ -26,8 +26,8 @@ _T1 exchange(_T1& __obj, _T2&& __new_value) noexcept(is_nothrow_move_constructible<_T1>::value && is_nothrow_assignable<_T1&, _T2>::value) { - _T1 __old_value = _VSTD::move(__obj); - __obj = _VSTD::forward<_T2>(__new_value); + _T1 __old_value = std::move(__obj); + __obj = std::forward<_T2>(__new_value); return __old_value; } #endif // _LIBCPP_STD_VER > 11 diff --git a/libcxx/include/__utility/move.h b/libcxx/include/__utility/move.h --- a/libcxx/include/__utility/move.h +++ b/libcxx/include/__utility/move.h @@ -39,7 +39,7 @@ template _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 __move_if_noexcept_result_t<_Tp> move_if_noexcept(_Tp& __x) _NOEXCEPT { - return _VSTD::move(__x); + return std::move(__x); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h --- a/libcxx/include/__utility/pair.h +++ b/libcxx/include/__utility/pair.h @@ -180,7 +180,7 @@ explicit pair(_U1&& __u1, _U2&& __u2) _NOEXCEPT_((is_nothrow_constructible::value && is_nothrow_constructible::value)) - : first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {} + : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {} template < #if _LIBCPP_STD_VER > 20 // http://wg21.link/P1951 @@ -194,7 +194,7 @@ pair(_U1&& __u1, _U2&& __u2) _NOEXCEPT_((is_nothrow_constructible::value && is_nothrow_constructible::value)) - : first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {} + : first(std::forward<_U1>(__u1)), second(std::forward<_U2>(__u2)) {} template() @@ -221,7 +221,7 @@ explicit pair(pair<_U1, _U2>&&__p) _NOEXCEPT_((is_nothrow_constructible::value && is_nothrow_constructible::value)) - : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {} + : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {} template() @@ -230,23 +230,23 @@ pair(pair<_U1, _U2>&& __p) _NOEXCEPT_((is_nothrow_constructible::value && is_nothrow_constructible::value)) - : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {} + : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) {} template::template __enable_explicit<_Tuple>() >::type* = nullptr> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit pair(_Tuple&& __p) - : first(_VSTD::get<0>(_VSTD::forward<_Tuple>(__p))), - second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {} + : first(std::get<0>(std::forward<_Tuple>(__p))), + second(std::get<1>(std::forward<_Tuple>(__p))) {} template::template __enable_implicit<_Tuple>() >::type* = nullptr> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 pair(_Tuple&& __p) - : first(_VSTD::get<0>(_VSTD::forward<_Tuple>(__p))), - second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {} + : first(std::get<0>(std::forward<_Tuple>(__p))), + second(std::get<1>(std::forward<_Tuple>(__p))) {} template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 @@ -279,8 +279,8 @@ _NOEXCEPT_(is_nothrow_move_assignable::value && is_nothrow_move_assignable::value) { - first = _VSTD::forward(__p.first); - second = _VSTD::forward(__p.second); + first = std::forward(__p.first); + second = std::forward(__p.second); return *this; } @@ -289,8 +289,8 @@ >::type* = nullptr> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 pair& operator=(_Tuple&& __p) { - first = _VSTD::get<0>(_VSTD::forward<_Tuple>(__p)); - second = _VSTD::get<1>(_VSTD::forward<_Tuple>(__p)); + first = std::get<0>(std::forward<_Tuple>(__p)); + second = std::get<1>(std::forward<_Tuple>(__p)); return *this; } #endif @@ -300,7 +300,7 @@ swap(pair& __p) _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value) { - using _VSTD::swap; + using std::swap; swap(first, __p.first); swap(second, __p.second); } @@ -339,10 +339,10 @@ __synth_three_way_result<_T2> > operator<=>(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y) { - if (auto __c = _VSTD::__synth_three_way(__x.first, __y.first); __c != 0) { + if (auto __c = std::__synth_three_way(__x.first, __y.first); __c != 0) { return __c; } - return _VSTD::__synth_three_way(__x.second, __y.second); + return std::__synth_three_way(__x.second, __y.second); } #else // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) @@ -412,7 +412,7 @@ make_pair(_T1&& __t1, _T2&& __t2) { return pair::type, typename __unwrap_ref_decay<_T2>::type> - (_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2)); + (std::forward<_T1>(__t1), std::forward<_T2>(__t2)); } #else // _LIBCPP_CXX03_LANG @@ -471,13 +471,13 @@ static _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _T1&& - get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T1>(__p.first);} + get(pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward<_T1>(__p.first);} template static _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _T1&& - get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward(__p.first);} + get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward(__p.first);} #endif // _LIBCPP_CXX03_LANG }; @@ -501,13 +501,13 @@ static _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 _T2&& - get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T2>(__p.second);} + get(pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward<_T2>(__p.second);} template static _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _T2&& - get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward(__p.second);} + get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return std::forward(__p.second);} #endif // _LIBCPP_CXX03_LANG }; @@ -533,7 +533,7 @@ typename tuple_element<_Ip, pair<_T1, _T2> >::type&& get(pair<_T1, _T2>&& __p) _NOEXCEPT { - return __get_pair<_Ip>::get(_VSTD::move(__p)); + return __get_pair<_Ip>::get(std::move(__p)); } template @@ -541,7 +541,7 @@ const typename tuple_element<_Ip, pair<_T1, _T2> >::type&& get(const pair<_T1, _T2>&& __p) _NOEXCEPT { - return __get_pair<_Ip>::get(_VSTD::move(__p)); + return __get_pair<_Ip>::get(std::move(__p)); } #endif // _LIBCPP_CXX03_LANG @@ -564,14 +564,14 @@ inline _LIBCPP_INLINE_VISIBILITY constexpr _T1 && get(pair<_T1, _T2>&& __p) _NOEXCEPT { - return __get_pair<0>::get(_VSTD::move(__p)); + return __get_pair<0>::get(std::move(__p)); } template inline _LIBCPP_INLINE_VISIBILITY constexpr _T1 const && get(pair<_T1, _T2> const&& __p) _NOEXCEPT { - return __get_pair<0>::get(_VSTD::move(__p)); + return __get_pair<0>::get(std::move(__p)); } template @@ -592,14 +592,14 @@ inline _LIBCPP_INLINE_VISIBILITY constexpr _T1 && get(pair<_T2, _T1>&& __p) _NOEXCEPT { - return __get_pair<1>::get(_VSTD::move(__p)); + return __get_pair<1>::get(std::move(__p)); } template inline _LIBCPP_INLINE_VISIBILITY constexpr _T1 const && get(pair<_T2, _T1> const&& __p) _NOEXCEPT { - return __get_pair<1>::get(_VSTD::move(__p)); + return __get_pair<1>::get(std::move(__p)); } #endif diff --git a/libcxx/include/__utility/swap.h b/libcxx/include/__utility/swap.h --- a/libcxx/include/__utility/swap.h +++ b/libcxx/include/__utility/swap.h @@ -32,9 +32,9 @@ template inline _LIBCPP_INLINE_VISIBILITY __swap_result_t<_Tp> _LIBCPP_CONSTEXPR_AFTER_CXX17 swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value) { - _Tp __t(_VSTD::move(__x)); - __x = _VSTD::move(__y); - __y = _VSTD::move(__t); + _Tp __t(std::move(__x)); + __x = std::move(__y); + __y = std::move(__t); } template diff --git a/libcxx/include/__utility/to_underlying.h b/libcxx/include/__utility/to_underlying.h --- a/libcxx/include/__utility/to_underlying.h +++ b/libcxx/include/__utility/to_underlying.h @@ -31,7 +31,7 @@ template _LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY constexpr underlying_type_t<_Tp> to_underlying(_Tp __val) noexcept { - return _VSTD::__to_underlying(__val); + return std::__to_underlying(__val); } #endif diff --git a/libcxx/include/__utility/transaction.h b/libcxx/include/__utility/transaction.h --- a/libcxx/include/__utility/transaction.h +++ b/libcxx/include/__utility/transaction.h @@ -53,14 +53,14 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit __transaction(_Rollback __rollback) - : __rollback_(_VSTD::move(__rollback)) + : __rollback_(std::move(__rollback)) , __completed_(false) { } _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __transaction(__transaction&& __other) _NOEXCEPT_(is_nothrow_move_constructible<_Rollback>::value) - : __rollback_(_VSTD::move(__other.__rollback_)) + : __rollback_(std::move(__other.__rollback_)) , __completed_(__other.__completed_) { __other.__completed_ = true; diff --git a/libcxx/include/any b/libcxx/include/any --- a/libcxx/include/any +++ b/libcxx/include/any @@ -112,7 +112,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_any_cast(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -241,7 +241,7 @@ _LIBCPP_INLINE_VISIBILITY any & operator=(any && __rhs) _NOEXCEPT { - any(_VSTD::move(__rhs)).swap(*this); + any(std::move(__rhs)).swap(*this); return *this; } @@ -373,7 +373,7 @@ typedef allocator_traits<_Alloc> _ATraits; _Alloc __a; _Tp * __ret = static_cast<_Tp*>(static_cast(&__dest.__s.__buf)); - _ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...); + _ATraits::construct(__a, __ret, std::forward<_Args>(__args)...); __dest.__h = &_SmallHandler::__handle; return *__ret; } @@ -397,7 +397,7 @@ _LIBCPP_INLINE_VISIBILITY static void __move(any & __this, any & __dest) { - _SmallHandler::__create(__dest, _VSTD::move( + _SmallHandler::__create(__dest, std::move( *static_cast<_Tp*>(static_cast(&__this.__s.__buf)))); __destroy(__this); } @@ -458,7 +458,7 @@ _Alloc __a; unique_ptr<_Tp, _Dp> __hold(_ATraits::allocate(__a, 1), _Dp(__a, 1)); _Tp * __ret = __hold.get(); - _ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...); + _ATraits::construct(__a, __ret, std::forward<_Args>(__args)...); __dest.__s.__ptr = __hold.release(); __dest.__h = &_LargeHandler::__handle; return *__ret; @@ -516,24 +516,24 @@ template any::any(_ValueType && __v) : __h(nullptr) { - __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_ValueType>(__v)); + __any_imp::_Handler<_Tp>::__create(*this, std::forward<_ValueType>(__v)); } template any::any(in_place_type_t<_ValueType>, _Args&&... __args) { - __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...); + __any_imp::_Handler<_Tp>::__create(*this, std::forward<_Args>(__args)...); } template any::any(in_place_type_t<_ValueType>, initializer_list<_Up> __il, _Args&&... __args) { - __any_imp::_Handler<_Tp>::__create(*this, __il, _VSTD::forward<_Args>(__args)...); + __any_imp::_Handler<_Tp>::__create(*this, __il, std::forward<_Args>(__args)...); } template inline _LIBCPP_INLINE_VISIBILITY any & any::operator=(_ValueType && __v) { - any(_VSTD::forward<_ValueType>(__v)).swap(*this); + any(std::forward<_ValueType>(__v)).swap(*this); return *this; } @@ -541,14 +541,14 @@ inline _LIBCPP_INLINE_VISIBILITY _Tp& any::emplace(_Args&&... __args) { reset(); - return __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...); + return __any_imp::_Handler<_Tp>::__create(*this, std::forward<_Args>(__args)...); } template inline _LIBCPP_INLINE_VISIBILITY _Tp& any::emplace(initializer_list<_Up> __il, _Args&&... __args) { reset(); - return __any_imp::_Handler<_Tp>::__create(*this, __il, _VSTD::forward<_Args>(__args)...); + return __any_imp::_Handler<_Tp>::__create(*this, __il, std::forward<_Args>(__args)...); } inline _LIBCPP_INLINE_VISIBILITY @@ -581,13 +581,13 @@ template inline _LIBCPP_INLINE_VISIBILITY any make_any(_Args&&... __args) { - return any(in_place_type<_Tp>, _VSTD::forward<_Args>(__args)...); + return any(in_place_type<_Tp>, std::forward<_Args>(__args)...); } template inline _LIBCPP_INLINE_VISIBILITY any make_any(initializer_list<_Up> __il, _Args&&... __args) { - return any(in_place_type<_Tp>, __il, _VSTD::forward<_Args>(__args)...); + return any(in_place_type<_Tp>, __il, std::forward<_Args>(__args)...); } template @@ -599,7 +599,7 @@ static_assert(is_constructible<_ValueType, _RawValueType const &>::value, "ValueType is required to be a const lvalue reference " "or a CopyConstructible type"); - auto __tmp = _VSTD::any_cast>(&__v); + auto __tmp = std::any_cast>(&__v); if (__tmp == nullptr) __throw_bad_any_cast(); return static_cast<_ValueType>(*__tmp); @@ -614,7 +614,7 @@ static_assert(is_constructible<_ValueType, _RawValueType &>::value, "ValueType is required to be an lvalue reference " "or a CopyConstructible type"); - auto __tmp = _VSTD::any_cast<_RawValueType>(&__v); + auto __tmp = std::any_cast<_RawValueType>(&__v); if (__tmp == nullptr) __throw_bad_any_cast(); return static_cast<_ValueType>(*__tmp); @@ -629,10 +629,10 @@ static_assert(is_constructible<_ValueType, _RawValueType>::value, "ValueType is required to be an rvalue reference " "or a CopyConstructible type"); - auto __tmp = _VSTD::any_cast<_RawValueType>(&__v); + auto __tmp = std::any_cast<_RawValueType>(&__v); if (__tmp == nullptr) __throw_bad_any_cast(); - return static_cast<_ValueType>(_VSTD::move(*__tmp)); + return static_cast<_ValueType>(std::move(*__tmp)); } template @@ -642,7 +642,7 @@ { static_assert(!is_reference<_ValueType>::value, "_ValueType may not be a reference."); - return _VSTD::any_cast<_ValueType>(const_cast(__any)); + return std::any_cast<_ValueType>(const_cast(__any)); } template @@ -673,7 +673,7 @@ nullptr, #endif __any_imp::__get_fallback_typeid<_ValueType>()); - return _VSTD::__pointer_or_func_cast<_ReturnType>( + return std::__pointer_or_func_cast<_ReturnType>( __p, is_function<_ValueType>{}); } return nullptr; diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -139,20 +139,20 @@ typedef const value_type* const_pointer; typedef size_t size_type; typedef ptrdiff_t difference_type; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; _Tp __elems_[_Size]; // No explicit construct/copy/destroy for aggregate type _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void fill(const value_type& __u) { - _VSTD::fill_n(data(), _Size, __u); + std::fill_n(data(), _Size, __u); } _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) { - _VSTD::swap_ranges(data(), data() + _Size, __a.data()); + std::swap_ranges(data(), data() + _Size, __a.data()); } // iterators: @@ -242,8 +242,8 @@ typedef const value_type* const_pointer; typedef size_t size_type; typedef ptrdiff_t difference_type; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; typedef typename conditional::value, const char, char>::type _CharType; @@ -369,7 +369,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 bool operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) { - return _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return std::equal(__x.begin(), __x.end(), __y.begin()); } template @@ -385,7 +385,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 bool operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } @@ -462,7 +462,7 @@ get(array<_Tp, _Size>&& __a) _NOEXCEPT { static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array &&)"); - return _VSTD::move(__a.__elems_[_Ip]); + return std::move(__a.__elems_[_Ip]); } template @@ -471,7 +471,7 @@ 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]); + return std::move(__a.__elems_[_Ip]); } #if _LIBCPP_STD_VER > 17 @@ -485,7 +485,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr array, _Size> __to_array_rvalue_impl(_Tp(&&__arr)[_Size], index_sequence<_Index...>) { - return {{_VSTD::move(__arr[_Index])...}}; + return {{std::move(__arr[_Index])...}}; } template @@ -497,7 +497,7 @@ static_assert( is_constructible_v<_Tp, _Tp&>, "[array.creation]/1: to_array requires copy constructible elements."); - return _VSTD::__to_array_lvalue_impl(__arr, make_index_sequence<_Size>()); + return std::__to_array_lvalue_impl(__arr, make_index_sequence<_Size>()); } template @@ -509,7 +509,7 @@ static_assert( is_move_constructible_v<_Tp>, "[array.creation]/4: to_array requires move constructible elements."); - return _VSTD::__to_array_rvalue_impl(_VSTD::move(__arr), + return std::__to_array_rvalue_impl(std::move(__arr), make_index_sequence<_Size>()); } diff --git a/libcxx/include/atomic b/libcxx/include/atomic --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -608,7 +608,7 @@ template _LIBCPP_INLINE_VISIBILITY bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp const& __rhs) { - return _VSTD::memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0; + return std::memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0; } static_assert((is_same::type, __memory_order_underlying_t>::value), @@ -1215,7 +1215,7 @@ _Tp __temp; __a->__lock(); __cxx_atomic_assign_volatile(__temp, __a->__a_value); - bool __ret = (_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0); + bool __ret = (std::memcmp(&__temp, __expected, sizeof(_Tp)) == 0); if(__ret) __cxx_atomic_assign_volatile(__a->__a_value, __value); else @@ -1228,11 +1228,11 @@ bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_lock_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order, memory_order) { __a->__lock(); - bool __ret = (_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0); + bool __ret = (std::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0); if(__ret) - _VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp)); + std::memcpy(&__a->__a_value, &__value, sizeof(_Tp)); else - _VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp)); + std::memcpy(__expected, &__a->__a_value, sizeof(_Tp)); __a->__unlock(); return __ret; } @@ -1244,7 +1244,7 @@ _Tp __temp; __a->__lock(); __cxx_atomic_assign_volatile(__temp, __a->__a_value); - bool __ret = (_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0); + bool __ret = (std::memcmp(&__temp, __expected, sizeof(_Tp)) == 0); if(__ret) __cxx_atomic_assign_volatile(__a->__a_value, __value); else @@ -1257,11 +1257,11 @@ bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_lock_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order, memory_order) { __a->__lock(); - bool __ret = (_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0); + bool __ret = (std::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0); if(__ret) - _VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp)); + std::memcpy(&__a->__a_value, &__value, sizeof(_Tp)); else - _VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp)); + std::memcpy(__expected, &__a->__a_value, sizeof(_Tp)); __a->__unlock(); return __ret; } diff --git a/libcxx/include/barrier b/libcxx/include/barrier --- a/libcxx/include/barrier +++ b/libcxx/include/barrier @@ -293,7 +293,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY barrier(ptrdiff_t __count, _CompletionF __completion = _CompletionF()) - : __b(__count, _VSTD::move(__completion)) { + : __b(__count, std::move(__completion)) { } barrier(barrier const&) = delete; @@ -307,7 +307,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void wait(arrival_token&& __phase) const { - __b.wait(_VSTD::move(__phase)); + __b.wait(std::move(__phase)); } _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void arrive_and_wait() diff --git a/libcxx/include/bitset b/libcxx/include/bitset --- a/libcxx/include/bitset +++ b/libcxx/include/bitset @@ -224,7 +224,7 @@ #endif { #ifdef _LIBCPP_CXX03_LANG - _VSTD::fill_n(__first_, _N_words, __storage_type(0)); + std::fill_n(__first_, _N_words, __storage_type(0)); #endif } @@ -242,8 +242,8 @@ else __t[__i] = static_cast<__storage_type>(__v); - _VSTD::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_); - _VSTD::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]), + std::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_); + std::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0)); } @@ -256,7 +256,7 @@ if (_Size < __bits_per_word) __first_[0] &= ( 1ULL << _Size ) - 1; - _VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0)); + std::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0)); } #endif // _LIBCPP_CXX03_LANG @@ -333,7 +333,7 @@ __bitset<_N_words, _Size>::to_ulong(false_type) const { const_iterator __e = __make_iter(_Size); - const_iterator __i = _VSTD::find(__make_iter(sizeof(unsigned long) * CHAR_BIT), __e, true); + const_iterator __i = std::find(__make_iter(sizeof(unsigned long) * CHAR_BIT), __e, true); if (__i != __e) __throw_overflow_error("bitset to_ulong overflow error"); @@ -353,7 +353,7 @@ __bitset<_N_words, _Size>::to_ullong(false_type) const { const_iterator __e = __make_iter(_Size); - const_iterator __i = _VSTD::find(__make_iter(sizeof(unsigned long long) * CHAR_BIT), __e, true); + const_iterator __i = std::find(__make_iter(sizeof(unsigned long long) * CHAR_BIT), __e, true); if (__i != __e) __throw_overflow_error("bitset to_ullong overflow error"); @@ -766,19 +766,19 @@ typename basic_string<_CharT>::size_type __n, _CharT __zero, _CharT __one) { - size_t __rlen = _VSTD::min(__n, char_traits<_CharT>::length(__str)); + size_t __rlen = std::min(__n, char_traits<_CharT>::length(__str)); for (size_t __i = 0; __i < __rlen; ++__i) if (__str[__i] != __zero && __str[__i] != __one) __throw_invalid_argument("bitset string ctor has invalid argument"); - size_t _Mp = _VSTD::min(__rlen, _Size); + size_t _Mp = std::min(__rlen, _Size); size_t __i = 0; for (; __i < _Mp; ++__i) { _CharT __c = __str[_Mp - 1 - __i]; (*this)[__i] = (__c == __one); } - _VSTD::fill(base::__make_iter(__i), base::__make_iter(_Size), false); + std::fill(base::__make_iter(__i), base::__make_iter(_Size), false); } template @@ -791,19 +791,19 @@ if (__pos > __str.size()) __throw_out_of_range("bitset string pos out of range"); - size_t __rlen = _VSTD::min(__n, __str.size() - __pos); + size_t __rlen = std::min(__n, __str.size() - __pos); for (size_t __i = __pos; __i < __pos + __rlen; ++__i) if (!_Traits::eq(__str[__i], __zero) && !_Traits::eq(__str[__i], __one)) __throw_invalid_argument("bitset string ctor has invalid argument"); - size_t _Mp = _VSTD::min(__rlen, _Size); + size_t _Mp = std::min(__rlen, _Size); size_t __i = 0; for (; __i < _Mp; ++__i) { _CharT __c = __str[__pos + _Mp - 1 - __i]; (*this)[__i] = _Traits::eq(__c, __one); } - _VSTD::fill(base::__make_iter(__i), base::__make_iter(_Size), false); + std::fill(base::__make_iter(__i), base::__make_iter(_Size), false); } template @@ -837,9 +837,9 @@ bitset<_Size>& bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT { - __pos = _VSTD::min(__pos, _Size); - _VSTD::copy_backward(base::__make_iter(0), base::__make_iter(_Size - __pos), base::__make_iter(_Size)); - _VSTD::fill_n(base::__make_iter(0), __pos, false); + __pos = std::min(__pos, _Size); + std::copy_backward(base::__make_iter(0), base::__make_iter(_Size - __pos), base::__make_iter(_Size)); + std::fill_n(base::__make_iter(0), __pos, false); return *this; } @@ -847,9 +847,9 @@ bitset<_Size>& bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT { - __pos = _VSTD::min(__pos, _Size); - _VSTD::copy(base::__make_iter(__pos), base::__make_iter(_Size), base::__make_iter(0)); - _VSTD::fill_n(base::__make_iter(_Size - __pos), __pos, false); + __pos = std::min(__pos, _Size); + std::copy(base::__make_iter(__pos), base::__make_iter(_Size), base::__make_iter(0)); + std::fill_n(base::__make_iter(_Size - __pos), __pos, false); return *this; } @@ -858,7 +858,7 @@ bitset<_Size>& bitset<_Size>::set() _NOEXCEPT { - _VSTD::fill_n(base::__make_iter(0), _Size, true); + std::fill_n(base::__make_iter(0), _Size, true); return *this; } @@ -878,7 +878,7 @@ bitset<_Size>& bitset<_Size>::reset() _NOEXCEPT { - _VSTD::fill_n(base::__make_iter(0), _Size, false); + std::fill_n(base::__make_iter(0), _Size, false); return *this; } @@ -985,7 +985,7 @@ size_t bitset<_Size>::count() const _NOEXCEPT { - return static_cast(_VSTD::__count_bool_true(base::__make_iter(0), _Size)); + return static_cast(std::__count_bool_true(base::__make_iter(0), _Size)); } template @@ -993,7 +993,7 @@ bool bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT { - return _VSTD::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0)); + return std::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0)); } template diff --git a/libcxx/include/charconv b/libcxx/include/charconv --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -152,7 +152,7 @@ static _LIBCPP_INLINE_VISIBILITY int __width(_Tp __v) { - auto __t = (64 - _VSTD::__libcpp_clz(static_cast(__v | 1))) * 1233 >> 12; + auto __t = (64 - std::__libcpp_clz(static_cast(__v | 1))) * 1233 >> 12; return __t - (__v < __pow10_64[__t]) + 1; } @@ -173,7 +173,7 @@ static _LIBCPP_INLINE_VISIBILITY int __width(_Tp __v) { - auto __t = (32 - _VSTD::__libcpp_clz(static_cast(__v | 1))) * 1233 >> 12; + auto __t = (32 - std::__libcpp_clz(static_cast(__v | 1))) * 1233 >> 12; return __t - (__v < __pow10_32[__t]) + 1; } @@ -410,7 +410,7 @@ if (__x <= __complement(__to_unsigned_like(__tl::min()))) { __x = __complement(__x); - _VSTD::memcpy(&__value, &__x, sizeof(__x)); + std::memcpy(&__value, &__x, sizeof(__x)); return __r; } } diff --git a/libcxx/include/complex b/libcxx/include/complex --- a/libcxx/include/complex +++ b/libcxx/include/complex @@ -1093,7 +1093,7 @@ pow(const complex<_Tp>& __x, const complex<_Up>& __y) { typedef complex::type> result_type; - return _VSTD::pow(result_type(__x), result_type(__y)); + return std::pow(result_type(__x), result_type(__y)); } template @@ -1106,7 +1106,7 @@ pow(const complex<_Tp>& __x, const _Up& __y) { typedef complex::type> result_type; - return _VSTD::pow(result_type(__x), result_type(__y)); + return std::pow(result_type(__x), result_type(__y)); } template @@ -1119,7 +1119,7 @@ pow(const _Tp& __x, const complex<_Up>& __y) { typedef complex::type> result_type; - return _VSTD::pow(result_type(__x), result_type(__y)); + return std::pow(result_type(__x), result_type(__y)); } // __sqr, computes pow(x, 2) diff --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable --- a/libcxx/include/condition_variable +++ b/libcxx/include/condition_variable @@ -256,7 +256,7 @@ _Predicate __pred) { return wait_until(__lock, chrono::steady_clock::now() + __d, - _VSTD::move(__pred)); + std::move(__pred)); } _LIBCPP_FUNC_VIS diff --git a/libcxx/include/cstdlib b/libcxx/include/cstdlib --- a/libcxx/include/cstdlib +++ b/libcxx/include/cstdlib @@ -91,7 +91,7 @@ #ifdef __GNUC__ #define _LIBCPP_UNREACHABLE() __builtin_unreachable() #else -#define _LIBCPP_UNREACHABLE() _VSTD::abort() +#define _LIBCPP_UNREACHABLE() std::abort() #endif _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -582,7 +582,7 @@ __n = __bs; __m = __f + __n; } - _VSTD::copy(__f, __m, __rb); + std::copy(__f, __m, __rb); __f = __m; __r += __n; } @@ -610,7 +610,7 @@ __bs = __n; __fe = __fb + __bs; } - __r = _VSTD::copy(__fb, __fe, __r); + __r = std::copy(__fb, __fe, __r); __n -= __bs; __f += __bs; } @@ -638,7 +638,7 @@ __bs = __n; __fe = __fb + __bs; } - __r = _VSTD::copy(__fb, __fe, __r); + __r = std::copy(__fb, __fe, __r); __n -= __bs; __f += __bs; } @@ -659,7 +659,7 @@ typedef typename __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>::pointer pointer; while (__f != __l) { - __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __rp = _VSTD::prev(__r); + __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __rp = std::prev(__r); pointer __rb = *__rp.__m_iter_; pointer __re = __rp.__ptr_ + 1; difference_type __bs = __re - __rb; @@ -670,7 +670,7 @@ __n = __bs; __m = __l - __n; } - _VSTD::copy_backward(__m, __l, __re); + std::copy_backward(__m, __l, __re); __l = __m; __r -= __n; } @@ -698,7 +698,7 @@ __bs = __n; __lb = __le - __bs; } - __r = _VSTD::copy_backward(__lb, __le, __r); + __r = std::copy_backward(__lb, __le, __r); __n -= __bs; __l -= __bs - 1; } @@ -726,7 +726,7 @@ __bs = __n; __lb = __le - __bs; } - __r = _VSTD::copy_backward(__lb, __le, __r); + __r = std::copy_backward(__lb, __le, __r); __n -= __bs; __l -= __bs - 1; } @@ -758,7 +758,7 @@ __n = __bs; __m = __f + __n; } - _VSTD::move(__f, __m, __rb); + std::move(__f, __m, __rb); __f = __m; __r += __n; } @@ -786,7 +786,7 @@ __bs = __n; __fe = __fb + __bs; } - __r = _VSTD::move(__fb, __fe, __r); + __r = std::move(__fb, __fe, __r); __n -= __bs; __f += __bs; } @@ -814,7 +814,7 @@ __bs = __n; __fe = __fb + __bs; } - __r = _VSTD::move(__fb, __fe, __r); + __r = std::move(__fb, __fe, __r); __n -= __bs; __f += __bs; } @@ -835,7 +835,7 @@ typedef typename __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>::pointer pointer; while (__f != __l) { - __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __rp = _VSTD::prev(__r); + __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __rp = std::prev(__r); pointer __rb = *__rp.__m_iter_; pointer __re = __rp.__ptr_ + 1; difference_type __bs = __re - __rb; @@ -846,7 +846,7 @@ __n = __bs; __m = __l - __n; } - _VSTD::move_backward(__m, __l, __re); + std::move_backward(__m, __l, __re); __l = __m; __r -= __n; } @@ -874,7 +874,7 @@ __bs = __n; __lb = __le - __bs; } - __r = _VSTD::move_backward(__lb, __le, __r); + __r = std::move_backward(__lb, __le, __r); __n -= __bs; __l -= __bs - 1; } @@ -902,7 +902,7 @@ __bs = __n; __lb = __le - __bs; } - __r = _VSTD::move_backward(__lb, __le, __r); + __r = std::move_backward(__lb, __le, __r); __n -= __bs; __l -= __bs - 1; } @@ -1056,7 +1056,7 @@ _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable::value) { - __map_ = _VSTD::move(__c.__map_); + __map_ = std::move(__c.__map_); __start_ = __c.__start_; size() = __c.size(); __move_assign_alloc(__c); @@ -1075,7 +1075,7 @@ void __move_assign_alloc(__deque_base& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { - __alloc() = _VSTD::move(__c.__alloc()); + __alloc() = std::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY @@ -1177,9 +1177,9 @@ template __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c) _NOEXCEPT_(is_nothrow_move_constructible::value) - : __map_(_VSTD::move(__c.__map_)), - __start_(_VSTD::move(__c.__start_)), - __size_(_VSTD::move(__c.__size_)) + : __map_(std::move(__c.__map_)), + __start_(std::move(__c.__start_)), + __size_(std::move(__c.__size_)) { __c.__start_ = 0; __c.size() = 0; @@ -1187,9 +1187,9 @@ template __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_type& __a) - : __map_(_VSTD::move(__c.__map_), __pointer_allocator(__a)), - __start_(_VSTD::move(__c.__start_)), - __size_(_VSTD::move(__c.size()), __a) + : __map_(std::move(__c.__map_), __pointer_allocator(__a)), + __start_(std::move(__c.__start_)), + __size_(std::move(__c.size()), __a) { if (__a == __c.__alloc()) { @@ -1217,9 +1217,9 @@ #endif { __map_.swap(__c.__map_); - _VSTD::swap(__start_, __c.__start_); - _VSTD::swap(size(), __c.size()); - _VSTD::__swap_allocator(__alloc(), __c.__alloc()); + std::swap(__start_, __c.__start_); + std::swap(size(), __c.size()); + std::__swap_allocator(__alloc(), __c.__alloc()); } template @@ -1228,7 +1228,7 @@ { allocator_type& __a = __alloc(); for (iterator __i = begin(), __e = end(); __i != __e; ++__i) - __alloc_traits::destroy(__a, _VSTD::addressof(*__i)); + __alloc_traits::destroy(__a, std::addressof(*__i)); size() = 0; while (__map_.size() > 2) { @@ -1271,8 +1271,8 @@ typedef typename __base::pointer pointer; typedef typename __base::const_pointer const_pointer; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; using typename __base::__deque_range; using typename __base::__deque_block_range; @@ -1382,7 +1382,7 @@ size_type size() const _NOEXCEPT {return __base::size();} _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT - {return _VSTD::min( + {return std::min( __alloc_traits::max_size(__base::__alloc()), numeric_limits::max());} void resize(size_type __n); @@ -1650,7 +1650,7 @@ deque<_Tp, _Allocator>& deque<_Tp, _Allocator>::operator=(const deque& __c) { - if (this != _VSTD::addressof(__c)) + if (this != std::addressof(__c)) { __copy_assign_alloc(__c); assign(__c.begin(), __c.end()); @@ -1677,14 +1677,14 @@ inline deque<_Tp, _Allocator>::deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value) - : __base(_VSTD::move(__c)) + : __base(std::move(__c)) { } template inline deque<_Tp, _Allocator>::deque(deque&& __c, const __identity_t& __a) - : __base(_VSTD::move(__c), __a) + : __base(std::move(__c), __a) { if (__a != __c.__alloc()) { @@ -1756,11 +1756,11 @@ if (static_cast(__l - __f) > __base::size()) { _RAIter __m = __f + __base::size(); - _VSTD::copy(__f, __m, __base::begin()); + std::copy(__f, __m, __base::begin()); __append(__m, __l); } else - __erase_to_end(_VSTD::copy(__f, __l, __base::begin())); + __erase_to_end(std::copy(__f, __l, __base::begin())); } template @@ -1769,12 +1769,12 @@ { if (__n > __base::size()) { - _VSTD::fill_n(__base::begin(), __base::size(), __v); + std::fill_n(__base::begin(), __base::size(), __v); __n -= __base::size(); __append(__n, __v); } else - __erase_to_end(_VSTD::fill_n(__base::begin(), __n, __v)); + __erase_to_end(std::fill_n(__base::begin(), __n, __v)); } template @@ -1851,7 +1851,7 @@ deque<_Tp, _Allocator>::at(size_type __i) { if (__i >= __base::size()) - _VSTD::__throw_out_of_range("deque"); + std::__throw_out_of_range("deque"); size_type __p = __base::__start_ + __i; return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size); } @@ -1862,7 +1862,7 @@ deque<_Tp, _Allocator>::at(size_type __i) const { if (__i >= __base::size()) - _VSTD::__throw_out_of_range("deque"); + std::__throw_out_of_range("deque"); size_type __p = __base::__start_ + __i; return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size); } @@ -1911,7 +1911,7 @@ if (__back_spare() == 0) __add_back_capacity(); // __back_spare() >= 1 - __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v); + __alloc_traits::construct(__a, std::addressof(*__base::end()), __v); ++__base::size(); } @@ -1923,7 +1923,7 @@ if (__front_spare() == 0) __add_front_capacity(); // __front_spare() >= 1 - __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v); + __alloc_traits::construct(__a, std::addressof(*--__base::begin()), __v); --__base::__start_; ++__base::size(); } @@ -1937,7 +1937,7 @@ if (__back_spare() == 0) __add_back_capacity(); // __back_spare() >= 1 - __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::move(__v)); + __alloc_traits::construct(__a, std::addressof(*__base::end()), std::move(__v)); ++__base::size(); } @@ -1954,8 +1954,8 @@ if (__back_spare() == 0) __add_back_capacity(); // __back_spare() >= 1 - __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), - _VSTD::forward<_Args>(__args)...); + __alloc_traits::construct(__a, std::addressof(*__base::end()), + std::forward<_Args>(__args)...); ++__base::size(); #if _LIBCPP_STD_VER > 14 return *--__base::end(); @@ -1970,7 +1970,7 @@ if (__front_spare() == 0) __add_front_capacity(); // __front_spare() >= 1 - __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::move(__v)); + __alloc_traits::construct(__a, std::addressof(*--__base::begin()), std::move(__v)); --__base::__start_; ++__base::size(); } @@ -1989,7 +1989,7 @@ if (__front_spare() == 0) __add_front_capacity(); // __front_spare() >= 1 - __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...); + __alloc_traits::construct(__a, std::addressof(*--__base::begin()), std::forward<_Args>(__args)...); --__base::__start_; ++__base::size(); #if _LIBCPP_STD_VER > 14 @@ -2011,20 +2011,20 @@ // __front_spare() >= 1 if (__pos == 0) { - __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::move(__v)); + __alloc_traits::construct(__a, std::addressof(*--__base::begin()), std::move(__v)); --__base::__start_; ++__base::size(); } else { iterator __b = __base::begin(); - iterator __bm1 = _VSTD::prev(__b); - __alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b)); + iterator __bm1 = std::prev(__b); + __alloc_traits::construct(__a, std::addressof(*__bm1), std::move(*__b)); --__base::__start_; ++__base::size(); if (__pos > 1) - __b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b); - *__b = _VSTD::move(__v); + __b = std::move(std::next(__b), __b + __pos, __b); + *__b = std::move(__v); } } else @@ -2035,18 +2035,18 @@ size_type __de = __base::size() - __pos; if (__de == 0) { - __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::move(__v)); + __alloc_traits::construct(__a, std::addressof(*__base::end()), std::move(__v)); ++__base::size(); } else { iterator __e = __base::end(); - iterator __em1 = _VSTD::prev(__e); - __alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1)); + iterator __em1 = std::prev(__e); + __alloc_traits::construct(__a, std::addressof(*__e), std::move(*__em1)); ++__base::size(); if (__de > 1) - __e = _VSTD::move_backward(__e - __de, __em1, __e); - *--__e = _VSTD::move(__v); + __e = std::move_backward(__e - __de, __em1, __e); + *--__e = std::move(__v); } } return __base::begin() + __pos; @@ -2067,21 +2067,21 @@ // __front_spare() >= 1 if (__pos == 0) { - __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...); + __alloc_traits::construct(__a, std::addressof(*--__base::begin()), std::forward<_Args>(__args)...); --__base::__start_; ++__base::size(); } else { - __temp_value __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...); + __temp_value __tmp(this->__alloc(), std::forward<_Args>(__args)...); iterator __b = __base::begin(); - iterator __bm1 = _VSTD::prev(__b); - __alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b)); + iterator __bm1 = std::prev(__b); + __alloc_traits::construct(__a, std::addressof(*__bm1), std::move(*__b)); --__base::__start_; ++__base::size(); if (__pos > 1) - __b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b); - *__b = _VSTD::move(__tmp.get()); + __b = std::move(std::next(__b), __b + __pos, __b); + *__b = std::move(__tmp.get()); } } else @@ -2092,19 +2092,19 @@ size_type __de = __base::size() - __pos; if (__de == 0) { - __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::forward<_Args>(__args)...); + __alloc_traits::construct(__a, std::addressof(*__base::end()), std::forward<_Args>(__args)...); ++__base::size(); } else { - __temp_value __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...); + __temp_value __tmp(this->__alloc(), std::forward<_Args>(__args)...); iterator __e = __base::end(); - iterator __em1 = _VSTD::prev(__e); - __alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1)); + iterator __em1 = std::prev(__e); + __alloc_traits::construct(__a, std::addressof(*__e), std::move(*__em1)); ++__base::size(); if (__de > 1) - __e = _VSTD::move_backward(__e - __de, __em1, __e); - *--__e = _VSTD::move(__tmp.get()); + __e = std::move_backward(__e - __de, __em1, __e); + *--__e = std::move(__tmp.get()); } } return __base::begin() + __pos; @@ -2127,7 +2127,7 @@ // __front_spare() >= 1 if (__pos == 0) { - __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v); + __alloc_traits::construct(__a, std::addressof(*--__base::begin()), __v); --__base::__start_; ++__base::size(); } @@ -2135,14 +2135,14 @@ { const_pointer __vt = pointer_traits::pointer_to(__v); iterator __b = __base::begin(); - iterator __bm1 = _VSTD::prev(__b); + iterator __bm1 = std::prev(__b); if (__vt == pointer_traits::pointer_to(*__b)) __vt = pointer_traits::pointer_to(*__bm1); - __alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b)); + __alloc_traits::construct(__a, std::addressof(*__bm1), std::move(*__b)); --__base::__start_; ++__base::size(); if (__pos > 1) - __b = __move_and_check(_VSTD::next(__b), __b + __pos, __b, __vt); + __b = __move_and_check(std::next(__b), __b + __pos, __b, __vt); *__b = *__vt; } } @@ -2154,17 +2154,17 @@ size_type __de = __base::size() - __pos; if (__de == 0) { - __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v); + __alloc_traits::construct(__a, std::addressof(*__base::end()), __v); ++__base::size(); } else { const_pointer __vt = pointer_traits::pointer_to(__v); iterator __e = __base::end(); - iterator __em1 = _VSTD::prev(__e); + iterator __em1 = std::prev(__e); if (__vt == pointer_traits::pointer_to(*__em1)) __vt = pointer_traits::pointer_to(*__e); - __alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1)); + __alloc_traits::construct(__a, std::addressof(*__e), std::move(*__em1)); ++__base::size(); if (__de > 1) __e = __move_backward_and_check(__e - __de, __em1, __e, __vt); @@ -2191,7 +2191,7 @@ if (__n > __pos) { for (size_type __m = __n - __pos; __m; --__m, --__base::__start_, ++__base::size()) - __alloc_traits::construct(__a, _VSTD::addressof(*--__i), __v); + __alloc_traits::construct(__a, std::addressof(*--__i), __v); __n = __pos; } if (__n > 0) @@ -2201,7 +2201,7 @@ __move_construct_backward_and_check(__old_begin, __obn, __i, __vt); if (__n < __pos) __old_begin = __move_and_check(__obn, __old_begin + __pos, __old_begin, __vt); - _VSTD::fill_n(__old_begin, __n, *__vt); + std::fill_n(__old_begin, __n, *__vt); } } else @@ -2216,7 +2216,7 @@ if (__n > __de) { for (size_type __m = __n - __de; __m; --__m, (void) ++__i, ++__base::size()) - __alloc_traits::construct(__a, _VSTD::addressof(*__i), __v); + __alloc_traits::construct(__a, std::addressof(*__i), __v); __n = __de; } if (__n > 0) @@ -2226,7 +2226,7 @@ __move_construct_and_check(__oen, __old_end, __i, __vt); if (__n < __de) __old_end = __move_backward_and_check(__old_end - __de, __oen, __old_end, __vt); - _VSTD::fill_n(__old_end - __n, __n, *__vt); + std::fill_n(__old_end - __n, __n, *__vt); } } return __base::begin() + __pos; @@ -2252,7 +2252,7 @@ typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&!__is_cpp17_bidirectional_iterator<_ForwardIterator>::value>::type*) { - size_type __n = _VSTD::distance(__f, __l); + size_type __n = std::distance(__f, __l); __split_buffer __buf(__n, 0, __base::__alloc()); __buf.__construct_at_end(__f, __l); typedef typename __split_buffer::iterator __fwd; @@ -2265,7 +2265,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l, typename enable_if<__is_cpp17_bidirectional_iterator<_BiIter>::value>::type*) { - size_type __n = _VSTD::distance(__f, __l); + size_type __n = std::distance(__f, __l); size_type __pos = __p - __base::begin(); size_type __to_end = __base::size() - __pos; allocator_type& __a = __base::__alloc(); @@ -2279,9 +2279,9 @@ _BiIter __m = __f; if (__n > __pos) { - __m = __pos < __n / 2 ? _VSTD::prev(__l, __pos) : _VSTD::next(__f, __n - __pos); + __m = __pos < __n / 2 ? std::prev(__l, __pos) : std::next(__f, __n - __pos); for (_BiIter __j = __m; __j != __f; --__base::__start_, ++__base::size()) - __alloc_traits::construct(__a, _VSTD::addressof(*--__i), *--__j); + __alloc_traits::construct(__a, std::addressof(*--__i), *--__j); __n = __pos; } if (__n > 0) @@ -2289,13 +2289,13 @@ iterator __obn = __old_begin + __n; for (iterator __j = __obn; __j != __old_begin;) { - __alloc_traits::construct(__a, _VSTD::addressof(*--__i), _VSTD::move(*--__j)); + __alloc_traits::construct(__a, std::addressof(*--__i), std::move(*--__j)); --__base::__start_; ++__base::size(); } if (__n < __pos) - __old_begin = _VSTD::move(__obn, __old_begin + __pos, __old_begin); - _VSTD::copy(__m, __l, __old_begin); + __old_begin = std::move(__obn, __old_begin + __pos, __old_begin); + std::copy(__m, __l, __old_begin); } } else @@ -2310,19 +2310,19 @@ size_type __de = __base::size() - __pos; if (__n > __de) { - __m = __de < __n / 2 ? _VSTD::next(__f, __de) : _VSTD::prev(__l, __n - __de); + __m = __de < __n / 2 ? std::next(__f, __de) : std::prev(__l, __n - __de); for (_BiIter __j = __m; __j != __l; ++__i, (void) ++__j, ++__base::size()) - __alloc_traits::construct(__a, _VSTD::addressof(*__i), *__j); + __alloc_traits::construct(__a, std::addressof(*__i), *__j); __n = __de; } if (__n > 0) { iterator __oen = __old_end - __n; for (iterator __j = __oen; __j != __old_end; ++__i, (void) ++__j, ++__base::size()) - __alloc_traits::construct(__a, _VSTD::addressof(*__i), _VSTD::move(*__j)); + __alloc_traits::construct(__a, std::addressof(*__i), std::move(*__j)); if (__n < __de) - __old_end = _VSTD::move_backward(__old_end - __de, __oen, __old_end); - _VSTD::copy_backward(__f, __m, __old_end); + __old_end = std::move_backward(__old_end - __de, __oen, __old_end); + std::copy_backward(__f, __m, __old_end); } } return __base::begin() + __pos; @@ -2349,7 +2349,7 @@ deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l, typename enable_if<__is_cpp17_forward_iterator<_ForIter>::value>::type*) { - size_type __n = _VSTD::distance(__f, __l); + size_type __n = std::distance(__f, __l); allocator_type& __a = __base::__alloc(); size_type __back_capacity = __back_spare(); if (__n > __back_capacity) @@ -2358,7 +2358,7 @@ for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) { _ConstructTransaction __tx(this, __br); for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void)++__f) { - __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), *__f); + __alloc_traits::construct(__a, std::__to_address(__tx.__pos_), *__f); } } } @@ -2375,7 +2375,7 @@ for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) { _ConstructTransaction __tx(this, __br); for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) { - __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_)); + __alloc_traits::construct(__a, std::__to_address(__tx.__pos_)); } } } @@ -2392,7 +2392,7 @@ for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) { _ConstructTransaction __tx(this, __br); for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) { - __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), __v); + __alloc_traits::construct(__a, std::__to_address(__tx.__pos_), __v); } } @@ -2448,10 +2448,10 @@ for (typename __base::__map_pointer __i = __base::__map_.begin(); __i != __base::__map_.end(); ++__i) __buf.push_back(*__i); - _VSTD::swap(__base::__map_.__first_, __buf.__first_); - _VSTD::swap(__base::__map_.__begin_, __buf.__begin_); - _VSTD::swap(__base::__map_.__end_, __buf.__end_); - _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap()); + std::swap(__base::__map_.__first_, __buf.__first_); + std::swap(__base::__map_.__begin_, __buf.__begin_); + std::swap(__base::__map_.__end_, __buf.__end_); + std::swap(__base::__map_.__end_cap(), __buf.__end_cap()); __base::__start_ = __base::__map_.size() == 1 ? __base::__block_size / 2 : __base::__start_ + __base::__block_size; @@ -2468,7 +2468,7 @@ size_type __nb = __recommend_blocks(__n + __base::__map_.empty()); // Number of unused blocks at back: size_type __back_capacity = __back_spare() / __base::__block_size; - __back_capacity = _VSTD::min(__back_capacity, __nb); // don't take more than you need + __back_capacity = std::min(__back_capacity, __nb); // don't take more than you need __nb -= __back_capacity; // number of blocks need to allocate // If __nb == 0, then we have sufficient capacity. if (__nb == 0) @@ -2535,10 +2535,10 @@ for (typename __base::__map_pointer __i = __base::__map_.begin(); __i != __base::__map_.end(); ++__i) __buf.push_back(*__i); - _VSTD::swap(__base::__map_.__first_, __buf.__first_); - _VSTD::swap(__base::__map_.__begin_, __buf.__begin_); - _VSTD::swap(__base::__map_.__end_, __buf.__end_); - _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap()); + std::swap(__base::__map_.__first_, __buf.__first_); + std::swap(__base::__map_.__begin_, __buf.__begin_); + std::swap(__base::__map_.__end_, __buf.__end_); + std::swap(__base::__map_.__end_cap(), __buf.__end_cap()); __base::__start_ += __ds; } } @@ -2591,10 +2591,10 @@ for (typename __base::__map_pointer __i = __base::__map_.end(); __i != __base::__map_.begin();) __buf.push_front(*--__i); - _VSTD::swap(__base::__map_.__first_, __buf.__first_); - _VSTD::swap(__base::__map_.__begin_, __buf.__begin_); - _VSTD::swap(__base::__map_.__end_, __buf.__end_); - _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap()); + std::swap(__base::__map_.__first_, __buf.__first_); + std::swap(__base::__map_.__begin_, __buf.__begin_); + std::swap(__base::__map_.__end_, __buf.__end_); + std::swap(__base::__map_.__end_cap(), __buf.__end_cap()); } } @@ -2608,7 +2608,7 @@ size_type __nb = __recommend_blocks(__n + __base::__map_.empty()); // Number of unused blocks at front: size_type __front_capacity = __front_spare() / __base::__block_size; - __front_capacity = _VSTD::min(__front_capacity, __nb); // don't take more than you need + __front_capacity = std::min(__front_capacity, __nb); // don't take more than you need __nb -= __front_capacity; // number of blocks need to allocate // If __nb == 0, then we have sufficient capacity. if (__nb == 0) @@ -2677,10 +2677,10 @@ for (typename __base::__map_pointer __i = __base::__map_.end(); __i != __base::__map_.begin();) __buf.push_front(*--__i); - _VSTD::swap(__base::__map_.__first_, __buf.__first_); - _VSTD::swap(__base::__map_.__begin_, __buf.__begin_); - _VSTD::swap(__base::__map_.__end_, __buf.__end_); - _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap()); + std::swap(__base::__map_.__first_, __buf.__first_); + std::swap(__base::__map_.__begin_, __buf.__begin_); + std::swap(__base::__map_.__end_, __buf.__end_); + std::swap(__base::__map_.__end_cap(), __buf.__end_cap()); __base::__start_ -= __ds; } } @@ -2690,7 +2690,7 @@ deque<_Tp, _Allocator>::pop_front() { allocator_type& __a = __base::__alloc(); - __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() + + __alloc_traits::destroy(__a, std::__to_address(*(__base::__map_.begin() + __base::__start_ / __base::__block_size) + __base::__start_ % __base::__block_size)); --__base::size(); @@ -2705,7 +2705,7 @@ _LIBCPP_ASSERT(!empty(), "deque::pop_back called on an empty deque"); allocator_type& __a = __base::__alloc(); size_type __p = __base::size() + __base::__start_ - 1; - __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() + + __alloc_traits::destroy(__a, std::__to_address(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size)); --__base::size(); @@ -2721,7 +2721,7 @@ { // as if // for (; __f != __l; ++__f, ++__r) - // *__r = _VSTD::move(*__f); + // *__r = std::move(*__f); difference_type __n = __l - __f; while (__n > 0) { @@ -2735,7 +2735,7 @@ } if (__fb <= __vt && __vt < __fe) __vt = (const_iterator(static_cast<__map_const_pointer>(__f.__m_iter_), __vt) -= __f - __r).__ptr_; - __r = _VSTD::move(__fb, __fe, __r); + __r = std::move(__fb, __fe, __r); __n -= __bs; __f += __bs; } @@ -2751,7 +2751,7 @@ { // as if // while (__f != __l) - // *--__r = _VSTD::move(*--__l); + // *--__r = std::move(*--__l); difference_type __n = __l - __f; while (__n > 0) { @@ -2766,7 +2766,7 @@ } if (__lb <= __vt && __vt < __le) __vt = (const_iterator(static_cast<__map_const_pointer>(__l.__m_iter_), __vt) += __r - __l - 1).__ptr_; - __r = _VSTD::move_backward(__lb, __le, __r); + __r = std::move_backward(__lb, __le, __r); __n -= __bs; __l -= __bs - 1; } @@ -2783,7 +2783,7 @@ allocator_type& __a = __base::__alloc(); // as if // for (; __f != __l; ++__r, ++__f, ++__base::size()) - // __alloc_traits::construct(__a, _VSTD::addressof(*__r), _VSTD::move(*__f)); + // __alloc_traits::construct(__a, std::addressof(*__r), std::move(*__f)); difference_type __n = __l - __f; while (__n > 0) { @@ -2798,7 +2798,7 @@ if (__fb <= __vt && __vt < __fe) __vt = (const_iterator(static_cast<__map_const_pointer>(__f.__m_iter_), __vt) += __r - __f).__ptr_; for (; __fb != __fe; ++__fb, ++__r, ++__base::size()) - __alloc_traits::construct(__a, _VSTD::addressof(*__r), _VSTD::move(*__fb)); + __alloc_traits::construct(__a, std::addressof(*__r), std::move(*__fb)); __n -= __bs; __f += __bs; } @@ -2815,7 +2815,7 @@ // as if // for (iterator __j = __l; __j != __f;) // { - // __alloc_traitsconstruct(__a, _VSTD::addressof(*--__r), _VSTD::move(*--__j)); + // __alloc_traitsconstruct(__a, std::addressof(*--__r), std::move(*--__j)); // --__base::__start_; // ++__base::size(); // } @@ -2835,7 +2835,7 @@ __vt = (const_iterator(static_cast<__map_const_pointer>(__l.__m_iter_), __vt) -= __l - __r + 1).__ptr_; while (__le != __lb) { - __alloc_traits::construct(__a, _VSTD::addressof(*--__r), _VSTD::move(*--__le)); + __alloc_traits::construct(__a, std::addressof(*--__r), std::move(*--__le)); --__base::__start_; ++__base::size(); } @@ -2854,16 +2854,16 @@ allocator_type& __a = __base::__alloc(); if (static_cast(__pos) <= (__base::size() - 1) / 2) { // erase from front - _VSTD::move_backward(__b, __p, _VSTD::next(__p)); - __alloc_traits::destroy(__a, _VSTD::addressof(*__b)); + std::move_backward(__b, __p, std::next(__p)); + __alloc_traits::destroy(__a, std::addressof(*__b)); --__base::size(); ++__base::__start_; __maybe_remove_front_spare(); } else { // erase from back - iterator __i = _VSTD::move(_VSTD::next(__p), __base::end(), __p); - __alloc_traits::destroy(__a, _VSTD::addressof(*__i)); + iterator __i = std::move(std::next(__p), __base::end(), __p); + __alloc_traits::destroy(__a, std::addressof(*__i)); --__base::size(); __maybe_remove_back_spare(); } @@ -2883,9 +2883,9 @@ allocator_type& __a = __base::__alloc(); if (static_cast(__pos) <= (__base::size() - __n) / 2) { // erase from front - iterator __i = _VSTD::move_backward(__b, __p, __p + __n); + iterator __i = std::move_backward(__b, __p, __p + __n); for (; __b != __i; ++__b) - __alloc_traits::destroy(__a, _VSTD::addressof(*__b)); + __alloc_traits::destroy(__a, std::addressof(*__b)); __base::size() -= __n; __base::__start_ += __n; while (__maybe_remove_front_spare()) { @@ -2893,9 +2893,9 @@ } else { // erase from back - iterator __i = _VSTD::move(__p + __n, __base::end(), __p); + iterator __i = std::move(__p + __n, __base::end(), __p); for (iterator __e = __base::end(); __i != __e; ++__i) - __alloc_traits::destroy(__a, _VSTD::addressof(*__i)); + __alloc_traits::destroy(__a, std::addressof(*__i)); __base::size() -= __n; while (__maybe_remove_back_spare()) { } @@ -2916,7 +2916,7 @@ iterator __b = __base::begin(); difference_type __pos = __f - __b; for (iterator __p = __b + __pos; __p != __e; ++__p) - __alloc_traits::destroy(__a, _VSTD::addressof(*__p)); + __alloc_traits::destroy(__a, std::addressof(*__p)); __base::size() -= __n; while (__maybe_remove_back_spare()) { } @@ -2951,7 +2951,7 @@ operator==(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y) { const typename deque<_Tp, _Allocator>::size_type __sz = __x.size(); - return __sz == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return __sz == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template @@ -2967,7 +2967,7 @@ bool operator< (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template @@ -3008,7 +3008,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename deque<_Tp, _Allocator>::size_type erase(deque<_Tp, _Allocator>& __c, const _Up& __v) { auto __old_size = __c.size(); - __c.erase(_VSTD::remove(__c.begin(), __c.end(), __v), __c.end()); + __c.erase(std::remove(__c.begin(), __c.end(), __v), __c.end()); return __old_size - __c.size(); } @@ -3016,7 +3016,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename deque<_Tp, _Allocator>::size_type erase_if(deque<_Tp, _Allocator>& __c, _Predicate __pred) { auto __old_size = __c.size(); - __c.erase(_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end()); + __c.erase(std::remove_if(__c.begin(), __c.end(), __pred), __c.end()); return __old_size - __c.size(); } #endif diff --git a/libcxx/include/exception b/libcxx/include/exception --- a/libcxx/include/exception +++ b/libcxx/include/exception @@ -181,7 +181,7 @@ } #else ((void)__e); - _VSTD::abort(); + std::abort(); #endif } @@ -229,7 +229,7 @@ _LIBCPP_INLINE_VISIBILITY exception_ptr make_exception_ptr(_Ep __e) _NOEXCEPT { - return __copy_exception_ptr(_VSTD::addressof(__e), __GetExceptionInfo(__e)); + return __copy_exception_ptr(std::addressof(__e), __GetExceptionInfo(__e)); } #endif // _LIBCPP_ABI_MICROSOFT @@ -315,7 +315,7 @@ rethrow_if_nested(const _Ep& __e, typename enable_if< __can_dynamic_cast<_Ep, nested_exception>::value>::type* = 0) { - const nested_exception* __nep = dynamic_cast(_VSTD::addressof(__e)); + const nested_exception* __nep = dynamic_cast(std::addressof(__e)); if (__nep) __nep->rethrow_nested(); } diff --git a/libcxx/include/experimental/__config b/libcxx/include/experimental/__config --- a/libcxx/include/experimental/__config +++ b/libcxx/include/experimental/__config @@ -18,19 +18,19 @@ #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace std { namespace experimental { #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL } } -#define _VSTD_EXPERIMENTAL std::experimental +#define std_EXPERIMENTAL std::experimental #define _LIBCPP_BEGIN_NAMESPACE_LFTS _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v1 { #define _LIBCPP_END_NAMESPACE_LFTS } } } -#define _VSTD_LFTS _VSTD_EXPERIMENTAL::fundamentals_v1 +#define std_LFTS std_EXPERIMENTAL::fundamentals_v1 #define _LIBCPP_BEGIN_NAMESPACE_LFTS_V2 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v2 { #define _LIBCPP_END_NAMESPACE_LFTS_V2 } } } -#define _VSTD_LFTS_V2 _VSTD_EXPERIMENTAL::fundamentals_v2 +#define std_LFTS_V2 std_EXPERIMENTAL::fundamentals_v2 #define _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR _LIBCPP_BEGIN_NAMESPACE_LFTS namespace pmr { #define _LIBCPP_END_NAMESPACE_LFTS_PMR _LIBCPP_END_NAMESPACE_LFTS } -#define _VSTD_LFTS_PMR _VSTD_LFTS::pmr +#define std_LFTS_PMR std_LFTS::pmr #if defined(_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM) # define _LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM /* nothing */ @@ -55,7 +55,7 @@ #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES \ } _LIBCPP_END_NAMESPACE_EXPERIMENTAL -#define _VSTD_CORO _VSTD_EXPERIMENTAL::coroutines_v1 +#define std_CORO std_EXPERIMENTAL::coroutines_v1 #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD \ _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace parallelism_v2 { diff --git a/libcxx/include/experimental/__memory b/libcxx/include/experimental/__memory --- a/libcxx/include/experimental/__memory +++ b/libcxx/include/experimental/__memory @@ -83,7 +83,7 @@ inline _LIBCPP_INLINE_VISIBILITY void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &, _Args &&... __args ) { - new (__storage) _Tp (_VSTD::forward<_Args>(__args)...); + new (__storage) _Tp (std::forward<_Args>(__args)...); } // FIXME: This should have a version which takes a non-const alloc. @@ -91,7 +91,7 @@ inline _LIBCPP_INLINE_VISIBILITY void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &__a, _Args &&... __args ) { - new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...); + new (__storage) _Tp (allocator_arg, __a, std::forward<_Args>(__args)...); } // FIXME: This should have a version which takes a non-const alloc. @@ -99,7 +99,7 @@ inline _LIBCPP_INLINE_VISIBILITY void __user_alloc_construct_impl (integral_constant, _Tp *__storage, const _Allocator &__a, _Args &&... __args ) { - new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a); + new (__storage) _Tp (std::forward<_Args>(__args)..., __a); } template @@ -109,7 +109,7 @@ { ::std::experimental::fundamentals_v1::__user_alloc_construct_impl( typename __lfts_uses_alloc_ctor<_Tp, _Alloc, _Args...>::type() - , __store, __a, _VSTD::forward<_Args>(__args)... + , __store, __a, std::forward<_Args>(__args)... ); } diff --git a/libcxx/include/experimental/coroutine b/libcxx/include/experimental/coroutine --- a/libcxx/include/experimental/coroutine +++ b/libcxx/include/experimental/coroutine @@ -251,7 +251,7 @@ typedef typename remove_cv<_Promise>::type _RawPromise; coroutine_handle __tmp; __tmp.__handle_ = __builtin_coro_promise( - _VSTD::addressof(const_cast<_RawPromise&>(__promise)), + std::addressof(const_cast<_RawPromise&>(__promise)), _LIBCPP_ALIGNOF(_Promise), true); return __tmp; } @@ -320,8 +320,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD template -struct hash<_VSTD_CORO::coroutine_handle<_Tp> > { - using __arg_type = _VSTD_CORO::coroutine_handle<_Tp>; +struct hash > { + using __arg_type = std_CORO::coroutine_handle<_Tp>; _LIBCPP_INLINE_VISIBILITY size_t operator()(__arg_type const& __v) const _NOEXCEPT {return hash()(__v.address());} diff --git a/libcxx/include/experimental/deque b/libcxx/include/experimental/deque --- a/libcxx/include/experimental/deque +++ b/libcxx/include/experimental/deque @@ -39,7 +39,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR template -using deque = _VSTD::deque<_ValueT, polymorphic_allocator<_ValueT>>; +using deque = std::deque<_ValueT, polymorphic_allocator<_ValueT>>; _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem --- a/libcxx/include/experimental/filesystem +++ b/libcxx/include/experimental/filesystem @@ -245,7 +245,7 @@ _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_FILESYSTEM -using namespace _VSTD_FS; +using namespace std_FS; _LIBCPP_END_NAMESPACE_EXPERIMENTAL_FILESYSTEM diff --git a/libcxx/include/experimental/forward_list b/libcxx/include/experimental/forward_list --- a/libcxx/include/experimental/forward_list +++ b/libcxx/include/experimental/forward_list @@ -39,7 +39,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR template -using forward_list = _VSTD::forward_list<_ValueT, polymorphic_allocator<_ValueT>>; +using forward_list = std::forward_list<_ValueT, polymorphic_allocator<_ValueT>>; _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional --- a/libcxx/include/experimental/functional +++ b/libcxx/include/experimental/functional @@ -120,7 +120,7 @@ pair<_ForwardIterator2, _ForwardIterator2> operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const { - return _VSTD::__search(__f, __l, __first_, __last_, __pred_, + return std::__search(__f, __l, __first_, __last_, __pred_, typename iterator_traits<_ForwardIterator>::iterator_category(), typename iterator_traits<_ForwardIterator2>::iterator_category()); } @@ -221,7 +221,7 @@ boyer_moore_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate()) : __first_(__f), __last_(__l), __pred_(__pred), - __pattern_length_(_VSTD::distance(__first_, __last_)), + __pattern_length_(std::distance(__first_, __last_)), __skip_{make_shared(__pattern_length_, -1, __hf, __pred_)}, __suffix_{make_shared>(__pattern_length_ + 1)} { @@ -246,7 +246,7 @@ if (__first_ == __last_) return make_pair(__f, __f); // empty pattern // If the pattern is larger than the corpus, we can't find it! - if ( __pattern_length_ > _VSTD::distance(__f, __l)) + if ( __pattern_length_ > std::distance(__f, __l)) return make_pair(__l, __l); // Do the search @@ -298,7 +298,7 @@ template void __compute_bm_prefix ( _Iterator __f, _Iterator __l, _BinaryPredicate __pred, _Container &__prefix ) { - const size_t __count = _VSTD::distance(__f, __l); + const size_t __count = std::distance(__f, __l); __prefix[0] = 0; size_t __k = 0; @@ -316,7 +316,7 @@ void __build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, _BinaryPredicate __pred) { - const size_t __count = _VSTD::distance(__f, __l); + const size_t __count = std::distance(__f, __l); vector & __suffix = *__suffix_.get(); if (__count > 0) { @@ -372,8 +372,8 @@ boyer_moore_horspool_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l, _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate()) : __first_(__f), __last_(__l), __pred_(__pred), - __pattern_length_(_VSTD::distance(__first_, __last_)), - __skip_{_VSTD::make_shared(__pattern_length_, __pattern_length_, __hf, __pred_)} + __pattern_length_(std::distance(__first_, __last_)), + __skip_{std::make_shared(__pattern_length_, __pattern_length_, __hf, __pred_)} { // build the skip table if ( __f != __l ) @@ -398,7 +398,7 @@ if (__first_ == __last_) return make_pair(__f, __f); // empty pattern // If the pattern is larger than the corpus, we can't find it! - if ( __pattern_length_ > _VSTD::distance(__f, __l)) + if ( __pattern_length_ > std::distance(__f, __l)) return make_pair(__l, __l); // Do the search diff --git a/libcxx/include/experimental/iterator b/libcxx/include/experimental/iterator --- a/libcxx/include/experimental/iterator +++ b/libcxx/include/experimental/iterator @@ -80,10 +80,10 @@ typedef void reference; ostream_joiner(ostream_type& __os, _Delim&& __d) - : __output_iter(_VSTD::addressof(__os)), __delim(_VSTD::move(__d)), __first(true) {} + : __output_iter(std::addressof(__os)), __delim(std::move(__d)), __first(true) {} ostream_joiner(ostream_type& __os, const _Delim& __d) - : __output_iter(_VSTD::addressof(__os)), __delim(__d), __first(true) {} + : __output_iter(std::addressof(__os)), __delim(__d), __first(true) {} template @@ -110,7 +110,7 @@ template ostream_joiner::type, _CharT, _Traits> make_ostream_joiner(basic_ostream<_CharT, _Traits>& __os, _Delim && __d) -{ return ostream_joiner::type, _CharT, _Traits>(__os, _VSTD::forward<_Delim>(__d)); } +{ return ostream_joiner::type, _CharT, _Traits>(__os, std::forward<_Delim>(__d)); } _LIBCPP_END_NAMESPACE_LFTS diff --git a/libcxx/include/experimental/list b/libcxx/include/experimental/list --- a/libcxx/include/experimental/list +++ b/libcxx/include/experimental/list @@ -39,7 +39,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR template -using list = _VSTD::list<_ValueT, polymorphic_allocator<_ValueT>>; +using list = std::list<_ValueT, polymorphic_allocator<_ValueT>>; _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/experimental/map b/libcxx/include/experimental/map --- a/libcxx/include/experimental/map +++ b/libcxx/include/experimental/map @@ -44,11 +44,11 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR template > -using map = _VSTD::map<_Key, _Value, _Compare, +using map = std::map<_Key, _Value, _Compare, polymorphic_allocator>>; template > -using multimap = _VSTD::multimap<_Key, _Value, _Compare, +using multimap = std::multimap<_Key, _Value, _Compare, polymorphic_allocator>>; _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource --- a/libcxx/include/experimental/memory_resource +++ b/libcxx/include/experimental/memory_resource @@ -161,7 +161,7 @@ // 8.6.2, memory.polymorphic.allocator.ctor _LIBCPP_INLINE_VISIBILITY polymorphic_allocator() _NOEXCEPT - : __res_(_VSTD_LFTS_PMR::get_default_resource()) + : __res_(std_LFTS_PMR::get_default_resource()) {} _LIBCPP_INLINE_VISIBILITY @@ -201,8 +201,8 @@ _LIBCPP_INLINE_VISIBILITY void construct(_Tp* __p, _Ts &&... __args) { - _VSTD_LFTS::__lfts_user_alloc_construct( - __p, *this, _VSTD::forward<_Ts>(__args)... + std_LFTS::__lfts_user_alloc_construct( + __p, *this, std::forward<_Ts>(__args)... ); } @@ -216,14 +216,14 @@ typename __lfts_uses_alloc_ctor< _T1, polymorphic_allocator&, _Args1... >::type() - , _VSTD::move(__x) + , std::move(__x) , typename __make_tuple_indices::type{} ) , __transform_tuple( typename __lfts_uses_alloc_ctor< _T2, polymorphic_allocator&, _Args2... >::type() - , _VSTD::move(__y) + , std::move(__y) , typename __make_tuple_indices::type{} ) ); @@ -239,24 +239,24 @@ _LIBCPP_INLINE_VISIBILITY void construct(pair<_T1, _T2> * __p, _Up && __u, _Vp && __v) { construct(__p, piecewise_construct - , _VSTD::forward_as_tuple(_VSTD::forward<_Up>(__u)) - , _VSTD::forward_as_tuple(_VSTD::forward<_Vp>(__v))); + , std::forward_as_tuple(std::forward<_Up>(__u)) + , std::forward_as_tuple(std::forward<_Vp>(__v))); } template _LIBCPP_INLINE_VISIBILITY void construct(pair<_T1, _T2> * __p, pair<_U1, _U2> const & __pr) { construct(__p, piecewise_construct - , _VSTD::forward_as_tuple(__pr.first) - , _VSTD::forward_as_tuple(__pr.second)); + , std::forward_as_tuple(__pr.first) + , std::forward_as_tuple(__pr.second)); } template _LIBCPP_INLINE_VISIBILITY void construct(pair<_T1, _T2> * __p, pair<_U1, _U2> && __pr){ construct(__p, piecewise_construct - , _VSTD::forward_as_tuple(_VSTD::forward<_U1>(__pr.first)) - , _VSTD::forward_as_tuple(_VSTD::forward<_U2>(__pr.second))); + , std::forward_as_tuple(std::forward<_U1>(__pr.first)) + , std::forward_as_tuple(std::forward<_U2>(__pr.second))); } template @@ -280,7 +280,7 @@ __transform_tuple(integral_constant, tuple<_Args...>&& __t, __tuple_indices<_Idx...>) const { - return _VSTD::forward_as_tuple(_VSTD::get<_Idx>(_VSTD::move(__t))...); + return std::forward_as_tuple(std::get<_Idx>(std::move(__t))...); } template @@ -291,7 +291,7 @@ { using _Tup = tuple; return _Tup(allocator_arg, *this, - _VSTD::get<_Idx>(_VSTD::move(__t))...); + std::get<_Idx>(std::move(__t))...); } template @@ -301,7 +301,7 @@ __tuple_indices<_Idx...>) { using _Tup = tuple<_Args&&..., polymorphic_allocator&>; - return _Tup(_VSTD::get<_Idx>(_VSTD::move(__t))..., *this); + return _Tup(std::get<_Idx>(std::move(__t))..., *this); } _LIBCPP_INLINE_VISIBILITY @@ -367,7 +367,7 @@ _LIBCPP_INLINE_VISIBILITY explicit __resource_adaptor_imp(allocator_type && __a) - : __alloc_(_VSTD::move(__a)) + : __alloc_(std::move(__a)) {} __resource_adaptor_imp & diff --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const --- a/libcxx/include/experimental/propagate_const +++ b/libcxx/include/experimental/propagate_const @@ -18,8 +18,8 @@ template class propagate_const; // [propagate_const.underlying], underlying pointer access - constexpr const _Tp& _VSTD_LFTS_V2::get_underlying(const propagate_const& pt) noexcept; - constexpr T& _VSTD_LFTS_V2::get_underlying(propagate_const& pt) noexcept; + constexpr const _Tp& std_LFTS_V2::get_underlying(const propagate_const& pt) noexcept; + constexpr T& std_LFTS_V2::get_underlying(propagate_const& pt) noexcept; // [propagate_const.relational], relational operators template constexpr bool operator==(const propagate_const& pt, nullptr_t); @@ -184,8 +184,8 @@ public: - template friend _LIBCPP_CONSTEXPR const _Up& ::_VSTD_LFTS_V2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT; - template friend _LIBCPP_CONSTEXPR _Up& ::_VSTD_LFTS_V2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT; + template friend _LIBCPP_CONSTEXPR const _Up& ::std_LFTS_V2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT; + template friend _LIBCPP_CONSTEXPR _Up& ::std_LFTS_V2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT; _LIBCPP_CONSTEXPR propagate_const() = default; @@ -196,14 +196,14 @@ template ::value && is_constructible<_Tp, _Up&&>::value,bool> = true> explicit _LIBCPP_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu) - : __t_(std::move(_VSTD_LFTS_V2::get_underlying(__pu))) + : __t_(std::move(std_LFTS_V2::get_underlying(__pu))) { } template ::value && is_constructible<_Tp, _Up&&>::value,bool> = false> _LIBCPP_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu) - : __t_(std::move(_VSTD_LFTS_V2::get_underlying(__pu))) + : __t_(std::move(std_LFTS_V2::get_underlying(__pu))) { } @@ -230,7 +230,7 @@ template _LIBCPP_CONSTEXPR propagate_const& operator=(propagate_const<_Up>&& __pu) { - __t_ = std::move(_VSTD_LFTS_V2::get_underlying(__pu)); + __t_ = std::move(std_LFTS_V2::get_underlying(__pu)); return *this; } @@ -290,7 +290,7 @@ _LIBCPP_CONSTEXPR void swap(propagate_const& __pt) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) { - using _VSTD::swap; + using std::swap; swap(__t_, __pt.__t_); } }; @@ -300,28 +300,28 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, nullptr_t) { - return _VSTD_LFTS_V2::get_underlying(__pt) == nullptr; + return std_LFTS_V2::get_underlying(__pt) == nullptr; } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(nullptr_t, const propagate_const<_Tp>& __pt) { - return nullptr == _VSTD_LFTS_V2::get_underlying(__pt); + return nullptr == std_LFTS_V2::get_underlying(__pt); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t) { - return _VSTD_LFTS_V2::get_underlying(__pt) != nullptr; + return std_LFTS_V2::get_underlying(__pt) != nullptr; } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt) { - return nullptr != _VSTD_LFTS_V2::get_underlying(__pt); + return nullptr != std_LFTS_V2::get_underlying(__pt); } template @@ -329,7 +329,7 @@ _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return _VSTD_LFTS_V2::get_underlying(__pt) == _VSTD_LFTS_V2::get_underlying(__pu); + return std_LFTS_V2::get_underlying(__pt) == std_LFTS_V2::get_underlying(__pu); } template @@ -337,7 +337,7 @@ _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return _VSTD_LFTS_V2::get_underlying(__pt) != _VSTD_LFTS_V2::get_underlying(__pu); + return std_LFTS_V2::get_underlying(__pt) != std_LFTS_V2::get_underlying(__pu); } template @@ -345,7 +345,7 @@ _LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return _VSTD_LFTS_V2::get_underlying(__pt) < _VSTD_LFTS_V2::get_underlying(__pu); + return std_LFTS_V2::get_underlying(__pt) < std_LFTS_V2::get_underlying(__pu); } template @@ -353,7 +353,7 @@ _LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return _VSTD_LFTS_V2::get_underlying(__pt) > _VSTD_LFTS_V2::get_underlying(__pu); + return std_LFTS_V2::get_underlying(__pt) > std_LFTS_V2::get_underlying(__pu); } template @@ -361,7 +361,7 @@ _LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return _VSTD_LFTS_V2::get_underlying(__pt) <= _VSTD_LFTS_V2::get_underlying(__pu); + return std_LFTS_V2::get_underlying(__pt) <= std_LFTS_V2::get_underlying(__pu); } template @@ -369,49 +369,49 @@ _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return _VSTD_LFTS_V2::get_underlying(__pt) >= _VSTD_LFTS_V2::get_underlying(__pu); + return std_LFTS_V2::get_underlying(__pt) >= std_LFTS_V2::get_underlying(__pu); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u) { - return _VSTD_LFTS_V2::get_underlying(__pt) == __u; + return std_LFTS_V2::get_underlying(__pt) == __u; } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u) { - return _VSTD_LFTS_V2::get_underlying(__pt) != __u; + return std_LFTS_V2::get_underlying(__pt) != __u; } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u) { - return _VSTD_LFTS_V2::get_underlying(__pt) < __u; + return std_LFTS_V2::get_underlying(__pt) < __u; } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u) { - return _VSTD_LFTS_V2::get_underlying(__pt) > __u; + return std_LFTS_V2::get_underlying(__pt) > __u; } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u) { - return _VSTD_LFTS_V2::get_underlying(__pt) <= __u; + return std_LFTS_V2::get_underlying(__pt) <= __u; } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u) { - return _VSTD_LFTS_V2::get_underlying(__pt) >= __u; + return std_LFTS_V2::get_underlying(__pt) >= __u; } @@ -419,42 +419,42 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t == _VSTD_LFTS_V2::get_underlying(__pu); + return __t == std_LFTS_V2::get_underlying(__pu); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t != _VSTD_LFTS_V2::get_underlying(__pu); + return __t != std_LFTS_V2::get_underlying(__pu); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t < _VSTD_LFTS_V2::get_underlying(__pu); + return __t < std_LFTS_V2::get_underlying(__pu); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t > _VSTD_LFTS_V2::get_underlying(__pu); + return __t > std_LFTS_V2::get_underlying(__pu); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t <= _VSTD_LFTS_V2::get_underlying(__pu); + return __t <= std_LFTS_V2::get_underlying(__pu); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t >= _VSTD_LFTS_V2::get_underlying(__pu); + return __t >= std_LFTS_V2::get_underlying(__pu); } template @@ -488,7 +488,7 @@ size_t operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1) const { - return std::hash<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1)); + return std::hash<_Tp>()(std_LFTS_V2::get_underlying(__pc1)); } }; @@ -501,7 +501,7 @@ bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1, const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const { - return std::equal_to<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2)); + return std::equal_to<_Tp>()(std_LFTS_V2::get_underlying(__pc1), std_LFTS_V2::get_underlying(__pc2)); } }; @@ -514,7 +514,7 @@ bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1, const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const { - return std::not_equal_to<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2)); + return std::not_equal_to<_Tp>()(std_LFTS_V2::get_underlying(__pc1), std_LFTS_V2::get_underlying(__pc2)); } }; @@ -527,7 +527,7 @@ bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1, const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const { - return std::less<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2)); + return std::less<_Tp>()(std_LFTS_V2::get_underlying(__pc1), std_LFTS_V2::get_underlying(__pc2)); } }; @@ -540,7 +540,7 @@ bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1, const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const { - return std::greater<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2)); + return std::greater<_Tp>()(std_LFTS_V2::get_underlying(__pc1), std_LFTS_V2::get_underlying(__pc2)); } }; @@ -553,7 +553,7 @@ bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1, const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const { - return std::less_equal<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2)); + return std::less_equal<_Tp>()(std_LFTS_V2::get_underlying(__pc1), std_LFTS_V2::get_underlying(__pc2)); } }; @@ -566,7 +566,7 @@ bool operator()(const experimental::fundamentals_v2::propagate_const<_Tp>& __pc1, const experimental::fundamentals_v2::propagate_const<_Tp>& __pc2) const { - return std::greater_equal<_Tp>()(_VSTD_LFTS_V2::get_underlying(__pc1), _VSTD_LFTS_V2::get_underlying(__pc2)); + return std::greater_equal<_Tp>()(std_LFTS_V2::get_underlying(__pc1), std_LFTS_V2::get_underlying(__pc2)); } }; diff --git a/libcxx/include/experimental/regex b/libcxx/include/experimental/regex --- a/libcxx/include/experimental/regex +++ b/libcxx/include/experimental/regex @@ -48,14 +48,14 @@ template using match_results = - _VSTD::match_results<_BiDirIter, - polymorphic_allocator<_VSTD::sub_match<_BiDirIter>>>; + std::match_results<_BiDirIter, + polymorphic_allocator>>; typedef match_results cmatch; -typedef match_results<_VSTD_LFTS_PMR::string::const_iterator> smatch; +typedef match_results smatch; #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS typedef match_results wcmatch; -typedef match_results<_VSTD_LFTS_PMR::wstring::const_iterator> wsmatch; +typedef match_results wsmatch; #endif _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/experimental/set b/libcxx/include/experimental/set --- a/libcxx/include/experimental/set +++ b/libcxx/include/experimental/set @@ -44,11 +44,11 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR template > -using set = _VSTD::set<_Value, _Compare, +using set = std::set<_Value, _Compare, polymorphic_allocator<_Value>>; template > -using multiset = _VSTD::multiset<_Value, _Compare, +using multiset = std::multiset<_Value, _Compare, polymorphic_allocator<_Value>>; _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/experimental/string b/libcxx/include/experimental/string --- a/libcxx/include/experimental/string +++ b/libcxx/include/experimental/string @@ -49,7 +49,7 @@ template > using basic_string = - _VSTD::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>; + std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>; typedef basic_string string; typedef basic_string u16string; diff --git a/libcxx/include/experimental/unordered_map b/libcxx/include/experimental/unordered_map --- a/libcxx/include/experimental/unordered_map +++ b/libcxx/include/experimental/unordered_map @@ -51,12 +51,12 @@ template , class _Pred = equal_to<_Key>> -using unordered_map = _VSTD::unordered_map<_Key, _Value, _Hash, _Pred, +using unordered_map = std::unordered_map<_Key, _Value, _Hash, _Pred, polymorphic_allocator>>; template , class _Pred = equal_to<_Key>> -using unordered_multimap = _VSTD::unordered_multimap<_Key, _Value, _Hash, _Pred, +using unordered_multimap = std::unordered_multimap<_Key, _Value, _Hash, _Pred, polymorphic_allocator>>; _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/experimental/unordered_set b/libcxx/include/experimental/unordered_set --- a/libcxx/include/experimental/unordered_set +++ b/libcxx/include/experimental/unordered_set @@ -45,12 +45,12 @@ template , class _Pred = equal_to<_Value>> -using unordered_set = _VSTD::unordered_set<_Value, _Hash, _Pred, +using unordered_set = std::unordered_set<_Value, _Hash, _Pred, polymorphic_allocator<_Value>>; template , class _Pred = equal_to<_Value>> -using unordered_multiset = _VSTD::unordered_multiset<_Value, _Hash, _Pred, +using unordered_multiset = std::unordered_multiset<_Value, _Hash, _Pred, polymorphic_allocator<_Value>>; _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/experimental/vector b/libcxx/include/experimental/vector --- a/libcxx/include/experimental/vector +++ b/libcxx/include/experimental/vector @@ -39,7 +39,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR template -using vector = _VSTD::vector<_ValueT, polymorphic_allocator<_ValueT>>; +using vector = std::vector<_ValueT, polymorphic_allocator<_ValueT>>; _LIBCPP_END_NAMESPACE_LFTS_PMR diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -356,9 +356,9 @@ void operator()(pointer __p) { if (__second_constructed) - __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.second)); + __alloc_traits::destroy(__na_, std::addressof(__p->__value_.second)); if (__first_constructed) - __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.first)); + __alloc_traits::destroy(__na_, std::addressof(__p->__value_.first)); if (__p) __alloc_traits::deallocate(__na_, __p, 1); } @@ -667,9 +667,9 @@ { __node_allocator& __na = __table_.__node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); - __node_traits::construct(__na, _VSTD::addressof(__h->__value_.first), __k); + __node_traits::construct(__na, std::addressof(__h->__value_.first), __k); __h.get_deleter().__first_constructed = true; - __node_traits::construct(__na, _VSTD::addressof(__h->__value_.second)); + __node_traits::construct(__na, std::addressof(__h->__value_.second)); __h.get_deleter().__second_constructed = true; return __h; } @@ -961,9 +961,9 @@ { _EqRng __xeq = __x.equal_range(__i->first); _EqRng __yeq = __y.equal_range(__i->first); - if (_VSTD::distance(__xeq.first, __xeq.second) != - _VSTD::distance(__yeq.first, __yeq.second) || - !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first)) + if (std::distance(__xeq.first, __xeq.second) != + std::distance(__yeq.first, __yeq.second) || + !std::is_permutation(__xeq.first, __xeq.second, __yeq.first)) return false; __i = __xeq.second; } diff --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set --- a/libcxx/include/ext/hash_set +++ b/libcxx/include/ext/hash_set @@ -640,9 +640,9 @@ { _EqRng __xeq = __x.equal_range(*__i); _EqRng __yeq = __y.equal_range(*__i); - if (_VSTD::distance(__xeq.first, __xeq.second) != - _VSTD::distance(__yeq.first, __yeq.second) || - !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first)) + if (std::distance(__xeq.first, __xeq.second) != + std::distance(__yeq.first, __yeq.second) || + !std::is_permutation(__xeq.first, __xeq.second, __yeq.first)) return false; __i = __xeq.second; } diff --git a/libcxx/include/format b/libcxx/include/format --- a/libcxx/include/format +++ b/libcxx/include/format @@ -336,7 +336,7 @@ template _LIBCPP_HIDE_FROM_ABI __format_arg_store make_wformat_args(const _Args&... __args) { - return _VSTD::make_format_args(__args...); + return std::make_format_args(__args...); } #endif @@ -363,7 +363,7 @@ "The replacement field arg-id should terminate at a ':' or '}'"); } - _VSTD::visit_format_arg( + std::visit_format_arg( [&](auto __arg) { if constexpr (same_as) __throw_format_error("Argument index out of bounds"); @@ -399,7 +399,7 @@ __throw_format_error("The format string terminates at a '{'"); if (*__begin != _CharT('{')) [[likely]] { - __ctx.advance_to(_VSTD::move(__out_it)); + __ctx.advance_to(std::move(__out_it)); __begin = __handle_replacement_field(__begin, __end, __parse_ctx, __ctx); __out_it = __ctx.out(); @@ -434,52 +434,52 @@ _OutIt __out_it, basic_string_view<_CharT> __fmt, basic_format_args> __args) { if constexpr (same_as<_OutIt, _FormatOutIt>) - return _VSTD::__format::__vformat_to( + return std::__format::__vformat_to( basic_format_parse_context{__fmt, __args.__size()}, - _VSTD::__format_context_create(_VSTD::move(__out_it), __args)); + std::__format_context_create(std::move(__out_it), __args)); else { basic_string<_CharT> __str; - _VSTD::__format::__vformat_to( + std::__format::__vformat_to( basic_format_parse_context{__fmt, __args.__size()}, - _VSTD::__format_context_create(_VSTD::back_inserter(__str), __args)); - return _VSTD::copy_n(__str.begin(), __str.size(), _VSTD::move(__out_it)); + std::__format_context_create(std::back_inserter(__str), __args)); + return std::copy_n(__str.begin(), __str.size(), std::move(__out_it)); } } template _OutIt> _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to(_OutIt __out_it, string_view __fmt, format_args __args) { - return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args); + return std::__vformat_to(std::move(__out_it), __fmt, __args); } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template _OutIt> _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) { - return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args); + return std::__vformat_to(std::move(__out_it), __fmt, __args); } #endif template _OutIt, class... _Args> _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt format_to(_OutIt __out_it, string_view __fmt, const _Args&... __args) { - return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt, - _VSTD::make_format_args(__args...)); + return std::vformat_to(std::move(__out_it), __fmt, + std::make_format_args(__args...)); } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template _OutIt, class... _Args> _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt format_to(_OutIt __out_it, wstring_view __fmt, const _Args&... __args) { - return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt, - _VSTD::make_wformat_args(__args...)); + return std::vformat_to(std::move(__out_it), __fmt, + std::make_wformat_args(__args...)); } #endif _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string vformat(string_view __fmt, format_args __args) { string __res; - _VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args); + std::vformat_to(std::back_inserter(__res), __fmt, __args); return __res; } @@ -487,7 +487,7 @@ _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring vformat(wstring_view __fmt, wformat_args __args) { wstring __res; - _VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args); + std::vformat_to(std::back_inserter(__res), __fmt, __args); return __res; } #endif @@ -495,14 +495,14 @@ template _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string format(string_view __fmt, const _Args&... __args) { - return _VSTD::vformat(__fmt, _VSTD::make_format_args(__args...)); + return std::vformat(__fmt, std::make_format_args(__args...)); } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring format(wstring_view __fmt, const _Args&... __args) { - return _VSTD::vformat(__fmt, _VSTD::make_wformat_args(__args...)); + return std::vformat(__fmt, std::make_wformat_args(__args...)); } #endif @@ -511,12 +511,12 @@ format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, string_view __fmt, const _Args&... __args) { // TODO FMT Improve PoC: using std::string is inefficient. - string __str = _VSTD::vformat(__fmt, _VSTD::make_format_args(__args...)); + string __str = std::vformat(__fmt, std::make_format_args(__args...)); iter_difference_t<_OutIt> __s = __str.size(); iter_difference_t<_OutIt> __m = - _VSTD::clamp(__n, iter_difference_t<_OutIt>(0), __s); - __out_it = _VSTD::copy_n(__str.begin(), __m, _VSTD::move(__out_it)); - return {_VSTD::move(__out_it), __s}; + std::clamp(__n, iter_difference_t<_OutIt>(0), __s); + __out_it = std::copy_n(__str.begin(), __m, std::move(__out_it)); + return {std::move(__out_it), __s}; } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS @@ -525,12 +525,12 @@ format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, wstring_view __fmt, const _Args&... __args) { // TODO FMT Improve PoC: using std::string is inefficient. - wstring __str = _VSTD::vformat(__fmt, _VSTD::make_wformat_args(__args...)); + wstring __str = std::vformat(__fmt, std::make_wformat_args(__args...)); iter_difference_t<_OutIt> __s = __str.size(); iter_difference_t<_OutIt> __m = - _VSTD::clamp(__n, iter_difference_t<_OutIt>(0), __s); - __out_it = _VSTD::copy_n(__str.begin(), __m, _VSTD::move(__out_it)); - return {_VSTD::move(__out_it), __s}; + std::clamp(__n, iter_difference_t<_OutIt>(0), __s); + __out_it = std::copy_n(__str.begin(), __m, std::move(__out_it)); + return {std::move(__out_it), __s}; } #endif @@ -538,7 +538,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t formatted_size(string_view __fmt, const _Args&... __args) { // TODO FMT Improve PoC: using std::string is inefficient. - return _VSTD::vformat(__fmt, _VSTD::make_format_args(__args...)).size(); + return std::vformat(__fmt, std::make_format_args(__args...)).size(); } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS @@ -546,7 +546,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t formatted_size(wstring_view __fmt, const _Args&... __args) { // TODO FMT Improve PoC: using std::string is inefficient. - return _VSTD::vformat(__fmt, _VSTD::make_wformat_args(__args...)).size(); + return std::vformat(__fmt, std::make_wformat_args(__args...)).size(); } #endif @@ -558,24 +558,24 @@ _OutIt __out_it, locale __loc, basic_string_view<_CharT> __fmt, basic_format_args> __args) { if constexpr (same_as<_OutIt, _FormatOutIt>) - return _VSTD::__format::__vformat_to( + return std::__format::__vformat_to( basic_format_parse_context{__fmt, __args.__size()}, - _VSTD::__format_context_create(_VSTD::move(__out_it), __args, - _VSTD::move(__loc))); + std::__format_context_create(std::move(__out_it), __args, + std::move(__loc))); else { basic_string<_CharT> __str; - _VSTD::__format::__vformat_to( + std::__format::__vformat_to( basic_format_parse_context{__fmt, __args.__size()}, - _VSTD::__format_context_create(_VSTD::back_inserter(__str), __args, - _VSTD::move(__loc))); - return _VSTD::copy_n(__str.begin(), __str.size(), _VSTD::move(__out_it)); + std::__format_context_create(std::back_inserter(__str), __args, + std::move(__loc))); + return std::copy_n(__str.begin(), __str.size(), std::move(__out_it)); } } template _OutIt> _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to( _OutIt __out_it, locale __loc, string_view __fmt, format_args __args) { - return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt, + return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt, __args); } @@ -583,7 +583,7 @@ template _OutIt> _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to( _OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) { - return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt, + return std::__vformat_to(std::move(__out_it), std::move(__loc), __fmt, __args); } #endif @@ -591,23 +591,23 @@ template _OutIt, class... _Args> _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt format_to( _OutIt __out_it, locale __loc, string_view __fmt, const _Args&... __args) { - return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt, - _VSTD::make_format_args(__args...)); + return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt, + std::make_format_args(__args...)); } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template _OutIt, class... _Args> _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt format_to( _OutIt __out_it, locale __loc, wstring_view __fmt, const _Args&... __args) { - return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt, - _VSTD::make_wformat_args(__args...)); + return std::vformat_to(std::move(__out_it), std::move(__loc), __fmt, + std::make_wformat_args(__args...)); } #endif _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string vformat(locale __loc, string_view __fmt, format_args __args) { string __res; - _VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt, + std::vformat_to(std::back_inserter(__res), std::move(__loc), __fmt, __args); return __res; } @@ -616,7 +616,7 @@ _LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring vformat(locale __loc, wstring_view __fmt, wformat_args __args) { wstring __res; - _VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt, + std::vformat_to(std::back_inserter(__res), std::move(__loc), __fmt, __args); return __res; } @@ -625,16 +625,16 @@ template _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string format(locale __loc, string_view __fmt, const _Args&... __args) { - return _VSTD::vformat(_VSTD::move(__loc), __fmt, - _VSTD::make_format_args(__args...)); + return std::vformat(std::move(__loc), __fmt, + std::make_format_args(__args...)); } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring format(locale __loc, wstring_view __fmt, const _Args&... __args) { - return _VSTD::vformat(_VSTD::move(__loc), __fmt, - _VSTD::make_wformat_args(__args...)); + return std::vformat(std::move(__loc), __fmt, + std::make_wformat_args(__args...)); } #endif @@ -643,13 +643,13 @@ format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, string_view __fmt, const _Args&... __args) { // TODO FMT Improve PoC: using std::string is inefficient. - string __str = _VSTD::vformat(_VSTD::move(__loc), __fmt, - _VSTD::make_format_args(__args...)); + string __str = std::vformat(std::move(__loc), __fmt, + std::make_format_args(__args...)); iter_difference_t<_OutIt> __s = __str.size(); iter_difference_t<_OutIt> __m = - _VSTD::clamp(__n, iter_difference_t<_OutIt>(0), __s); - __out_it = _VSTD::copy_n(__str.begin(), __m, _VSTD::move(__out_it)); - return {_VSTD::move(__out_it), __s}; + std::clamp(__n, iter_difference_t<_OutIt>(0), __s); + __out_it = std::copy_n(__str.begin(), __m, std::move(__out_it)); + return {std::move(__out_it), __s}; } #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS @@ -658,13 +658,13 @@ format_to_n(_OutIt __out_it, iter_difference_t<_OutIt> __n, locale __loc, wstring_view __fmt, const _Args&... __args) { // TODO FMT Improve PoC: using std::string is inefficient. - wstring __str = _VSTD::vformat(_VSTD::move(__loc), __fmt, - _VSTD::make_wformat_args(__args...)); + wstring __str = std::vformat(std::move(__loc), __fmt, + std::make_wformat_args(__args...)); iter_difference_t<_OutIt> __s = __str.size(); iter_difference_t<_OutIt> __m = - _VSTD::clamp(__n, iter_difference_t<_OutIt>(0), __s); - __out_it = _VSTD::copy_n(__str.begin(), __m, _VSTD::move(__out_it)); - return {_VSTD::move(__out_it), __s}; + std::clamp(__n, iter_difference_t<_OutIt>(0), __s); + __out_it = std::copy_n(__str.begin(), __m, std::move(__out_it)); + return {std::move(__out_it), __s}; } #endif @@ -672,8 +672,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t formatted_size(locale __loc, string_view __fmt, const _Args&... __args) { // TODO FMT Improve PoC: using std::string is inefficient. - return _VSTD::vformat(_VSTD::move(__loc), __fmt, - _VSTD::make_format_args(__args...)) + return std::vformat(std::move(__loc), __fmt, + std::make_format_args(__args...)) .size(); } @@ -682,8 +682,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t formatted_size(locale __loc, wstring_view __fmt, const _Args&... __args) { // TODO FMT Improve PoC: using std::string is inefficient. - return _VSTD::vformat(_VSTD::move(__loc), __fmt, - _VSTD::make_wformat_args(__args...)) + return std::vformat(std::move(__loc), __fmt, + std::make_wformat_args(__args...)) .size(); } #endif diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -559,7 +559,7 @@ _LIBCPP_INLINE_VISIBILITY void __move_assign_alloc(__forward_list_base& __x, true_type) _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) - {__alloc() = _VSTD::move(__x.__alloc());} + {__alloc() = std::move(__x.__alloc());} }; #ifndef _LIBCPP_CXX03_LANG @@ -568,7 +568,7 @@ inline __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x) _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value) - : __before_begin_(_VSTD::move(__x.__before_begin_)) + : __before_begin_(std::move(__x.__before_begin_)) { __x.__before_begin()->__next_ = nullptr; } @@ -605,9 +605,9 @@ __is_nothrow_swappable<__node_allocator>::value) #endif { - _VSTD::__swap_allocator(__alloc(), __x.__alloc(), + std::__swap_allocator(__alloc(), __x.__alloc(), integral_constant()); - using _VSTD::swap; + using std::swap; swap(__before_begin()->__next_, __x.__before_begin()->__next_); } @@ -619,7 +619,7 @@ for (__node_pointer __p = __before_begin()->__next_; __p != nullptr;) { __node_pointer __next = __p->__next_; - __node_traits::destroy(__a, _VSTD::addressof(__p->__value_)); + __node_traits::destroy(__a, std::addressof(__p->__value_)); __node_traits::deallocate(__a, __p, 1); __p = __next; } @@ -697,7 +697,7 @@ _LIBCPP_INLINE_VISIBILITY forward_list(forward_list&& __x) _NOEXCEPT_(is_nothrow_move_constructible::value) - : base(_VSTD::move(__x)) {} + : base(std::move(__x)) {} forward_list(forward_list&& __x, const __identity_t& __a); forward_list(initializer_list __il); @@ -766,7 +766,7 @@ {return base::__before_begin()->__next_ == nullptr;} _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { - return _VSTD::min( + return std::min( __node_traits::max_size(base::__alloc()), numeric_limits::max()); } @@ -847,7 +847,7 @@ template _LIBCPP_INLINE_VISIBILITY void merge(forward_list&& __x, _Compare __comp) - {merge(__x, _VSTD::move(__comp));} + {merge(__x, std::move(__comp));} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY void merge(forward_list& __x) {merge(__x, __less());} @@ -914,7 +914,7 @@ __p = __p->__next_as_begin()) { __h.reset(__node_traits::allocate(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_)); + __node_traits::construct(__a, std::addressof(__h->__value_)); __h->__next_ = nullptr; __p->__next_ = __h.release(); } @@ -936,7 +936,7 @@ __p = __p->__next_as_begin()) { __h.reset(__node_traits::allocate(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_)); + __node_traits::construct(__a, std::addressof(__h->__value_)); __h->__next_ = nullptr; __p->__next_ = __h.release(); } @@ -991,7 +991,7 @@ forward_list<_Tp, _Alloc>& forward_list<_Tp, _Alloc>::operator=(const forward_list& __x) { - if (this != _VSTD::addressof(__x)) + if (this != std::addressof(__x)) { base::__copy_assign_alloc(__x); assign(__x.begin(), __x.end()); @@ -1003,7 +1003,7 @@ template forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x, const __identity_t& __a) - : base(_VSTD::move(__x), __a) + : base(std::move(__x), __a) { if (base::__alloc() != __x.__alloc()) { @@ -1084,7 +1084,7 @@ forward_list<_Tp, _Alloc>::assign(_InputIterator __f, _InputIterator __l) { iterator __i = before_begin(); - iterator __j = _VSTD::next(__i); + iterator __j = std::next(__i); iterator __e = end(); for (; __j != __e && __f != __l; ++__i, (void) ++__j, ++__f) *__j = *__f; @@ -1099,7 +1099,7 @@ forward_list<_Tp, _Alloc>::assign(size_type __n, const value_type& __v) { iterator __i = before_begin(); - iterator __j = _VSTD::next(__i); + iterator __j = std::next(__i); iterator __e = end(); for (; __j != __e && __n > 0; --__n, ++__i, ++__j) *__j = __v; @@ -1131,8 +1131,8 @@ __node_allocator& __a = base::__alloc(); typedef __allocator_destructor<__node_allocator> _Dp; unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), - _VSTD::forward<_Args>(__args)...); + __node_traits::construct(__a, std::addressof(__h->__value_), + std::forward<_Args>(__args)...); __h->__next_ = base::__before_begin()->__next_; base::__before_begin()->__next_ = __h.release(); #if _LIBCPP_STD_VER > 14 @@ -1147,7 +1147,7 @@ __node_allocator& __a = base::__alloc(); typedef __allocator_destructor<__node_allocator> _Dp; unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), _VSTD::move(__v)); + __node_traits::construct(__a, std::addressof(__h->__value_), std::move(__v)); __h->__next_ = base::__before_begin()->__next_; base::__before_begin()->__next_ = __h.release(); } @@ -1161,7 +1161,7 @@ __node_allocator& __a = base::__alloc(); typedef __allocator_destructor<__node_allocator> _Dp; unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v); + __node_traits::construct(__a, std::addressof(__h->__value_), __v); __h->__next_ = base::__before_begin()->__next_; base::__before_begin()->__next_ = __h.release(); } @@ -1173,7 +1173,7 @@ __node_allocator& __a = base::__alloc(); __node_pointer __p = base::__before_begin()->__next_; base::__before_begin()->__next_ = __p->__next_; - __node_traits::destroy(__a, _VSTD::addressof(__p->__value_)); + __node_traits::destroy(__a, std::addressof(__p->__value_)); __node_traits::deallocate(__a, __p, 1); } @@ -1188,8 +1188,8 @@ __node_allocator& __a = base::__alloc(); typedef __allocator_destructor<__node_allocator> _Dp; unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), - _VSTD::forward<_Args>(__args)...); + __node_traits::construct(__a, std::addressof(__h->__value_), + std::forward<_Args>(__args)...); __h->__next_ = __r->__next_; __r->__next_ = __h.release(); return iterator(__r->__next_); @@ -1203,7 +1203,7 @@ __node_allocator& __a = base::__alloc(); typedef __allocator_destructor<__node_allocator> _Dp; unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), _VSTD::move(__v)); + __node_traits::construct(__a, std::addressof(__h->__value_), std::move(__v)); __h->__next_ = __r->__next_; __r->__next_ = __h.release(); return iterator(__r->__next_); @@ -1219,7 +1219,7 @@ __node_allocator& __a = base::__alloc(); typedef __allocator_destructor<__node_allocator> _Dp; unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v); + __node_traits::construct(__a, std::addressof(__h->__value_), __v); __h->__next_ = __r->__next_; __r->__next_ = __h.release(); return iterator(__r->__next_); @@ -1236,7 +1236,7 @@ __node_allocator& __a = base::__alloc(); typedef __allocator_destructor<__node_allocator> _Dp; unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v); + __node_traits::construct(__a, std::addressof(__h->__value_), __v); __node_pointer __first = __h.release(); __node_pointer __last = __first; #ifndef _LIBCPP_NO_EXCEPTIONS @@ -1246,7 +1246,7 @@ for (--__n; __n != 0; --__n, __last = __last->__next_) { __h.reset(__node_traits::allocate(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v); + __node_traits::construct(__a, std::addressof(__h->__value_), __v); __last->__next_ = __h.release(); } #ifndef _LIBCPP_NO_EXCEPTIONS @@ -1256,7 +1256,7 @@ while (__first != nullptr) { __node_pointer __next = __first->__next_; - __node_traits::destroy(__a, _VSTD::addressof(__first->__value_)); + __node_traits::destroy(__a, std::addressof(__first->__value_)); __node_traits::deallocate(__a, __first, 1); __first = __next; } @@ -1286,7 +1286,7 @@ __node_allocator& __a = base::__alloc(); typedef __allocator_destructor<__node_allocator> _Dp; unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), *__f); + __node_traits::construct(__a, std::addressof(__h->__value_), *__f); __node_pointer __first = __h.release(); __node_pointer __last = __first; #ifndef _LIBCPP_NO_EXCEPTIONS @@ -1296,7 +1296,7 @@ for (++__f; __f != __l; ++__f, ((void)(__last = __last->__next_))) { __h.reset(__node_traits::allocate(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), *__f); + __node_traits::construct(__a, std::addressof(__h->__value_), *__f); __last->__next_ = __h.release(); } #ifndef _LIBCPP_NO_EXCEPTIONS @@ -1306,7 +1306,7 @@ while (__first != nullptr) { __node_pointer __next = __first->__next_; - __node_traits::destroy(__a, _VSTD::addressof(__first->__value_)); + __node_traits::destroy(__a, std::addressof(__first->__value_)); __node_traits::deallocate(__a, __first, 1); __first = __next; } @@ -1328,7 +1328,7 @@ __node_pointer __n = __p->__next_; __p->__next_ = __n->__next_; __node_allocator& __a = base::__alloc(); - __node_traits::destroy(__a, _VSTD::addressof(__n->__value_)); + __node_traits::destroy(__a, std::addressof(__n->__value_)); __node_traits::deallocate(__a, __n, 1); return iterator(__p->__next_); } @@ -1350,7 +1350,7 @@ do { __node_pointer __tmp = __n->__next_; - __node_traits::destroy(__a, _VSTD::addressof(__n->__value_)); + __node_traits::destroy(__a, std::addressof(__n->__value_)); __node_traits::deallocate(__a, __n, 1); __n = __tmp; } while (__n != __e); @@ -1383,7 +1383,7 @@ __ptr = __ptr->__next_as_begin()) { __h.reset(__node_traits::allocate(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_)); + __node_traits::construct(__a, std::addressof(__h->__value_)); __h->__next_ = nullptr; __ptr->__next_ = __h.release(); } @@ -1415,7 +1415,7 @@ __ptr = __ptr->__next_as_begin()) { __h.reset(__node_traits::allocate(__a, 1)); - __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v); + __node_traits::construct(__a, std::addressof(__h->__value_), __v); __h->__next_ = nullptr; __ptr->__next_ = __h.release(); } @@ -1448,7 +1448,7 @@ forward_list& /*__other*/, const_iterator __i) { - const_iterator __lm1 = _VSTD::next(__i); + const_iterator __lm1 = std::next(__i); if (__p != __i && __p != __lm1) { __i.__get_begin()->__next_ = __lm1.__get_begin()->__next_; @@ -1518,7 +1518,7 @@ if (__i.__get_begin()->__next_->__value_ == __v) { ++__count_removed; - iterator __j = _VSTD::next(__i, 2); + iterator __j = std::next(__i, 2); for (; __j != __e && *__j == __v; ++__j) ++__count_removed; __deleted_nodes.splice_after(__deleted_nodes.before_begin(), *this, __i, __j); @@ -1546,7 +1546,7 @@ if (__pred(__i.__get_begin()->__next_->__value_)) { ++__count_removed; - iterator __j = _VSTD::next(__i, 2); + iterator __j = std::next(__i, 2); for (; __j != __e && __pred(*__j); ++__j) ++__count_removed; __deleted_nodes.splice_after(__deleted_nodes.before_begin(), *this, __i, __j); @@ -1570,7 +1570,7 @@ typename forward_list<_Tp, _Alloc>::size_type __count_removed = 0; for (iterator __i = begin(), __e = end(); __i != __e;) { - iterator __j = _VSTD::next(__i); + iterator __j = std::next(__i); for (; __j != __e && __binary_pred(*__i, *__j); ++__j) ++__count_removed; if (__i.__get_begin()->__next_ != __j.__get_unsafe_node_pointer()) @@ -1586,7 +1586,7 @@ void forward_list<_Tp, _Alloc>::merge(forward_list& __x, _Compare __comp) { - if (this != _VSTD::addressof(__x)) + if (this != std::addressof(__x)) { base::__before_begin()->__next_ = __merge(base::__before_begin()->__next_, __x.__before_begin()->__next_, @@ -1647,7 +1647,7 @@ forward_list<_Tp, _Alloc>::sort(_Compare __comp) { base::__before_begin()->__next_ = __sort(base::__before_begin()->__next_, - _VSTD::distance(begin(), end()), __comp); + std::distance(begin(), end()), __comp); } template @@ -1673,7 +1673,7 @@ } difference_type __sz1 = __sz / 2; difference_type __sz2 = __sz - __sz1; - __node_pointer __t = _VSTD::next(iterator(__f1), __sz1 - 1).__get_unsafe_node_pointer(); + __node_pointer __t = std::next(iterator(__f1), __sz1 - 1).__get_unsafe_node_pointer(); __node_pointer __f2 = __t->__next_; __t->__next_ = nullptr; return __merge(__sort(__f1, __sz1, __comp), @@ -1729,7 +1729,7 @@ bool operator< (const forward_list<_Tp, _Alloc>& __x, const forward_list<_Tp, _Alloc>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } @@ -1778,7 +1778,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename forward_list<_Tp, _Allocator>::size_type erase(forward_list<_Tp, _Allocator>& __c, const _Up& __v) { - return _VSTD::erase_if(__c, [&](auto& __elem) { return __elem == __v; }); + return std::erase_if(__c, [&](auto& __elem) { return __elem == __v; }); } #endif diff --git a/libcxx/include/fstream b/libcxx/include/fstream --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -240,7 +240,7 @@ #if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY - basic_filebuf* open(const _VSTD_FS::path& __p, ios_base::openmode __mode) { + basic_filebuf* open(const std_FS::path& __p, ios_base::openmode __mode) { return open(__p.c_str(), __mode); } #endif @@ -414,9 +414,9 @@ basic_streambuf::swap(__rhs); if (__extbuf_ != __extbuf_min_ && __rhs.__extbuf_ != __rhs.__extbuf_min_) { - _VSTD::swap(__extbuf_, __rhs.__extbuf_); - _VSTD::swap(__extbufnext_, __rhs.__extbufnext_); - _VSTD::swap(__extbufend_, __rhs.__extbufend_); + std::swap(__extbuf_, __rhs.__extbuf_); + std::swap(__extbufnext_, __rhs.__extbufnext_); + std::swap(__extbufend_, __rhs.__extbufend_); } else { @@ -439,18 +439,18 @@ __rhs.__extbufnext_ = __rhs.__extbuf_ + __ln; __rhs.__extbufend_ = __rhs.__extbuf_ + __le; } - _VSTD::swap(__ebs_, __rhs.__ebs_); - _VSTD::swap(__intbuf_, __rhs.__intbuf_); - _VSTD::swap(__ibs_, __rhs.__ibs_); - _VSTD::swap(__file_, __rhs.__file_); - _VSTD::swap(__cv_, __rhs.__cv_); - _VSTD::swap(__st_, __rhs.__st_); - _VSTD::swap(__st_last_, __rhs.__st_last_); - _VSTD::swap(__om_, __rhs.__om_); - _VSTD::swap(__cm_, __rhs.__cm_); - _VSTD::swap(__owns_eb_, __rhs.__owns_eb_); - _VSTD::swap(__owns_ib_, __rhs.__owns_ib_); - _VSTD::swap(__always_noconv_, __rhs.__always_noconv_); + std::swap(__ebs_, __rhs.__ebs_); + std::swap(__intbuf_, __rhs.__intbuf_); + std::swap(__ibs_, __rhs.__ibs_); + std::swap(__file_, __rhs.__file_); + std::swap(__cv_, __rhs.__cv_); + std::swap(__st_, __rhs.__st_); + std::swap(__st_last_, __rhs.__st_last_); + std::swap(__om_, __rhs.__om_); + std::swap(__cm_, __rhs.__cm_); + std::swap(__owns_eb_, __rhs.__owns_eb_); + std::swap(__owns_ib_, __rhs.__owns_ib_); + std::swap(__always_noconv_, __rhs.__always_noconv_); if (this->eback() == (char_type*)__rhs.__extbuf_min_) { ptrdiff_t __n = this->gptr() - this->eback(); @@ -717,7 +717,7 @@ int_type __c = traits_type::eof(); if (this->gptr() == this->egptr()) { - _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type)); + std::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type)); if (__always_noconv_) { size_t __nmemb = static_cast(this->egptr() - this->eback() - __unget_sz); @@ -734,10 +734,10 @@ { _LIBCPP_ASSERT ( !(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" ); if (__extbufend_ != __extbufnext_) - _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_); + std::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_); __extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_); __extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_); - size_t __nmemb = _VSTD::min(static_cast(__ibs_ - __unget_sz), + size_t __nmemb = std::min(static_cast(__ibs_ - __unget_sz), static_cast(__extbufend_ - __extbufnext_)); codecvt_base::result __r; __st_last_ = __st_; @@ -1223,8 +1223,8 @@ template inline basic_ifstream<_CharT, _Traits>::basic_ifstream(basic_ifstream&& __rhs) - : basic_istream(_VSTD::move(__rhs)), - __sb_(_VSTD::move(__rhs.__sb_)) + : basic_istream(std::move(__rhs)), + __sb_(std::move(__rhs.__sb_)) { this->set_rdbuf(&__sb_); } @@ -1234,8 +1234,8 @@ basic_ifstream<_CharT, _Traits>& basic_ifstream<_CharT, _Traits>::operator=(basic_ifstream&& __rhs) { - basic_istream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + basic_istream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } @@ -1424,8 +1424,8 @@ template inline basic_ofstream<_CharT, _Traits>::basic_ofstream(basic_ofstream&& __rhs) - : basic_ostream(_VSTD::move(__rhs)), - __sb_(_VSTD::move(__rhs.__sb_)) + : basic_ostream(std::move(__rhs)), + __sb_(std::move(__rhs.__sb_)) { this->set_rdbuf(&__sb_); } @@ -1435,8 +1435,8 @@ basic_ofstream<_CharT, _Traits>& basic_ofstream<_CharT, _Traits>::operator=(basic_ofstream&& __rhs) { - basic_ostream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + basic_ostream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } @@ -1625,8 +1625,8 @@ template inline basic_fstream<_CharT, _Traits>::basic_fstream(basic_fstream&& __rhs) - : basic_iostream(_VSTD::move(__rhs)), - __sb_(_VSTD::move(__rhs.__sb_)) + : basic_iostream(std::move(__rhs)), + __sb_(std::move(__rhs.__sb_)) { this->set_rdbuf(&__sb_); } @@ -1636,8 +1636,8 @@ basic_fstream<_CharT, _Traits>& basic_fstream<_CharT, _Traits>::operator=(basic_fstream&& __rhs) { - basic_iostream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + basic_iostream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } diff --git a/libcxx/include/future b/libcxx/include/future --- a/libcxx/include/future +++ b/libcxx/include/future @@ -525,7 +525,7 @@ throw future_error(make_error_code(_Ev)); #else ((void)_Ev); - _VSTD::abort(); + std::abort(); #endif } @@ -656,7 +656,7 @@ unique_lock __lk(this->__mut_); if (this->__has_value()) __throw_future_error(future_errc::promise_already_satisfied); - ::new ((void*)&__value_) _Rp(_VSTD::forward<_Arg>(__arg)); + ::new ((void*)&__value_) _Rp(std::forward<_Arg>(__arg)); this->__state_ |= base::__constructed | base::ready; __cv_.notify_all(); } @@ -669,7 +669,7 @@ unique_lock __lk(this->__mut_); if (this->__has_value()) __throw_future_error(future_errc::promise_already_satisfied); - ::new ((void*)&__value_) _Rp(_VSTD::forward<_Arg>(__arg)); + ::new ((void*)&__value_) _Rp(std::forward<_Arg>(__arg)); this->__state_ |= base::__constructed; __thread_local_data()->__make_ready_at_thread_exit(this); } @@ -682,7 +682,7 @@ this->__sub_wait(__lk); if (this->__exception_ != nullptr) rethrow_exception(this->__exception_); - return _VSTD::move(*reinterpret_cast<_Rp*>(&__value_)); + return std::move(*reinterpret_cast<_Rp*>(&__value_)); } template @@ -728,7 +728,7 @@ unique_lock __lk(this->__mut_); if (this->__has_value()) __throw_future_error(future_errc::promise_already_satisfied); - __value_ = _VSTD::addressof(__arg); + __value_ = std::addressof(__arg); this->__state_ |= base::__constructed | base::ready; __cv_.notify_all(); } @@ -740,7 +740,7 @@ unique_lock __lk(this->__mut_); if (this->__has_value()) __throw_future_error(future_errc::promise_already_satisfied); - __value_ = _VSTD::addressof(__arg); + __value_ = std::addressof(__arg); this->__state_ |= base::__constructed; __thread_local_data()->__make_ready_at_thread_exit(this); } @@ -775,7 +775,7 @@ __assoc_state_alloc<_Rp, _Alloc>::__on_zero_shared() _NOEXCEPT { if (this->__state_ & base::__constructed) - reinterpret_cast<_Rp*>(_VSTD::addressof(this->__value_))->~_Rp(); + reinterpret_cast<_Rp*>(std::addressof(this->__value_))->~_Rp(); typedef typename __allocator_traits_rebind<_Alloc, __assoc_state_alloc>::type _Al; typedef allocator_traits<_Al> _ATraits; typedef pointer_traits _PTraits; @@ -854,7 +854,7 @@ template inline __deferred_assoc_state<_Rp, _Fp>::__deferred_assoc_state(_Fp&& __f) - : __func_(_VSTD::forward<_Fp>(__f)) + : __func_(std::forward<_Fp>(__f)) { this->__set_deferred(); } @@ -895,7 +895,7 @@ template inline __deferred_assoc_state::__deferred_assoc_state(_Fp&& __f) - : __func_(_VSTD::forward<_Fp>(__f)) + : __func_(std::forward<_Fp>(__f)) { this->__set_deferred(); } @@ -938,7 +938,7 @@ template inline __async_assoc_state<_Rp, _Fp>::__async_assoc_state(_Fp&& __f) - : __func_(_VSTD::forward<_Fp>(__f)) + : __func_(std::forward<_Fp>(__f)) { } @@ -987,7 +987,7 @@ template inline __async_assoc_state::__async_assoc_state(_Fp&& __f) - : __func_(_VSTD::forward<_Fp>(__f)) + : __func_(std::forward<_Fp>(__f)) { } @@ -1059,7 +1059,7 @@ _LIBCPP_INLINE_VISIBILITY future& operator=(future&& __rhs) _NOEXCEPT { - future(_VSTD::move(__rhs)).swap(*this); + future(std::move(__rhs)).swap(*this); return *this; } @@ -1071,7 +1071,7 @@ _Rp get(); _LIBCPP_INLINE_VISIBILITY - void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(future& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // functions to check state _LIBCPP_INLINE_VISIBILITY @@ -1146,7 +1146,7 @@ _LIBCPP_INLINE_VISIBILITY future& operator=(future&& __rhs) _NOEXCEPT { - future(_VSTD::move(__rhs)).swap(*this); + future(std::move(__rhs)).swap(*this); return *this; } @@ -1158,7 +1158,7 @@ _Rp& get(); _LIBCPP_INLINE_VISIBILITY - void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(future& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // functions to check state _LIBCPP_INLINE_VISIBILITY @@ -1228,7 +1228,7 @@ _LIBCPP_INLINE_VISIBILITY future& operator=(future&& __rhs) _NOEXCEPT { - future(_VSTD::move(__rhs)).swap(*this); + future(std::move(__rhs)).swap(*this); return *this; } @@ -1240,7 +1240,7 @@ void get(); _LIBCPP_INLINE_VISIBILITY - void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(future& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // functions to check state _LIBCPP_INLINE_VISIBILITY @@ -1295,13 +1295,13 @@ _LIBCPP_INLINE_VISIBILITY promise& operator=(promise&& __rhs) _NOEXCEPT { - promise(_VSTD::move(__rhs)).swap(*this); + promise(std::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; _LIBCPP_INLINE_VISIBILITY - void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(promise& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // retrieving the result future<_Rp> get_future(); @@ -1332,8 +1332,8 @@ typedef __allocator_destructor<_A2> _D2; _A2 __a(__a0); unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1)); - ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0); - __state_ = _VSTD::addressof(*__hold.release()); + ::new ((void*)std::addressof(*__hold.get())) _State(__a0); + __state_ = std::addressof(*__hold.release()); } template @@ -1373,7 +1373,7 @@ { if (__state_ == nullptr) __throw_future_error(future_errc::no_state); - __state_->set_value(_VSTD::move(__r)); + __state_->set_value(std::move(__r)); } template @@ -1401,7 +1401,7 @@ { if (__state_ == nullptr) __throw_future_error(future_errc::no_state); - __state_->set_value_at_thread_exit(_VSTD::move(__r)); + __state_->set_value_at_thread_exit(std::move(__r)); } template @@ -1440,13 +1440,13 @@ _LIBCPP_INLINE_VISIBILITY promise& operator=(promise&& __rhs) _NOEXCEPT { - promise(_VSTD::move(__rhs)).swap(*this); + promise(std::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; _LIBCPP_INLINE_VISIBILITY - void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(promise& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // retrieving the result future<_Rp&> get_future(); @@ -1475,8 +1475,8 @@ typedef __allocator_destructor<_A2> _D2; _A2 __a(__a0); unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1)); - ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0); - __state_ = _VSTD::addressof(*__hold.release()); + ::new ((void*)std::addressof(*__hold.get())) _State(__a0); + __state_ = std::addressof(*__hold.release()); } template @@ -1566,13 +1566,13 @@ _LIBCPP_INLINE_VISIBILITY promise& operator=(promise&& __rhs) _NOEXCEPT { - promise(_VSTD::move(__rhs)).swap(*this); + promise(std::move(__rhs)).swap(*this); return *this; } promise& operator=(const promise& __rhs) = delete; _LIBCPP_INLINE_VISIBILITY - void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(promise& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // retrieving the result future get_future(); @@ -1594,8 +1594,8 @@ typedef __allocator_destructor<_A2> _D2; _A2 __a(__a0); unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1)); - ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0); - __state_ = _VSTD::addressof(*__hold.release()); + ::new ((void*)std::addressof(*__hold.get())) _State(__a0); + __state_ = std::addressof(*__hold.release()); } template @@ -1641,13 +1641,13 @@ _LIBCPP_INLINE_VISIBILITY explicit __packaged_task_func(const _Fp& __f) : __f_(__f, __default_init_tag()) {} _LIBCPP_INLINE_VISIBILITY - explicit __packaged_task_func(_Fp&& __f) : __f_(_VSTD::move(__f), __default_init_tag()) {} + explicit __packaged_task_func(_Fp&& __f) : __f_(std::move(__f), __default_init_tag()) {} _LIBCPP_INLINE_VISIBILITY __packaged_task_func(const _Fp& __f, const _Alloc& __a) : __f_(__f, __a) {} _LIBCPP_INLINE_VISIBILITY __packaged_task_func(_Fp&& __f, const _Alloc& __a) - : __f_(_VSTD::move(__f), __a) {} + : __f_(std::move(__f), __a) {} virtual void __move_to(__packaged_task_base<_Rp(_ArgTypes...)>*) _NOEXCEPT; virtual void destroy(); virtual void destroy_deallocate(); @@ -1659,7 +1659,7 @@ __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__move_to( __packaged_task_base<_Rp(_ArgTypes...)>* __p) _NOEXCEPT { - ::new ((void*)__p) __packaged_task_func(_VSTD::move(__f_.first()), _VSTD::move(__f_.second())); + ::new ((void*)__p) __packaged_task_func(std::move(__f_.first()), std::move(__f_.second())); } template @@ -1685,7 +1685,7 @@ _Rp __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg) { - return _VSTD::__invoke(__f_.first(), _VSTD::forward<_ArgTypes>(__arg)...); + return std::__invoke(__f_.first(), std::forward<_ArgTypes>(__arg)...); } template class __packaged_task_function; @@ -1752,7 +1752,7 @@ typedef __packaged_task_func<_FR, allocator<_FR>, _Rp(_ArgTypes...)> _FF; if (sizeof(_FF) <= sizeof(__buf_)) { - ::new ((void*)&__buf_) _FF(_VSTD::forward<_Fp>(__f)); + ::new ((void*)&__buf_) _FF(std::forward<_Fp>(__f)); __f_ = (__base*)&__buf_; } else @@ -1761,7 +1761,7 @@ _Ap __a; typedef __allocator_destructor<_Ap> _Dp; unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); - ::new ((void*)__hold.get()) _FF(_VSTD::forward<_Fp>(__f), allocator<_FR>(__a)); + ::new ((void*)__hold.get()) _FF(std::forward<_Fp>(__f), allocator<_FR>(__a)); __f_ = __hold.release(); } } @@ -1777,7 +1777,7 @@ if (sizeof(_FF) <= sizeof(__buf_)) { __f_ = (__base*)&__buf_; - ::new ((void*)__f_) _FF(_VSTD::forward<_Fp>(__f)); + ::new ((void*)__f_) _FF(std::forward<_Fp>(__f)); } else { @@ -1785,9 +1785,9 @@ _Ap __a(__a0); typedef __allocator_destructor<_Ap> _Dp; unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1)); - ::new ((void*)_VSTD::addressof(*__hold.get())) - _FF(_VSTD::forward<_Fp>(__f), _Alloc(__a)); - __f_ = _VSTD::addressof(*__hold.release()); + ::new ((void*)std::addressof(*__hold.get())) + _FF(std::forward<_Fp>(__f), _Alloc(__a)); + __f_ = std::addressof(*__hold.release()); } } @@ -1859,7 +1859,7 @@ __f_ = (__base*)&__buf_; } else - _VSTD::swap(__f_, __f.__f_); + std::swap(__f_, __f.__f_); } template @@ -1867,7 +1867,7 @@ _Rp __packaged_task_function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) const { - return (*__f_)(_VSTD::forward<_ArgTypes>(__arg)...); + return (*__f_)(std::forward<_ArgTypes>(__arg)...); } template @@ -1894,7 +1894,7 @@ >::type > _LIBCPP_INLINE_VISIBILITY - explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {} + explicit packaged_task(_Fp&& __f) : __f_(std::forward<_Fp>(__f)) {} template _LIBCPP_INLINE_VISIBILITY packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f) - : __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)), + : __f_(allocator_arg, __a, std::forward<_Fp>(__f)), __p_(allocator_arg, __a) {} // ~packaged_task() = default; @@ -1917,12 +1917,12 @@ // move support _LIBCPP_INLINE_VISIBILITY packaged_task(packaged_task&& __other) _NOEXCEPT - : __f_(_VSTD::move(__other.__f_)), __p_(_VSTD::move(__other.__p_)) {} + : __f_(std::move(__other.__f_)), __p_(std::move(__other.__p_)) {} _LIBCPP_INLINE_VISIBILITY packaged_task& operator=(packaged_task&& __other) _NOEXCEPT { - __f_ = _VSTD::move(__other.__f_); - __p_ = _VSTD::move(__other.__p_); + __f_ = std::move(__other.__f_); + __p_ = std::move(__other.__p_); return *this; } _LIBCPP_INLINE_VISIBILITY @@ -1958,7 +1958,7 @@ try { #endif // _LIBCPP_NO_EXCEPTIONS - __p_.set_value(__f_(_VSTD::forward<_ArgTypes>(__args)...)); + __p_.set_value(__f_(std::forward<_ArgTypes>(__args)...)); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) @@ -1980,7 +1980,7 @@ try { #endif // _LIBCPP_NO_EXCEPTIONS - __p_.set_value_at_thread_exit(__f_(_VSTD::forward<_ArgTypes>(__args)...)); + __p_.set_value_at_thread_exit(__f_(std::forward<_ArgTypes>(__args)...)); #ifndef _LIBCPP_NO_EXCEPTIONS } catch (...) @@ -2023,7 +2023,7 @@ >::type > _LIBCPP_INLINE_VISIBILITY - explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {} + explicit packaged_task(_Fp&& __f) : __f_(std::forward<_Fp>(__f)) {} template _LIBCPP_INLINE_VISIBILITY packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f) - : __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)), + : __f_(allocator_arg, __a, std::forward<_Fp>(__f)), __p_(allocator_arg, __a) {} // ~packaged_task() = default; @@ -2046,12 +2046,12 @@ // move support _LIBCPP_INLINE_VISIBILITY packaged_task(packaged_task&& __other) _NOEXCEPT - : __f_(_VSTD::move(__other.__f_)), __p_(_VSTD::move(__other.__p_)) {} + : __f_(std::move(__other.__f_)), __p_(std::move(__other.__p_)) {} _LIBCPP_INLINE_VISIBILITY packaged_task& operator=(packaged_task&& __other) _NOEXCEPT { - __f_ = _VSTD::move(__other.__f_); - __p_ = _VSTD::move(__other.__p_); + __f_ = std::move(__other.__f_); + __p_ = std::move(__other.__p_); return *this; } _LIBCPP_INLINE_VISIBILITY @@ -2087,7 +2087,7 @@ try { #endif // _LIBCPP_NO_EXCEPTIONS - __f_(_VSTD::forward<_ArgTypes>(__args)...); + __f_(std::forward<_ArgTypes>(__args)...); __p_.set_value(); #ifndef _LIBCPP_NO_EXCEPTIONS } @@ -2110,7 +2110,7 @@ try { #endif // _LIBCPP_NO_EXCEPTIONS - __f_(_VSTD::forward<_ArgTypes>(__args)...); + __f_(std::forward<_ArgTypes>(__args)...); __p_.set_value_at_thread_exit(); #ifndef _LIBCPP_NO_EXCEPTIONS } @@ -2147,7 +2147,7 @@ __make_deferred_assoc_state(_Fp&& __f) { unique_ptr<__deferred_assoc_state<_Rp, _Fp>, __release_shared_count> - __h(new __deferred_assoc_state<_Rp, _Fp>(_VSTD::forward<_Fp>(__f))); + __h(new __deferred_assoc_state<_Rp, _Fp>(std::forward<_Fp>(__f))); return future<_Rp>(__h.get()); } @@ -2156,8 +2156,8 @@ __make_async_assoc_state(_Fp&& __f) { unique_ptr<__async_assoc_state<_Rp, _Fp>, __release_shared_count> - __h(new __async_assoc_state<_Rp, _Fp>(_VSTD::forward<_Fp>(__f))); - _VSTD::thread(&__async_assoc_state<_Rp, _Fp>::__execute, __h.get()).detach(); + __h(new __async_assoc_state<_Rp, _Fp>(std::forward<_Fp>(__f))); + std::thread(&__async_assoc_state<_Rp, _Fp>::__execute, __h.get()).detach(); return future<_Rp>(__h.get()); } @@ -2173,10 +2173,10 @@ _LIBCPP_INLINE_VISIBILITY explicit __async_func(_Fp&& __f, _Args&&... __args) - : __f_(_VSTD::move(__f), _VSTD::move(__args)...) {} + : __f_(std::move(__f), std::move(__args)...) {} _LIBCPP_INLINE_VISIBILITY - __async_func(__async_func&& __f) : __f_(_VSTD::move(__f.__f_)) {} + __async_func(__async_func&& __f) : __f_(std::move(__f.__f_)) {} _Rp operator()() { @@ -2188,7 +2188,7 @@ _Rp __execute(__tuple_indices<_Indices...>) { - return _VSTD::__invoke(_VSTD::move(_VSTD::get<0>(__f_)), _VSTD::move(_VSTD::get<_Indices>(__f_))...); + return std::__invoke(std::move(std::get<0>(__f_)), std::move(std::get<_Indices>(__f_))...); } }; @@ -2208,16 +2208,16 @@ { #endif if (__does_policy_contain(__policy, launch::async)) - return _VSTD::__make_async_assoc_state<_Rp>(_BF(_LIBCPP_AUTO_CAST(_VSTD::forward<_Fp>(__f)), - _LIBCPP_AUTO_CAST(_VSTD::forward<_Args>(__args))...)); + return std::__make_async_assoc_state<_Rp>(_BF(_LIBCPP_AUTO_CAST(std::forward<_Fp>(__f)), + _LIBCPP_AUTO_CAST(std::forward<_Args>(__args))...)); #ifndef _LIBCPP_NO_EXCEPTIONS } catch ( ... ) { if (__policy == launch::async) throw ; } #endif if (__does_policy_contain(__policy, launch::deferred)) - return _VSTD::__make_deferred_assoc_state<_Rp>(_BF(_LIBCPP_AUTO_CAST(_VSTD::forward<_Fp>(__f)), - _LIBCPP_AUTO_CAST(_VSTD::forward<_Args>(__args))...)); + return std::__make_deferred_assoc_state<_Rp>(_BF(_LIBCPP_AUTO_CAST(std::forward<_Fp>(__f)), + _LIBCPP_AUTO_CAST(std::forward<_Args>(__args))...)); return future<_Rp>{}; } @@ -2226,8 +2226,8 @@ future::type, typename decay<_Args>::type...>::type> async(_Fp&& __f, _Args&&... __args) { - return _VSTD::async(launch::any, _VSTD::forward<_Fp>(__f), - _VSTD::forward<_Args>(__args)...); + return std::async(launch::any, std::forward<_Fp>(__f), + std::forward<_Args>(__args)...); } #endif // C++03 @@ -2256,7 +2256,7 @@ _LIBCPP_INLINE_VISIBILITY shared_future& operator=(shared_future&& __rhs) _NOEXCEPT { - shared_future(_VSTD::move(__rhs)).swap(*this); + shared_future(std::move(__rhs)).swap(*this); return *this; } @@ -2265,7 +2265,7 @@ const _Rp& get() const {return __state_->copy();} _LIBCPP_INLINE_VISIBILITY - void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(shared_future& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // functions to check state _LIBCPP_INLINE_VISIBILITY @@ -2326,7 +2326,7 @@ _LIBCPP_INLINE_VISIBILITY shared_future& operator=(shared_future&& __rhs) _NOEXCEPT { - shared_future(_VSTD::move(__rhs)).swap(*this); + shared_future(std::move(__rhs)).swap(*this); return *this; } @@ -2335,7 +2335,7 @@ _Rp& get() const {return __state_->copy();} _LIBCPP_INLINE_VISIBILITY - void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(shared_future& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // functions to check state _LIBCPP_INLINE_VISIBILITY @@ -2396,7 +2396,7 @@ _LIBCPP_INLINE_VISIBILITY shared_future& operator=(shared_future&& __rhs) _NOEXCEPT { - shared_future(_VSTD::move(__rhs)).swap(*this); + shared_future(std::move(__rhs)).swap(*this); return *this; } @@ -2405,7 +2405,7 @@ void get() const {__state_->copy();} _LIBCPP_INLINE_VISIBILITY - void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);} + void swap(shared_future& __rhs) _NOEXCEPT {std::swap(__state_, __rhs.__state_);} // functions to check state _LIBCPP_INLINE_VISIBILITY @@ -2438,7 +2438,7 @@ shared_future<_Rp> future<_Rp>::share() _NOEXCEPT { - return shared_future<_Rp>(_VSTD::move(*this)); + return shared_future<_Rp>(std::move(*this)); } template @@ -2446,14 +2446,14 @@ shared_future<_Rp&> future<_Rp&>::share() _NOEXCEPT { - return shared_future<_Rp&>(_VSTD::move(*this)); + return shared_future<_Rp&>(std::move(*this)); } inline shared_future future::share() _NOEXCEPT { - return shared_future(_VSTD::move(*this)); + return shared_future(std::move(*this)); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip --- a/libcxx/include/iomanip +++ b/libcxx/include/iomanip @@ -527,7 +527,7 @@ __str.push_back(*__first); } __str.push_back(__delim); - return _VSTD::__put_character_sequence(__os, __str.data(), __str.size()); + return std::__put_character_sequence(__os, __str.data(), __str.size()); } template diff --git a/libcxx/include/ios b/libcxx/include/ios --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -274,8 +274,8 @@ typedef openmode open_mode; typedef seekdir seek_dir; - typedef _VSTD::streamoff streamoff; - typedef _VSTD::streampos streampos; + typedef std::streamoff streamoff; + typedef std::streampos streampos; #endif class _LIBCPP_TYPE_VIS Init; @@ -440,7 +440,7 @@ throw ios_base::failure(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } @@ -818,8 +818,8 @@ basic_ios<_CharT, _Traits>::swap(basic_ios& __rhs) _NOEXCEPT { ios_base::swap(__rhs); - _VSTD::swap(__tie_, __rhs.__tie_); - _VSTD::swap(__fill_, __rhs.__fill_); + std::swap(__tie_, __rhs.__tie_); + std::swap(__fill_, __rhs.__fill_); } template diff --git a/libcxx/include/istream b/libcxx/include/istream --- a/libcxx/include/istream +++ b/libcxx/include/istream @@ -201,7 +201,7 @@ inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 void swap(basic_istream& __rhs) { - _VSTD::swap(__gc_, __rhs.__gc_); + std::swap(__gc_, __rhs.__gc_); basic_ios::swap(__rhs); } @@ -386,77 +386,77 @@ basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(unsigned short& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(unsigned int& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(long& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(unsigned long& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(long long& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(unsigned long long& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(float& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(double& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(long double& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(bool& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(void*& __n) { - return _VSTD::__input_arithmetic(*this, __n); + return std::__input_arithmetic(*this, __n); } template @@ -510,14 +510,14 @@ basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(short& __n) { - return _VSTD::__input_arithmetic_with_numeric_limits(*this, __n); + return std::__input_arithmetic_with_numeric_limits(*this, __n); } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>>(int& __n) { - return _VSTD::__input_arithmetic_with_numeric_limits(*this, __n); + return std::__input_arithmetic_with_numeric_limits(*this, __n); } template @@ -579,8 +579,8 @@ { size_t __n = _Np; if (__is.width() > 0) - __n = _VSTD::min(size_t(__is.width()), _Np); - return _VSTD::__input_c_string(__is, __buf, __n); + __n = std::min(size_t(__is.width()), _Np); + return std::__input_c_string(__is, __buf, __n); } template @@ -609,7 +609,7 @@ streamsize __n = __is.width(); if (__n <= 0) __n = numeric_limits::max() / sizeof(_CharT) - 1; - return _VSTD::__input_c_string(__is, __s, size_t(__n)); + return std::__input_c_string(__is, __s, size_t(__n)); } template @@ -1093,7 +1093,7 @@ case 0: break; default: - __n = _VSTD::min(__c, __n); + __n = std::min(__c, __n); __gc_ = this->rdbuf()->sgetn(__s, __n); if (__gc_ != __n) __state |= ios_base::failbit | ios_base::eofbit; @@ -1383,8 +1383,8 @@ _LIBCPP_INLINE_VISIBILITY _Stream&& operator>>(_Stream&& __is, _Tp&& __x) { - __is >> _VSTD::forward<_Tp>(__x); - return _VSTD::move(__is); + __is >> std::forward<_Tp>(__x); + return std::move(__is); } template @@ -1422,7 +1422,7 @@ template basic_iostream<_CharT, _Traits>::basic_iostream(basic_iostream&& __rhs) - : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs)) + : basic_istream<_CharT, _Traits>(std::move(__rhs)) { } diff --git a/libcxx/include/limits b/libcxx/include/limits --- a/libcxx/include/limits +++ b/libcxx/include/limits @@ -237,7 +237,7 @@ static _LIBCPP_CONSTEXPR const bool is_iec559 = false; static _LIBCPP_CONSTEXPR const bool is_bounded = true; - static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value; + static _LIBCPP_CONSTEXPR const bool is_modulo = !std::is_signed<_Tp>::value; #if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \ defined(__wasm__) diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -319,7 +319,7 @@ _LIBCPP_INLINE_VISIBILITY __list_iterator() _NOEXCEPT : __ptr_(nullptr) { - _VSTD::__debug_db_insert_i(this); + std::__debug_db_insert_i(this); } #if _LIBCPP_DEBUG_LEVEL == 2 @@ -328,7 +328,7 @@ __list_iterator(const __list_iterator& __p) : __ptr_(__p.__ptr_) { - __get_db()->__iterator_copy(this, _VSTD::addressof(__p)); + __get_db()->__iterator_copy(this, std::addressof(__p)); } _LIBCPP_INLINE_VISIBILITY @@ -340,9 +340,9 @@ _LIBCPP_INLINE_VISIBILITY __list_iterator& operator=(const __list_iterator& __p) { - if (this != _VSTD::addressof(__p)) + if (this != std::addressof(__p)) { - __get_db()->__iterator_copy(this, _VSTD::addressof(__p)); + __get_db()->__iterator_copy(this, std::addressof(__p)); __ptr_ = __p.__ptr_; } return *this; @@ -429,14 +429,14 @@ _LIBCPP_INLINE_VISIBILITY __list_const_iterator() _NOEXCEPT : __ptr_(nullptr) { - _VSTD::__debug_db_insert_i(this); + std::__debug_db_insert_i(this); } _LIBCPP_INLINE_VISIBILITY __list_const_iterator(const __list_iterator<_Tp, _VoidPtr>& __p) _NOEXCEPT : __ptr_(__p.__ptr_) { #if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->__iterator_copy(this, _VSTD::addressof(__p)); + __get_db()->__iterator_copy(this, std::addressof(__p)); #endif } @@ -446,7 +446,7 @@ __list_const_iterator(const __list_const_iterator& __p) : __ptr_(__p.__ptr_) { - __get_db()->__iterator_copy(this, _VSTD::addressof(__p)); + __get_db()->__iterator_copy(this, std::addressof(__p)); } _LIBCPP_INLINE_VISIBILITY @@ -458,9 +458,9 @@ _LIBCPP_INLINE_VISIBILITY __list_const_iterator& operator=(const __list_const_iterator& __p) { - if (this != _VSTD::addressof(__p)) + if (this != std::addressof(__p)) { - __get_db()->__iterator_copy(this, _VSTD::addressof(__p)); + __get_db()->__iterator_copy(this, std::addressof(__p)); __ptr_ = __p.__ptr_; } return *this; @@ -665,7 +665,7 @@ void __move_assign_alloc(__list_imp& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value) { - __node_alloc() = _VSTD::move(__c.__node_alloc()); + __node_alloc() = std::move(__c.__node_alloc()); } _LIBCPP_INLINE_VISIBILITY @@ -714,7 +714,7 @@ #ifndef _LIBCPP_CXX03_LANG template inline __list_imp<_Tp, _Alloc>::__list_imp(__node_allocator&& __a) _NOEXCEPT - : __size_alloc_(0, _VSTD::move(__a)) {} + : __size_alloc_(0, std::move(__a)) {} #endif template @@ -740,7 +740,7 @@ { __node_pointer __np = __f->__as_node(); __f = __f->__next_; - __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_)); + __node_alloc_traits::destroy(__na, std::addressof(__np->__value_)); __node_alloc_traits::deallocate(__na, __np, 1); } __invalidate_all_iterators(); @@ -761,8 +761,8 @@ this->__node_alloc() == __c.__node_alloc(), "list::swap: Either propagate_on_container_swap must be true" " or the allocators must compare equal"); - using _VSTD::swap; - _VSTD::__swap_allocator(__node_alloc(), __c.__node_alloc()); + using std::swap; + std::__swap_allocator(__node_alloc(), __c.__node_alloc()); swap(__sz(), __c.__sz()); swap(__end_, __c.__end_); if (__sz() == 0) @@ -777,10 +777,10 @@ #if _LIBCPP_DEBUG_LEVEL == 2 __libcpp_db* __db = __get_db(); __c_node* __cn1 = __db->__find_c_and_lock(this); - __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c)); - _VSTD::swap(__cn1->beg_, __cn2->beg_); - _VSTD::swap(__cn1->end_, __cn2->end_); - _VSTD::swap(__cn1->cap_, __cn2->cap_); + __c_node* __cn2 = __db->__find_c(std::addressof(__c)); + std::swap(__cn1->beg_, __cn2->beg_); + std::swap(__cn1->end_, __cn2->end_); + std::swap(__cn1->cap_, __cn2->cap_); for (__i_node** __p = __cn1->end_; __p != __cn1->beg_;) { --__p; @@ -789,7 +789,7 @@ { __cn2->__add(*__p); if (--__cn1->end_ != __p) - _VSTD::memmove(__p, __p+1, (__cn1->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__cn1->end_ - __p)*sizeof(__i_node*)); } else (*__p)->__c_ = __cn1; @@ -802,7 +802,7 @@ { __cn1->__add(*__p); if (--__cn2->end_ != __p) - _VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*)); } else (*__p)->__c_ = __cn2; @@ -837,8 +837,8 @@ typedef typename base::difference_type difference_type; typedef typename base::iterator iterator; typedef typename base::const_iterator const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; #if _LIBCPP_STD_VER > 17 typedef size_type __remove_return_type; #else @@ -849,12 +849,12 @@ list() _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } _LIBCPP_INLINE_VISIBILITY explicit list(const allocator_type& __a) : base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } explicit list(size_type __n); #if _LIBCPP_STD_VER > 11 @@ -864,7 +864,7 @@ template ::value> > list(size_type __n, const value_type& __x, const allocator_type& __a) : base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __n > 0; --__n) push_back(__x); } @@ -919,7 +919,7 @@ _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT { - return _VSTD::min( + return std::min( base::__node_alloc_max_size(), numeric_limits::max()); } @@ -1013,7 +1013,7 @@ #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY - void __emplace_back(_Arg&& __arg) { emplace_back(_VSTD::forward<_Arg>(__arg)); } + void __emplace_back(_Arg&& __arg) { emplace_back(std::forward<_Arg>(__arg)); } #else _LIBCPP_INLINE_VISIBILITY void __emplace_back(value_type const& __arg) { push_back(__arg); } @@ -1184,14 +1184,14 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::__iterator(size_type __n) { - return __n <= base::__sz() / 2 ? _VSTD::next(begin(), __n) - : _VSTD::prev(end(), base::__sz() - __n); + return __n <= base::__sz() / 2 ? std::next(begin(), __n) + : std::prev(end(), base::__sz() - __n); } template list<_Tp, _Alloc>::list(size_type __n) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __n > 0; --__n) #ifndef _LIBCPP_CXX03_LANG emplace_back(); @@ -1204,7 +1204,7 @@ template list<_Tp, _Alloc>::list(size_type __n, const allocator_type& __a) : base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __n > 0; --__n) emplace_back(); } @@ -1213,7 +1213,7 @@ template list<_Tp, _Alloc>::list(size_type __n, const value_type& __x) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __n > 0; --__n) push_back(__x); } @@ -1223,7 +1223,7 @@ list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, typename enable_if<__is_cpp17_input_iterator<_InpIter>::value>::type*) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __f != __l; ++__f) __emplace_back(*__f); } @@ -1234,7 +1234,7 @@ typename enable_if<__is_cpp17_input_iterator<_InpIter>::value>::type*) : base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __f != __l; ++__f) __emplace_back(*__f); } @@ -1243,7 +1243,7 @@ list<_Tp, _Alloc>::list(const list& __c) : base(__node_alloc_traits::select_on_container_copy_construction( __c.__node_alloc())) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (const_iterator __i = __c.begin(), __e = __c.end(); __i != __e; ++__i) push_back(*__i); } @@ -1252,7 +1252,7 @@ list<_Tp, _Alloc>::list(const list& __c, const __identity_t& __a) : base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (const_iterator __i = __c.begin(), __e = __c.end(); __i != __e; ++__i) push_back(*__i); } @@ -1263,7 +1263,7 @@ list<_Tp, _Alloc>::list(initializer_list __il, const allocator_type& __a) : base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (typename initializer_list::const_iterator __i = __il.begin(), __e = __il.end(); __i != __e; ++__i) push_back(*__i); @@ -1272,7 +1272,7 @@ template list<_Tp, _Alloc>::list(initializer_list __il) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (typename initializer_list::const_iterator __i = __il.begin(), __e = __il.end(); __i != __e; ++__i) push_back(*__i); @@ -1281,8 +1281,8 @@ template inline list<_Tp, _Alloc>::list(list&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value) - : base(_VSTD::move(__c.__node_alloc())) { - _VSTD::__debug_db_insert_c(this); + : base(std::move(__c.__node_alloc())) { + std::__debug_db_insert_c(this); splice(end(), __c); } @@ -1291,7 +1291,7 @@ list<_Tp, _Alloc>::list(list&& __c, const __identity_t& __a) : base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__a == __c.get_allocator()) splice(end(), __c); else @@ -1344,7 +1344,7 @@ list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(const list& __c) { - if (this != _VSTD::addressof(__c)) + if (this != std::addressof(__c)) { base::__copy_assign_alloc(__c); assign(__c.begin(), __c.end()); @@ -1400,11 +1400,11 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, const value_type& __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::insert(iterator, x) called with an iterator not referring to this list"); __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), __x); __link_nodes(__p.__ptr_, __hold->__as_link(), __hold->__as_link()); ++base::__sz(); #if _LIBCPP_DEBUG_LEVEL == 2 @@ -1418,7 +1418,7 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::insert(iterator, n, x) called with an iterator not referring to this list"); #if _LIBCPP_DEBUG_LEVEL == 2 iterator __r(__p.__ptr_, this); @@ -1430,7 +1430,7 @@ size_type __ds = 0; __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), __x); ++__ds; #if _LIBCPP_DEBUG_LEVEL == 2 __r = iterator(__hold->__as_link(), this); @@ -1446,7 +1446,7 @@ for (--__n; __n != 0; --__n, (void) ++__e, ++__ds) { __hold.reset(__node_alloc_traits::allocate(__na, 1)); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), __x); __e.__ptr_->__next_ = __hold->__as_link(); __hold->__prev_ = __e.__ptr_; __hold.release(); @@ -1457,7 +1457,7 @@ { while (true) { - __node_alloc_traits::destroy(__na, _VSTD::addressof(*__e)); + __node_alloc_traits::destroy(__na, std::addressof(*__e)); __link_pointer __prev = __e.__ptr_->__prev_; __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1); if (__prev == 0) @@ -1483,7 +1483,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l, typename enable_if<__is_cpp17_input_iterator<_InpIter>::value>::type*) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::insert(iterator, range) called with an iterator not referring to this list"); #if _LIBCPP_DEBUG_LEVEL == 2 iterator __r(__p.__ptr_, this); @@ -1495,7 +1495,7 @@ size_type __ds = 0; __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), *__f); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), *__f); ++__ds; #if _LIBCPP_DEBUG_LEVEL == 2 __r = iterator(__hold.get()->__as_link(), this); @@ -1511,7 +1511,7 @@ for (++__f; __f != __l; ++__f, (void) ++__e, ++__ds) { __hold.reset(__node_alloc_traits::allocate(__na, 1)); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), *__f); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), *__f); __e.__ptr_->__next_ = __hold.get()->__as_link(); __hold->__prev_ = __e.__ptr_; __hold.release(); @@ -1522,7 +1522,7 @@ { while (true) { - __node_alloc_traits::destroy(__na, _VSTD::addressof(*__e)); + __node_alloc_traits::destroy(__na, std::addressof(*__e)); __link_pointer __prev = __e.__ptr_->__prev_; __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1); if (__prev == 0) @@ -1548,7 +1548,7 @@ { __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), __x); __link_pointer __nl = __hold->__as_link(); __link_nodes_at_front(__nl, __nl); ++base::__sz(); @@ -1561,7 +1561,7 @@ { __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), __x); __link_nodes_at_back(__hold.get()->__as_link(), __hold.get()->__as_link()); ++base::__sz(); __hold.release(); @@ -1575,7 +1575,7 @@ { __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x)); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), std::move(__x)); __link_nodes_at_front(__hold.get()->__as_link(), __hold.get()->__as_link()); ++base::__sz(); __hold.release(); @@ -1587,7 +1587,7 @@ { __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x)); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), std::move(__x)); __link_nodes_at_back(__hold.get()->__as_link(), __hold.get()->__as_link()); ++base::__sz(); __hold.release(); @@ -1604,7 +1604,7 @@ { __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), std::forward<_Args>(__args)...); __link_nodes_at_front(__hold.get()->__as_link(), __hold.get()->__as_link()); ++base::__sz(); #if _LIBCPP_STD_VER > 14 @@ -1625,7 +1625,7 @@ { __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), std::forward<_Args>(__args)...); __link_pointer __nl = __hold->__as_link(); __link_nodes_at_back(__nl, __nl); ++base::__sz(); @@ -1641,11 +1641,11 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::emplace(iterator, args...) called with an iterator not referring to this list"); __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), std::forward<_Args>(__args)...); __link_pointer __nl = __hold.get()->__as_link(); __link_nodes(__p.__ptr_, __nl, __nl); ++base::__sz(); @@ -1661,11 +1661,11 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::insert(iterator, x) called with an iterator not referring to this list"); __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x)); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), std::move(__x)); __link_pointer __nl = __hold->__as_link(); __link_nodes(__p.__ptr_, __nl, __nl); ++base::__sz(); @@ -1698,13 +1698,13 @@ { (*__p)->__c_ = nullptr; if (--__c->end_ != __p) - _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); } } __get_db()->unlock(); #endif __node_pointer __np = __n->__as_node(); - __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_)); + __node_alloc_traits::destroy(__na, std::addressof(__np->__value_)); __node_alloc_traits::deallocate(__na, __np, 1); } @@ -1727,13 +1727,13 @@ { (*__p)->__c_ = nullptr; if (--__c->end_ != __p) - _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); } } __get_db()->unlock(); #endif __node_pointer __np = __n->__as_node(); - __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_)); + __node_alloc_traits::destroy(__na, std::addressof(__np->__value_)); __node_alloc_traits::deallocate(__na, __np, 1); } @@ -1741,7 +1741,7 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __p) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::erase(iterator) called with an iterator not referring to this list"); _LIBCPP_ASSERT(__p != end(), "list::erase(iterator) called with a non-dereferenceable iterator"); @@ -1760,13 +1760,13 @@ { (*__ip)->__c_ = nullptr; if (--__c->end_ != __ip) - _VSTD::memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*)); + std::memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*)); } } __get_db()->unlock(); #endif __node_pointer __np = __n->__as_node(); - __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_)); + __node_alloc_traits::destroy(__na, std::addressof(__np->__value_)); __node_alloc_traits::deallocate(__na, __np, 1); #if _LIBCPP_DEBUG_LEVEL == 2 return iterator(__r, this); @@ -1779,9 +1779,9 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__f)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__f)) == this, "list::erase(iterator, iterator) called with an iterator not referring to this list"); - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__l)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__l)) == this, "list::erase(iterator, iterator) called with an iterator not referring to this list"); if (__f != __l) { @@ -1802,13 +1802,13 @@ { (*__p)->__c_ = nullptr; if (--__c->end_ != __p) - _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); } } __get_db()->unlock(); #endif __node_pointer __np = __n->__as_node(); - __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_)); + __node_alloc_traits::destroy(__na, std::addressof(__np->__value_)); __node_alloc_traits::deallocate(__na, __np, 1); } } @@ -1831,7 +1831,7 @@ size_type __ds = 0; __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_)); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_)); ++__ds; #if _LIBCPP_DEBUG_LEVEL == 2 iterator __r = iterator(__hold.release()->__as_link(), this); @@ -1846,7 +1846,7 @@ for (--__n; __n != 0; --__n, (void) ++__e, ++__ds) { __hold.reset(__node_alloc_traits::allocate(__na, 1)); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_)); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_)); __e.__ptr_->__next_ = __hold.get()->__as_link(); __hold->__prev_ = __e.__ptr_; __hold.release(); @@ -1857,7 +1857,7 @@ { while (true) { - __node_alloc_traits::destroy(__na, _VSTD::addressof(*__e)); + __node_alloc_traits::destroy(__na, std::addressof(*__e)); __link_pointer __prev = __e.__ptr_->__prev_; __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1); if (__prev == 0) @@ -1888,7 +1888,7 @@ size_type __ds = 0; __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), __x); ++__ds; __link_pointer __nl = __hold.release()->__as_link(); #if _LIBCPP_DEBUG_LEVEL == 2 @@ -1904,7 +1904,7 @@ for (--__n; __n != 0; --__n, (void) ++__e, ++__ds) { __hold.reset(__node_alloc_traits::allocate(__na, 1)); - __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); + __node_alloc_traits::construct(__na, std::addressof(__hold->__value_), __x); __e.__ptr_->__next_ = __hold.get()->__as_link(); __hold->__prev_ = __e.__ptr_; __hold.release(); @@ -1915,7 +1915,7 @@ { while (true) { - __node_alloc_traits::destroy(__na, _VSTD::addressof(*__e)); + __node_alloc_traits::destroy(__na, std::addressof(*__e)); __link_pointer __prev = __e.__ptr_->__prev_; __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1); if (__prev == 0) @@ -1938,9 +1938,9 @@ void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c) { - _LIBCPP_ASSERT(this != _VSTD::addressof(__c), + _LIBCPP_ASSERT(this != std::addressof(__c), "list::splice(iterator, list) called with this == &list"); - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::splice(iterator, list) called with an iterator not referring to this list"); if (!__c.empty()) { @@ -1951,10 +1951,10 @@ base::__sz() += __c.__sz(); __c.__sz() = 0; #if _LIBCPP_DEBUG_LEVEL == 2 - if (_VSTD::addressof(__c) != this) { + if (std::addressof(__c) != this) { __libcpp_db* __db = __get_db(); __c_node* __cn1 = __db->__find_c_and_lock(this); - __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c)); + __c_node* __cn2 = __db->__find_c(std::addressof(__c)); for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;) { --__ip; @@ -1964,7 +1964,7 @@ __cn1->__add(*__ip); (*__ip)->__c_ = __cn1; if (--__cn2->end_ != __ip) - _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); + std::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); } } __db->unlock(); @@ -1977,11 +1977,11 @@ void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::splice(iterator, list, iterator) called with the first iterator not referring to this list"); - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__i)) == _VSTD::addressof(__c), + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__i)) == std::addressof(__c), "list::splice(iterator, list, iterator) called with the second iterator not referring to the list argument"); - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(_VSTD::addressof(__i)), + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(std::addressof(__i)), "list::splice(iterator, list, iterator) called with the second iterator not dereferenceable"); if (__p.__ptr_ != __i.__ptr_ && __p.__ptr_ != __i.__ptr_->__next_) @@ -1992,10 +1992,10 @@ --__c.__sz(); ++base::__sz(); #if _LIBCPP_DEBUG_LEVEL == 2 - if (_VSTD::addressof(__c) != this) { + if (std::addressof(__c) != this) { __libcpp_db* __db = __get_db(); __c_node* __cn1 = __db->__find_c_and_lock(this); - __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c)); + __c_node* __cn2 = __db->__find_c(std::addressof(__c)); for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;) { --__ip; @@ -2005,7 +2005,7 @@ __cn1->__add(*__ip); (*__ip)->__c_ = __cn1; if (--__cn2->end_ != __ip) - _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); + std::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); } } __db->unlock(); @@ -2018,15 +2018,15 @@ void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this, "list::splice(iterator, list, iterator, iterator) called with first iterator not referring to this list"); - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__f)) == _VSTD::addressof(__c), + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__f)) == std::addressof(__c), "list::splice(iterator, list, iterator, iterator) called with second iterator not referring to the list argument"); - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__l)) == _VSTD::addressof(__c), + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__l)) == std::addressof(__c), "list::splice(iterator, list, iterator, iterator) called with third iterator not referring to the list argument"); #if _LIBCPP_DEBUG_LEVEL == 2 - if (this == _VSTD::addressof(__c)) + if (this == std::addressof(__c)) { for (const_iterator __i = __f; __i != __l; ++__i) _LIBCPP_DEBUG_ASSERT(__i != __p, @@ -2039,19 +2039,19 @@ __link_pointer __first = __f.__ptr_; --__l; __link_pointer __last = __l.__ptr_; - if (this != _VSTD::addressof(__c)) + if (this != std::addressof(__c)) { - size_type __s = _VSTD::distance(__f, __l) + 1; + size_type __s = std::distance(__f, __l) + 1; __c.__sz() -= __s; base::__sz() += __s; } base::__unlink_nodes(__first, __last); __link_nodes(__p.__ptr_, __first, __last); #if _LIBCPP_DEBUG_LEVEL == 2 - if (_VSTD::addressof(__c) != this) { + if (std::addressof(__c) != this) { __libcpp_db* __db = __get_db(); __c_node* __cn1 = __db->__find_c_and_lock(this); - __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c)); + __c_node* __cn2 = __db->__find_c(std::addressof(__c)); for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;) { --__ip; @@ -2064,7 +2064,7 @@ __cn1->__add(*__ip); (*__ip)->__c_ = __cn1; if (--__cn2->end_ != __ip) - _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); + std::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*)); } } } @@ -2083,7 +2083,7 @@ { if (*__i == __x) { - const_iterator __j = _VSTD::next(__i); + const_iterator __j = std::next(__i); for (; __j != __e && *__j == __x; ++__j) ; __deleted_nodes.splice(__deleted_nodes.end(), *this, __i, __j); @@ -2108,7 +2108,7 @@ { if (__pred(*__i)) { - iterator __j = _VSTD::next(__i); + iterator __j = std::next(__i); for (; __j != __e && __pred(*__j); ++__j) ; __deleted_nodes.splice(__deleted_nodes.end(), *this, __i, __j); @@ -2131,7 +2131,7 @@ list<_Tp, _Alloc> __deleted_nodes(get_allocator()); // collect the nodes we're removing for (iterator __i = begin(), __e = end(); __i != __e;) { - iterator __j = _VSTD::next(__i); + iterator __j = std::next(__i); for (; __j != __e && __binary_pred(*__i, *__j); ++__j) ; if (++__i != __j) { @@ -2156,7 +2156,7 @@ void list<_Tp, _Alloc>::merge(list& __c, _Comp __comp) { - if (this != _VSTD::addressof(__c)) + if (this != std::addressof(__c)) { iterator __f1 = begin(); iterator __e1 = end(); @@ -2167,7 +2167,7 @@ if (__comp(*__f2, *__f1)) { size_type __ds = 1; - iterator __m2 = _VSTD::next(__f2); + iterator __m2 = std::next(__f2); for (; __m2 != __e2 && __comp(*__m2, *__f1); ++__m2, (void) ++__ds) ; base::__sz() += __ds; @@ -2176,7 +2176,7 @@ __link_pointer __l = __m2.__ptr_->__prev_; __f2 = __m2; base::__unlink_nodes(__f, __l); - __m2 = _VSTD::next(__f1); + __m2 = std::next(__f1); __link_nodes(__f1.__ptr_, __f, __l); __f1 = __m2; } @@ -2187,7 +2187,7 @@ #if _LIBCPP_DEBUG_LEVEL == 2 __libcpp_db* __db = __get_db(); __c_node* __cn1 = __db->__find_c_and_lock(this); - __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c)); + __c_node* __cn2 = __db->__find_c(std::addressof(__c)); for (__i_node** __p = __cn2->end_; __p != __cn2->beg_;) { --__p; @@ -2197,7 +2197,7 @@ __cn1->__add(*__p); (*__p)->__c_ = __cn1; if (--__cn2->end_ != __p) - _VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*)); } } __db->unlock(); @@ -2243,12 +2243,12 @@ return __f1; } size_type __n2 = __n / 2; - iterator __e1 = _VSTD::next(__f1, __n2); + iterator __e1 = std::next(__f1, __n2); iterator __r = __f1 = __sort(__f1, __e1, __n2, __comp); iterator __f2 = __e1 = __sort(__e1, __e2, __n - __n2, __comp); if (__comp(*__f2, *__f1)) { - iterator __m2 = _VSTD::next(__f2); + iterator __m2 = std::next(__f2); for (; __m2 != __e2 && __comp(*__m2, *__f1); ++__m2) ; __link_pointer __f = __f2.__ptr_; @@ -2256,7 +2256,7 @@ __r = __f2; __e1 = __f2 = __m2; base::__unlink_nodes(__f, __l); - __m2 = _VSTD::next(__f1); + __m2 = std::next(__f1); __link_nodes(__f1.__ptr_, __f, __l); __f1 = __m2; } @@ -2266,7 +2266,7 @@ { if (__comp(*__f2, *__f1)) { - iterator __m2 = _VSTD::next(__f2); + iterator __m2 = std::next(__f2); for (; __m2 != __e2 && __comp(*__m2, *__f1); ++__m2) ; __link_pointer __f = __f2.__ptr_; @@ -2275,7 +2275,7 @@ __e1 = __m2; __f2 = __m2; base::__unlink_nodes(__f, __l); - __m2 = _VSTD::next(__f1); + __m2 = std::next(__f1); __link_nodes(__f1.__ptr_, __f, __l); __f1 = __m2; } @@ -2294,10 +2294,10 @@ iterator __e = end(); for (iterator __i = begin(); __i.__ptr_ != __e.__ptr_;) { - _VSTD::swap(__i.__ptr_->__prev_, __i.__ptr_->__next_); + std::swap(__i.__ptr_->__prev_, __i.__ptr_->__next_); __i.__ptr_ = __i.__ptr_->__prev_; } - _VSTD::swap(__e.__ptr_->__prev_, __e.__ptr_->__next_); + std::swap(__e.__ptr_->__prev_, __e.__ptr_->__next_); } } @@ -2305,7 +2305,7 @@ bool list<_Tp, _Alloc>::__invariants() const { - return size() == _VSTD::distance(begin(), end()); + return size() == std::distance(begin(), end()); } #if _LIBCPP_DEBUG_LEVEL == 2 @@ -2345,7 +2345,7 @@ bool operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { - return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template @@ -2353,7 +2353,7 @@ bool operator< (const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template @@ -2407,7 +2407,7 @@ template inline _LIBCPP_INLINE_VISIBILITY typename list<_Tp, _Allocator>::size_type erase(list<_Tp, _Allocator>& __c, const _Up& __v) { - return _VSTD::erase_if(__c, [&](auto& __elem) { return __elem == __v; }); + return std::erase_if(__c, [&](auto& __elem) { return __elem == __v; }); } #endif diff --git a/libcxx/include/locale b/libcxx/include/locale --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -266,7 +266,7 @@ bool __case_sensitive = true) { typedef typename iterator_traits<_InputIterator>::value_type _CharT; - size_t __nkw = static_cast(_VSTD::distance(__kb, __ke)); + size_t __nkw = static_cast(std::distance(__kb, __ke)); const unsigned char __doesnt_match = '\0'; const unsigned char __might_match = '\1'; const unsigned char __does_match = '\2'; @@ -890,7 +890,7 @@ const numpunct<_CharT>& __np = use_facet >(__iob.getloc()); typedef typename numpunct<_CharT>::string_type string_type; const string_type __names[2] = {__np.truename(), __np.falsename()}; - const string_type* __i = _VSTD::__scan_keyword(__b, __e, __names, __names+2, + const string_type* __i = std::__scan_keyword(__b, __e, __names, __names+2, __ct, __err); __v = __i == __names; return __b; @@ -1458,7 +1458,7 @@ typedef typename numpunct::string_type string_type; #if _LIBCPP_DEBUG_LEVEL == 2 string_type __tmp(__v ? __np.truename() : __np.falsename()); - string_type __nm = _VSTD::move(__tmp); + string_type __nm = std::move(__tmp); #else string_type __nm = __v ? __np.truename() : __np.falsename(); #endif @@ -1877,7 +1877,7 @@ { // Note: ignoring case comes from the POSIX strptime spec const string_type* __wk = this->__weeks(); - ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __wk, __wk+14, __ct, __err, false) - __wk; + ptrdiff_t __i = std::__scan_keyword(__b, __e, __wk, __wk+14, __ct, __err, false) - __wk; if (__i < 14) __w = __i % 7; } @@ -1891,7 +1891,7 @@ { // Note: ignoring case comes from the POSIX strptime spec const string_type* __month = this->__months(); - ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __month, __month+24, __ct, __err, false) - __month; + ptrdiff_t __i = std::__scan_keyword(__b, __e, __month, __month+24, __ct, __err, false) - __month; if (__i < 24) __m = __i % 12; } @@ -1903,7 +1903,7 @@ ios_base::iostate& __err, const ctype& __ct) const { - int __t = _VSTD::__get_up_to_n_digits(__b, __e, __err, __ct, 2); + int __t = std::__get_up_to_n_digits(__b, __e, __err, __ct, 2); if (!(__err & ios_base::failbit) && 1 <= __t && __t <= 31) __d = __t; else @@ -2063,7 +2063,7 @@ __err |= ios_base::failbit; return; } - ptrdiff_t __i = _VSTD::__scan_keyword(__b, __e, __ap, __ap+2, __ct, __err, false) - __ap; + ptrdiff_t __i = std::__scan_keyword(__b, __e, __ap, __ap+2, __ct, __err, false) - __ap; if (__i == 0 && __h == 12) __h = 0; else if (__i == 1 && __h < 12) @@ -2537,7 +2537,7 @@ char_type* __nb = __nar; char_type* __ne = __nb + 100; __do_put(__nb, __ne, __tm, __fmt, __mod); - return _VSTD::copy(__nb, __ne, __s); + return std::copy(__nb, __ne, __s); } _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put) @@ -3078,7 +3078,7 @@ if (__neg) *__nc++ = '-'; for (const char_type* __w = __wb.get(); __w < __wn; ++__w, ++__nc) - *__nc = __src[find(__atoms, _VSTD::end(__atoms), *__w) - __atoms]; + *__nc = __src[find(__atoms, std::end(__atoms), *__w) - __atoms]; *__nc = char(); if (sscanf(__nbuf, "%Lf", &__v) != 1) __throw_runtime_error("money_get error"); @@ -3231,7 +3231,7 @@ break; case money_base::symbol: if (!__sym.empty() && (__flags & ios_base::showbase)) - __me = _VSTD::copy(__sym.begin(), __sym.end(), __me); + __me = std::copy(__sym.begin(), __sym.end(), __me); break; case money_base::value: { @@ -3290,7 +3290,7 @@ } // print rest of sign, if any if (__sn.size() > 1) - __me = _VSTD::copy(__sn.begin()+1, __sn.end(), __me); + __me = std::copy(__sn.begin()+1, __sn.end(), __me); // set alignment if ((__flags & ios_base::adjustfield) == ios_base::left) __mi = __me; @@ -3547,7 +3547,7 @@ char* __n = catgets(__cat, __set, __msgid, __ndflt.c_str()); string_type __w; __widen_from_utf8()(back_inserter(__w), - __n, __n + _VSTD::strlen(__n)); + __n, __n + std::strlen(__n)); return __w; #else // !_LIBCPP_HAS_CATOPEN (void)__c; @@ -3703,8 +3703,8 @@ inline wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>:: wstring_convert(wstring_convert&& __wc) - : __byte_err_string_(_VSTD::move(__wc.__byte_err_string_)), - __wide_err_string_(_VSTD::move(__wc.__wide_err_string_)), + : __byte_err_string_(std::move(__wc.__byte_err_string_)), + __wide_err_string_(std::move(__wc.__wide_err_string_)), __cvtptr_(__wc.__cvtptr_), __cvtstate_(__wc.__cvtstate_), __cvtcount_(__wc.__cvtcount_) { @@ -3992,7 +3992,7 @@ int_type __c = traits_type::eof(); if (this->gptr() == this->egptr()) { - _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type)); + std::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type)); if (__always_noconv_) { streamsize __nmemb = static_cast(this->egptr() - this->eback() - __unget_sz); @@ -4009,10 +4009,10 @@ { _LIBCPP_ASSERT(!(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" ); if (__extbufend_ != __extbufnext_) - _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_); + std::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_); __extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_); __extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_); - streamsize __nmemb = _VSTD::min(static_cast(this->egptr() - this->eback() - __unget_sz), + streamsize __nmemb = std::min(static_cast(this->egptr() - this->eback() - __unget_sz), static_cast(__extbufend_ - __extbufnext_)); codecvt_base::result __r; // FIXME: Do we ever need to restore the state here? diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -578,7 +578,7 @@ void swap(__map_value_compare& __y) _NOEXCEPT_(__is_nothrow_swappable<_Compare>::value) { - using _VSTD::swap; + using std::swap; swap(static_cast<_Compare&>(*this), static_cast<_Compare&>(__y)); } @@ -624,7 +624,7 @@ void swap(__map_value_compare& __y) _NOEXCEPT_(__is_nothrow_swappable<_Compare>::value) { - using _VSTD::swap; + using std::swap; swap(comp, __y.comp); } @@ -691,9 +691,9 @@ void operator()(pointer __p) _NOEXCEPT { if (__second_constructed) - __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().second)); + __alloc_traits::destroy(__na_, std::addressof(__p->__value_.__get_value().second)); if (__first_constructed) - __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().first)); + __alloc_traits::destroy(__na_, std::addressof(__p->__value_.__get_value().first)); if (__p) __alloc_traits::deallocate(__na_, __p, 1); } @@ -724,7 +724,7 @@ value_type& __get_value() { #if _LIBCPP_STD_VER > 14 - return *_VSTD::launder(_VSTD::addressof(__cc)); + return *std::launder(std::addressof(__cc)); #else return __cc; #endif @@ -734,7 +734,7 @@ const value_type& __get_value() const { #if _LIBCPP_STD_VER > 14 - return *_VSTD::launder(_VSTD::addressof(__cc)); + return *std::launder(std::addressof(__cc)); #else return __cc; #endif @@ -752,8 +752,8 @@ { value_type& __v = __get_value(); return __nc_rref_pair_type( - _VSTD::move(const_cast(__v.first)), - _VSTD::move(__v.second)); + std::move(const_cast(__v.first)), + std::move(__v.second)); } _LIBCPP_INLINE_VISIBILITY @@ -778,7 +778,7 @@ _LIBCPP_INLINE_VISIBILITY __value_type& operator=(_ValueTp&& __v) { - __ref() = _VSTD::forward<_ValueTp>(__v); + __ref() = std::forward<_ValueTp>(__v); return *this; } @@ -989,7 +989,7 @@ private: - typedef _VSTD::__value_type __value_type; + typedef std::__value_type __value_type; typedef __map_value_compare __vc; typedef typename __rebind_alloc_helper, __value_type>::type __allocator_type; @@ -1006,8 +1006,8 @@ typedef typename __alloc_traits::difference_type difference_type; typedef __map_iterator iterator; typedef __map_const_iterator const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; #if _LIBCPP_STD_VER > 14 typedef __map_node_handle node_type; @@ -1076,7 +1076,7 @@ #ifndef _LIBCPP_CXX03_LANG __tree_ = __m.__tree_; #else - if (this != _VSTD::addressof(__m)) { + if (this != std::addressof(__m)) { __tree_.clear(); __tree_.value_comp() = __m.__tree_.value_comp(); __tree_.__copy_assign_alloc(__m.__tree_); @@ -1091,7 +1091,7 @@ _LIBCPP_INLINE_VISIBILITY map(map&& __m) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value) - : __tree_(_VSTD::move(__m.__tree_)) + : __tree_(std::move(__m.__tree_)) { } @@ -1101,7 +1101,7 @@ map& operator=(map&& __m) _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) { - __tree_ = _VSTD::move(__m.__tree_); + __tree_ = std::move(__m.__tree_); return *this; } @@ -1208,26 +1208,26 @@ template _LIBCPP_INLINE_VISIBILITY pair emplace(_Args&& ...__args) { - return __tree_.__emplace_unique(_VSTD::forward<_Args>(__args)...); + return __tree_.__emplace_unique(std::forward<_Args>(__args)...); } template _LIBCPP_INLINE_VISIBILITY iterator emplace_hint(const_iterator __p, _Args&& ...__args) { - return __tree_.__emplace_hint_unique(__p.__i_, _VSTD::forward<_Args>(__args)...); + return __tree_.__emplace_hint_unique(__p.__i_, std::forward<_Args>(__args)...); } template ::value>::type> _LIBCPP_INLINE_VISIBILITY pair insert(_Pp&& __p) - {return __tree_.__insert_unique(_VSTD::forward<_Pp>(__p));} + {return __tree_.__insert_unique(std::forward<_Pp>(__p));} template ::value>::type> _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __pos, _Pp&& __p) - {return __tree_.__insert_unique(__pos.__i_, _VSTD::forward<_Pp>(__p));} + {return __tree_.__insert_unique(__pos.__i_, std::forward<_Pp>(__p));} #endif // _LIBCPP_CXX03_LANG @@ -1243,11 +1243,11 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY pair - insert(value_type&& __v) {return __tree_.__insert_unique(_VSTD::move(__v));} + insert(value_type&& __v) {return __tree_.__insert_unique(std::move(__v));} _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, value_type&& __v) - {return __tree_.__insert_unique(__p.__i_, _VSTD::move(__v));} + {return __tree_.__insert_unique(__p.__i_, std::move(__v));} _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) @@ -1269,9 +1269,9 @@ pair try_emplace(const key_type& __k, _Args&&... __args) { return __tree_.__emplace_unique_key_args(__k, - _VSTD::piecewise_construct, - _VSTD::forward_as_tuple(__k), - _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); + std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple(std::forward<_Args>(__args)...)); } template @@ -1279,9 +1279,9 @@ pair try_emplace(key_type&& __k, _Args&&... __args) { return __tree_.__emplace_unique_key_args(__k, - _VSTD::piecewise_construct, - _VSTD::forward_as_tuple(_VSTD::move(__k)), - _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); + std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple(std::forward<_Args>(__args)...)); } template @@ -1289,9 +1289,9 @@ iterator try_emplace(const_iterator __h, const key_type& __k, _Args&&... __args) { return __tree_.__emplace_hint_unique_key_args(__h.__i_, __k, - _VSTD::piecewise_construct, - _VSTD::forward_as_tuple(__k), - _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)).first; + std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple(std::forward<_Args>(__args)...)).first; } template @@ -1299,9 +1299,9 @@ iterator try_emplace(const_iterator __h, key_type&& __k, _Args&&... __args) { return __tree_.__emplace_hint_unique_key_args(__h.__i_, __k, - _VSTD::piecewise_construct, - _VSTD::forward_as_tuple(_VSTD::move(__k)), - _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)).first; + std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple(std::forward<_Args>(__args)...)).first; } template @@ -1311,10 +1311,10 @@ iterator __p = lower_bound(__k); if ( __p != end() && !key_comp()(__k, __p->first)) { - __p->second = _VSTD::forward<_Vp>(__v); - return _VSTD::make_pair(__p, false); + __p->second = std::forward<_Vp>(__v); + return std::make_pair(__p, false); } - return _VSTD::make_pair(emplace_hint(__p, __k, _VSTD::forward<_Vp>(__v)), true); + return std::make_pair(emplace_hint(__p, __k, std::forward<_Vp>(__v)), true); } template @@ -1324,10 +1324,10 @@ iterator __p = lower_bound(__k); if ( __p != end() && !key_comp()(__k, __p->first)) { - __p->second = _VSTD::forward<_Vp>(__v); - return _VSTD::make_pair(__p, false); + __p->second = std::forward<_Vp>(__v); + return std::make_pair(__p, false); } - return _VSTD::make_pair(emplace_hint(__p, _VSTD::move(__k), _VSTD::forward<_Vp>(__v)), true); + return std::make_pair(emplace_hint(__p, std::move(__k), std::forward<_Vp>(__v)), true); } template @@ -1335,10 +1335,10 @@ const key_type& __k, _Vp&& __v) { auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args( - __h.__i_, __k, __k, _VSTD::forward<_Vp>(__v)); + __h.__i_, __k, __k, std::forward<_Vp>(__v)); if (!__inserted) - __r->__get_value().second = _VSTD::forward<_Vp>(__v); + __r->__get_value().second = std::forward<_Vp>(__v); return __r; } @@ -1348,10 +1348,10 @@ key_type&& __k, _Vp&& __v) { auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args( - __h.__i_, __k, _VSTD::move(__k), _VSTD::forward<_Vp>(__v)); + __h.__i_, __k, std::move(__k), std::forward<_Vp>(__v)); if (!__inserted) - __r->__get_value().second = _VSTD::forward<_Vp>(__v); + __r->__get_value().second = std::forward<_Vp>(__v); return __r; } @@ -1378,7 +1378,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to map::insert()"); return __tree_.template __node_handle_insert_unique< - node_type, insert_return_type>(_VSTD::move(__nh)); + node_type, insert_return_type>(std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __hint, node_type&& __nh) @@ -1386,7 +1386,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to map::insert()"); return __tree_.template __node_handle_insert_unique( - __hint.__i_, _VSTD::move(__nh)); + __hint.__i_, std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY node_type extract(key_type const& __key) @@ -1570,7 +1570,7 @@ #ifndef _LIBCPP_CXX03_LANG template map<_Key, _Tp, _Compare, _Allocator>::map(map&& __m, const allocator_type& __a) - : __tree_(_VSTD::move(__m.__tree_), typename __base::allocator_type(__a)) + : __tree_(std::move(__m.__tree_), typename __base::allocator_type(__a)) { if (__a != __m.get_allocator()) { @@ -1586,9 +1586,9 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k) { return __tree_.__emplace_unique_key_args(__k, - _VSTD::piecewise_construct, - _VSTD::forward_as_tuple(__k), - _VSTD::forward_as_tuple()).first->__get_value().second; + std::piecewise_construct, + std::forward_as_tuple(__k), + std::forward_as_tuple()).first->__get_value().second; } template @@ -1596,9 +1596,9 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](key_type&& __k) { return __tree_.__emplace_unique_key_args(__k, - _VSTD::piecewise_construct, - _VSTD::forward_as_tuple(_VSTD::move(__k)), - _VSTD::forward_as_tuple()).first->__get_value().second; + std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple()).first->__get_value().second; } #else // _LIBCPP_CXX03_LANG @@ -1609,9 +1609,9 @@ { __node_allocator& __na = __tree_.__node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); - __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().first), __k); + __node_traits::construct(__na, std::addressof(__h->__value_.__get_value().first), __k); __h.get_deleter().__first_constructed = true; - __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second)); + __node_traits::construct(__na, std::addressof(__h->__value_.__get_value().second)); __h.get_deleter().__second_constructed = true; return __h; } @@ -1663,7 +1663,7 @@ operator==(const map<_Key, _Tp, _Compare, _Allocator>& __x, const map<_Key, _Tp, _Compare, _Allocator>& __y) { - return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template @@ -1672,7 +1672,7 @@ operator< (const map<_Key, _Tp, _Compare, _Allocator>& __x, const map<_Key, _Tp, _Compare, _Allocator>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template @@ -1727,7 +1727,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename map<_Key, _Tp, _Compare, _Allocator>::size_type erase_if(map<_Key, _Tp, _Compare, _Allocator>& __c, _Predicate __pred) { - return _VSTD::__libcpp_erase_if_container(__c, __pred); + return std::__libcpp_erase_if_container(__c, __pred); } #endif @@ -1775,7 +1775,7 @@ private: - typedef _VSTD::__value_type __value_type; + typedef std::__value_type __value_type; typedef __map_value_compare __vc; typedef typename __rebind_alloc_helper, __value_type>::type __allocator_type; @@ -1792,8 +1792,8 @@ typedef typename __alloc_traits::difference_type difference_type; typedef __map_iterator iterator; typedef __map_const_iterator const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; #if _LIBCPP_STD_VER > 14 typedef __map_node_handle node_type; @@ -1862,7 +1862,7 @@ #ifndef _LIBCPP_CXX03_LANG __tree_ = __m.__tree_; #else - if (this != _VSTD::addressof(__m)) { + if (this != std::addressof(__m)) { __tree_.clear(); __tree_.value_comp() = __m.__tree_.value_comp(); __tree_.__copy_assign_alloc(__m.__tree_); @@ -1877,7 +1877,7 @@ _LIBCPP_INLINE_VISIBILITY multimap(multimap&& __m) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value) - : __tree_(_VSTD::move(__m.__tree_)) + : __tree_(std::move(__m.__tree_)) { } @@ -1887,7 +1887,7 @@ multimap& operator=(multimap&& __m) _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) { - __tree_ = _VSTD::move(__m.__tree_); + __tree_ = std::move(__m.__tree_); return *this; } @@ -1987,34 +1987,34 @@ template _LIBCPP_INLINE_VISIBILITY iterator emplace(_Args&& ...__args) { - return __tree_.__emplace_multi(_VSTD::forward<_Args>(__args)...); + return __tree_.__emplace_multi(std::forward<_Args>(__args)...); } template _LIBCPP_INLINE_VISIBILITY iterator emplace_hint(const_iterator __p, _Args&& ...__args) { - return __tree_.__emplace_hint_multi(__p.__i_, _VSTD::forward<_Args>(__args)...); + return __tree_.__emplace_hint_multi(__p.__i_, std::forward<_Args>(__args)...); } template ::value>::type> _LIBCPP_INLINE_VISIBILITY iterator insert(_Pp&& __p) - {return __tree_.__insert_multi(_VSTD::forward<_Pp>(__p));} + {return __tree_.__insert_multi(std::forward<_Pp>(__p));} template ::value>::type> _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __pos, _Pp&& __p) - {return __tree_.__insert_multi(__pos.__i_, _VSTD::forward<_Pp>(__p));} + {return __tree_.__insert_multi(__pos.__i_, std::forward<_Pp>(__p));} _LIBCPP_INLINE_VISIBILITY iterator insert(value_type&& __v) - {return __tree_.__insert_multi(_VSTD::move(__v));} + {return __tree_.__insert_multi(std::move(__v));} _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, value_type&& __v) - {return __tree_.__insert_multi(__p.__i_, _VSTD::move(__v));} + {return __tree_.__insert_multi(__p.__i_, std::move(__v));} _LIBCPP_INLINE_VISIBILITY @@ -2055,7 +2055,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to multimap::insert()"); return __tree_.template __node_handle_insert_multi( - _VSTD::move(__nh)); + std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __hint, node_type&& __nh) @@ -2063,7 +2063,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to multimap::insert()"); return __tree_.template __node_handle_insert_multi( - __hint.__i_, _VSTD::move(__nh)); + __hint.__i_, std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY node_type extract(key_type const& __key) @@ -2245,14 +2245,14 @@ #ifndef _LIBCPP_CXX03_LANG template multimap<_Key, _Tp, _Compare, _Allocator>::multimap(multimap&& __m, const allocator_type& __a) - : __tree_(_VSTD::move(__m.__tree_), typename __base::allocator_type(__a)) + : __tree_(std::move(__m.__tree_), typename __base::allocator_type(__a)) { if (__a != __m.get_allocator()) { const_iterator __e = cend(); while (!__m.empty()) __tree_.__insert_multi(__e.__i_, - _VSTD::move(__m.__tree_.remove(__m.begin().__i_)->__value_.__move())); + std::move(__m.__tree_.remove(__m.begin().__i_)->__value_.__move())); } } #endif @@ -2263,7 +2263,7 @@ operator==(const multimap<_Key, _Tp, _Compare, _Allocator>& __x, const multimap<_Key, _Tp, _Compare, _Allocator>& __y) { - return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template @@ -2272,7 +2272,7 @@ operator< (const multimap<_Key, _Tp, _Compare, _Allocator>& __x, const multimap<_Key, _Tp, _Compare, _Allocator>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template @@ -2328,7 +2328,7 @@ typename multimap<_Key, _Tp, _Compare, _Allocator>::size_type erase_if(multimap<_Key, _Tp, _Compare, _Allocator>& __c, _Predicate __pred) { - return _VSTD::__libcpp_erase_if_container(__c, __pred); + return std::__libcpp_erase_if_container(__c, __pred); } #endif diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -854,11 +854,11 @@ "The specified type does not meet the requirements of Cpp17MoveInsertable"); typedef allocator_traits<_Alloc> _Traits; for (; __begin1 != __end1; ++__begin1, (void)++__begin2) { - _Traits::construct(__a, _VSTD::__to_address(__begin2), + _Traits::construct(__a, std::__to_address(__begin2), #ifdef _LIBCPP_NO_EXCEPTIONS - _VSTD::move(*__begin1) + std::move(*__begin1) #else - _VSTD::move_if_noexcept(*__begin1) + std::move_if_noexcept(*__begin1) #endif ); } @@ -872,7 +872,7 @@ void __construct_forward_with_exception_guarantees(_Alloc&, _Tp* __begin1, _Tp* __end1, _Tp*& __begin2) { ptrdiff_t _Np = __end1 - __begin1; if (_Np > 0) { - _VSTD::memcpy(__begin2, __begin1, _Np * sizeof(_Tp)); + std::memcpy(__begin2, __begin1, _Np * sizeof(_Tp)); __begin2 += _Np; } } @@ -882,7 +882,7 @@ void __construct_range_forward(_Alloc& __a, _Iter __begin1, _Iter __end1, _Ptr& __begin2) { typedef allocator_traits<_Alloc> _Traits; for (; __begin1 != __end1; ++__begin1, (void) ++__begin2) { - _Traits::construct(__a, _VSTD::__to_address(__begin2), *__begin1); + _Traits::construct(__a, std::__to_address(__begin2), *__begin1); } } @@ -899,7 +899,7 @@ void __construct_range_forward(_Alloc&, _Source* __begin1, _Source* __end1, _Dest*& __begin2) { ptrdiff_t _Np = __end1 - __begin1; if (_Np > 0) { - _VSTD::memcpy(const_cast<_RawDest*>(__begin2), __begin1, _Np * sizeof(_Dest)); + std::memcpy(const_cast<_RawDest*>(__begin2), __begin1, _Np * sizeof(_Dest)); __begin2 += _Np; } } @@ -911,11 +911,11 @@ "The specified type does not meet the requirements of Cpp17MoveInsertable"); typedef allocator_traits<_Alloc> _Traits; while (__end1 != __begin1) { - _Traits::construct(__a, _VSTD::__to_address(__end2 - 1), + _Traits::construct(__a, std::__to_address(__end2 - 1), #ifdef _LIBCPP_NO_EXCEPTIONS - _VSTD::move(*--__end1) + std::move(*--__end1) #else - _VSTD::move_if_noexcept(*--__end1) + std::move_if_noexcept(*--__end1) #endif ); --__end2; @@ -931,7 +931,7 @@ ptrdiff_t _Np = __end1 - __begin1; __end2 -= _Np; if (_Np > 0) - _VSTD::memcpy(static_cast(__end2), static_cast(__begin1), _Np * sizeof(_Tp)); + std::memcpy(static_cast(__end2), static_cast(__begin1), _Np * sizeof(_Tp)); } struct __destruct_n @@ -985,7 +985,7 @@ _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value) #endif { - using _VSTD::swap; + using std::swap; swap(__a1, __a2); } @@ -1002,7 +1002,7 @@ _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value) #endif { - _VSTD::__swap_allocator(__a1, __a2, + std::__swap_allocator(__a1, __a2, integral_constant::propagate_on_container_swap::value>()); } @@ -1031,7 +1031,7 @@ _LIBCPP_NO_CFI __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) { _Traits::construct(__a, reinterpret_cast<_Tp*>(addressof(__v)), - _VSTD::forward<_Args>(__args)...); + std::forward<_Args>(__args)...); } ~__temp_value() { _Traits::destroy(__a, __addr()); } @@ -1059,7 +1059,7 @@ : __size_(__size), __align_(__align) {} void operator()(void* p) const _NOEXCEPT { - _VSTD::__libcpp_deallocate(p, __size_, __align_); + std::__libcpp_deallocate(p, __size_, __align_); } private: @@ -1070,13 +1070,13 @@ typedef unique_ptr __holder_t; static __holder_t __allocate_bytes(size_t __s, size_t __align) { - return __holder_t(_VSTD::__libcpp_allocate(__s, __align), + return __holder_t(std::__libcpp_allocate(__s, __align), __builtin_new_deleter(__s, __align)); } static void __deallocate_bytes(void* __p, size_t __s, size_t __align) _NOEXCEPT { - _VSTD::__libcpp_deallocate(__p, __s, __align); + std::__libcpp_deallocate(__p, __s, __align); } template diff --git a/libcxx/include/mutex b/libcxx/include/mutex --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -462,7 +462,7 @@ void __unlock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) { __l0.unlock(); __l1.unlock(); - _VSTD::__unlock(__l2, __l3...); + std::__unlock(__l2, __l3...); } #endif // _LIBCPP_CXX03_LANG @@ -515,7 +515,7 @@ explicit scoped_lock(_MArgs&... __margs) : __t_(__margs...) { - _VSTD::lock(__margs...); + std::lock(__margs...); } _LIBCPP_INLINE_VISIBILITY @@ -537,7 +537,7 @@ template _LIBCPP_INLINE_VISIBILITY static void __unlock_unpack(__tuple_indices<_Indx...>, _MutexTuple& __mt) { - _VSTD::__unlock(_VSTD::get<_Indx>(__mt)...); + std::__unlock(std::get<_Indx>(__mt)...); } _MutexTuple __t_; @@ -620,7 +620,7 @@ _LIBCPP_INLINE_VISIBILITY void __execute(__tuple_indices<_Indices...>) { - _VSTD::__invoke(_VSTD::get<0>(_VSTD::move(__f_)), _VSTD::get<_Indices>(_VSTD::move(__f_))...); + std::__invoke(std::get<0>(std::move(__f_)), std::get<_Indices>(std::move(__f_))...); } }; @@ -664,7 +664,7 @@ if (__libcpp_acquire_load(&__flag.__state_) != ~once_flag::_State_type(0)) { typedef tuple<_Callable&&, _Args&&...> _Gp; - _Gp __f(_VSTD::forward<_Callable>(__func), _VSTD::forward<_Args>(__args)...); + _Gp __f(std::forward<_Callable>(__func), std::forward<_Args>(__args)...); __call_once_param<_Gp> __p(__f); __call_once(__flag.__state_, &__p, &__call_once_proxy<_Gp>); } diff --git a/libcxx/include/new b/libcxx/include/new --- a/libcxx/include/new +++ b/libcxx/include/new @@ -155,7 +155,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_array_new_length(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -355,7 +355,7 @@ _LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp* launder(_Tp* __p) noexcept { - return _VSTD::__launder(__p); + return std::__launder(__p); } #endif diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -201,7 +201,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_optional_access(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -246,14 +246,14 @@ template _LIBCPP_INLINE_VISIBILITY constexpr explicit __optional_destruct_base(in_place_t, _Args&&... __args) - : __val_(_VSTD::forward<_Args>(__args)...), + : __val_(std::forward<_Args>(__args)...), __engaged_(true) {} #if _LIBCPP_STD_VER > 20 template _LIBCPP_HIDE_FROM_ABI constexpr __optional_destruct_base(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args) - : __val_(_VSTD::invoke(_VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...)), __engaged_(true) {} + : __val_(std::invoke(std::forward<_Fp>(__f), std::forward<_Args>(__args)...)), __engaged_(true) {} #endif _LIBCPP_INLINE_VISIBILITY @@ -288,14 +288,14 @@ template _LIBCPP_INLINE_VISIBILITY constexpr explicit __optional_destruct_base(in_place_t, _Args&&... __args) - : __val_(_VSTD::forward<_Args>(__args)...), + : __val_(std::forward<_Args>(__args)...), __engaged_(true) {} #if _LIBCPP_STD_VER > 20 template _LIBCPP_HIDE_FROM_ABI constexpr __optional_destruct_base(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args) - : __val_(_VSTD::invoke(_VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...)), __engaged_(true) {} + : __val_(std::invoke(std::forward<_Fp>(__f), std::forward<_Args>(__args)...)), __engaged_(true) {} #endif _LIBCPP_INLINE_VISIBILITY @@ -334,12 +334,12 @@ _LIBCPP_INLINE_VISIBILITY constexpr value_type&& __get() && noexcept { - return _VSTD::move(this->__val_); + return std::move(this->__val_); } _LIBCPP_INLINE_VISIBILITY constexpr const value_type&& __get() const&& noexcept { - return _VSTD::move(this->__val_); + return std::move(this->__val_); } template @@ -348,9 +348,9 @@ { _LIBCPP_ASSERT(!has_value(), "__construct called for engaged __optional_storage"); #if _LIBCPP_STD_VER > 17 - _VSTD::construct_at(_VSTD::addressof(this->__val_), _VSTD::forward<_Args>(__args)...); + std::construct_at(std::addressof(this->__val_), std::forward<_Args>(__args)...); #else - ::new ((void*)_VSTD::addressof(this->__val_)) value_type(_VSTD::forward<_Args>(__args)...); + ::new ((void*)std::addressof(this->__val_)) value_type(std::forward<_Args>(__args)...); #endif this->__engaged_ = true; } @@ -360,7 +360,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_from(_That&& __opt) { if (__opt.has_value()) - __construct(_VSTD::forward<_That>(__opt).__get()); + __construct(std::forward<_That>(__opt).__get()); } template @@ -370,14 +370,14 @@ if (this->__engaged_ == __opt.has_value()) { if (this->__engaged_) - this->__val_ = _VSTD::forward<_That>(__opt).__get(); + this->__val_ = std::forward<_That>(__opt).__get(); } else { if (this->__engaged_) this->reset(); else - __construct(_VSTD::forward<_That>(__opt).__get()); + __construct(std::forward<_That>(__opt).__get()); } } }; @@ -415,7 +415,7 @@ template _LIBCPP_INLINE_VISIBILITY constexpr explicit __optional_storage_base(in_place_t, _UArg&& __uarg) - : __value_(_VSTD::addressof(__uarg)) + : __value_(std::addressof(__uarg)) { static_assert(__can_bind_reference<_UArg>(), "Attempted to construct a reference element in tuple from a " @@ -435,7 +435,7 @@ _LIBCPP_INLINE_VISIBILITY constexpr value_type&& __get() const&& noexcept - { return _VSTD::forward(*__value_); } + { return std::forward(*__value_); } template _LIBCPP_INLINE_VISIBILITY @@ -445,7 +445,7 @@ static_assert(__can_bind_reference<_UArg>(), "Attempted to construct a reference element in tuple from a " "possible temporary"); - __value_ = _VSTD::addressof(__val); + __value_ = std::addressof(__val); } template @@ -453,7 +453,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_from(_That&& __opt) { if (__opt.has_value()) - __construct(_VSTD::forward<_That>(__opt).__get()); + __construct(std::forward<_That>(__opt).__get()); } template @@ -463,14 +463,14 @@ if (has_value() == __opt.has_value()) { if (has_value()) - *__value_ = _VSTD::forward<_That>(__opt).__get(); + *__value_ = std::forward<_That>(__opt).__get(); } else { if (has_value()) reset(); else - __construct(_VSTD::forward<_That>(__opt).__get()); + __construct(std::forward<_That>(__opt).__get()); } } }; @@ -524,7 +524,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_move_base(__optional_move_base&& __opt) noexcept(is_nothrow_move_constructible_v) { - this->__construct_from(_VSTD::move(__opt)); + this->__construct_from(std::move(__opt)); } _LIBCPP_INLINE_VISIBILITY @@ -594,7 +594,7 @@ noexcept(is_nothrow_move_assignable_v && is_nothrow_move_constructible_v) { - this->__assign_from(_VSTD::move(__opt)); + this->__assign_from(std::move(__opt)); return *this; } }; @@ -736,28 +736,28 @@ > _LIBCPP_INLINE_VISIBILITY constexpr explicit optional(_InPlaceT, _Args&&... __args) - : __base(in_place, _VSTD::forward<_Args>(__args)...) {} + : __base(in_place, std::forward<_Args>(__args)...) {} template &, _Args...>> > _LIBCPP_INLINE_VISIBILITY constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args) - : __base(in_place, __il, _VSTD::forward<_Args>(__args)...) {} + : __base(in_place, __il, std::forward<_Args>(__args)...) {} template ::template __enable_implicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY constexpr optional(_Up&& __v) - : __base(in_place, _VSTD::forward<_Up>(__v)) {} + : __base(in_place, std::forward<_Up>(__v)) {} template ::template __enable_explicit<_Up>() , int> = 0> _LIBCPP_INLINE_VISIBILITY constexpr explicit optional(_Up&& __v) - : __base(in_place, _VSTD::forward<_Up>(__v)) {} + : __base(in_place, std::forward<_Up>(__v)) {} // LWG2756: conditionally explicit conversion from const optional<_Up>& template && __v) { - this->__construct_from(_VSTD::move(__v)); + this->__construct_from(std::move(__v)); } template ::template __enable_explicit<_Up>() @@ -792,14 +792,14 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit optional(optional<_Up>&& __v) { - this->__construct_from(_VSTD::move(__v)); + this->__construct_from(std::move(__v)); } #if _LIBCPP_STD_VER > 20 template _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args) - : __base(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...) { + : __base(__optional_construct_from_invoke_tag{}, std::forward<_Fp>(__f), std::forward<_Args>(__args)...) { } #endif @@ -831,9 +831,9 @@ operator=(_Up&& __v) { if (this->has_value()) - this->__get() = _VSTD::forward<_Up>(__v); + this->__get() = std::forward<_Up>(__v); else - this->__construct(_VSTD::forward<_Up>(__v)); + this->__construct(std::forward<_Up>(__v)); return *this; } @@ -857,7 +857,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 optional& operator=(optional<_Up>&& __v) { - this->__assign_from(_VSTD::move(__v)); + this->__assign_from(std::move(__v)); return *this; } @@ -872,7 +872,7 @@ emplace(_Args&&... __args) { reset(); - this->__construct(_VSTD::forward<_Args>(__args)...); + this->__construct(std::forward<_Args>(__args)...); return this->__get(); } @@ -887,7 +887,7 @@ emplace(initializer_list<_Up> __il, _Args&&... __args) { reset(); - this->__construct(__il, _VSTD::forward<_Args>(__args)...); + this->__construct(__il, std::forward<_Args>(__args)...); return this->__get(); } @@ -898,7 +898,7 @@ { if (this->has_value() == __opt.has_value()) { - using _VSTD::swap; + using std::swap; if (this->has_value()) swap(this->__get(), __opt.__get()); } @@ -906,12 +906,12 @@ { if (this->has_value()) { - __opt.__construct(_VSTD::move(this->__get())); + __opt.__construct(std::move(this->__get())); reset(); } else { - this->__construct(_VSTD::move(__opt.__get())); + this->__construct(std::move(__opt.__get())); __opt.reset(); } } @@ -923,7 +923,7 @@ operator->() const { _LIBCPP_ASSERT(this->has_value(), "optional operator-> called on a disengaged value"); - return _VSTD::addressof(this->__get()); + return std::addressof(this->__get()); } _LIBCPP_INLINE_VISIBILITY @@ -932,7 +932,7 @@ operator->() { _LIBCPP_ASSERT(this->has_value(), "optional operator-> called on a disengaged value"); - return _VSTD::addressof(this->__get()); + return std::addressof(this->__get()); } _LIBCPP_INLINE_VISIBILITY @@ -959,7 +959,7 @@ operator*() && noexcept { _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value"); - return _VSTD::move(this->__get()); + return std::move(this->__get()); } _LIBCPP_INLINE_VISIBILITY @@ -968,7 +968,7 @@ operator*() const&& noexcept { _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value"); - return _VSTD::move(this->__get()); + return std::move(this->__get()); } _LIBCPP_INLINE_VISIBILITY @@ -1001,7 +1001,7 @@ { if (!this->has_value()) __throw_bad_optional_access(); - return _VSTD::move(this->__get()); + return std::move(this->__get()); } _LIBCPP_INLINE_VISIBILITY @@ -1010,7 +1010,7 @@ { if (!this->has_value()) __throw_bad_optional_access(); - return _VSTD::move(this->__get()); + return std::move(this->__get()); } template @@ -1022,7 +1022,7 @@ static_assert(is_convertible_v<_Up, value_type>, "optional::value_or: U must be convertible to T"); return this->has_value() ? this->__get() : - static_cast(_VSTD::forward<_Up>(__v)); + static_cast(std::forward<_Up>(__v)); } template @@ -1033,8 +1033,8 @@ "optional::value_or: T must be move constructible"); static_assert(is_convertible_v<_Up, value_type>, "optional::value_or: U must be convertible to T"); - return this->has_value() ? _VSTD::move(this->__get()) : - static_cast(_VSTD::forward<_Up>(__v)); + return this->has_value() ? std::move(this->__get()) : + static_cast(std::forward<_Up>(__v)); } #if _LIBCPP_STD_VER > 20 @@ -1045,7 +1045,7 @@ static_assert(__is_std_optional>::value, "Result of f(value()) must be a specialization of std::optional"); if (*this) - return _VSTD::invoke(_VSTD::forward<_Func>(__f), value()); + return std::invoke(std::forward<_Func>(__f), value()); return remove_cvref_t<_Up>(); } @@ -1056,7 +1056,7 @@ static_assert(__is_std_optional>::value, "Result of f(value()) must be a specialization of std::optional"); if (*this) - return _VSTD::invoke(_VSTD::forward<_Func>(__f), value()); + return std::invoke(std::forward<_Func>(__f), value()); return remove_cvref_t<_Up>(); } @@ -1067,7 +1067,7 @@ static_assert(__is_std_optional>::value, "Result of f(std::move(value())) must be a specialization of std::optional"); if (*this) - return _VSTD::invoke(_VSTD::forward<_Func>(__f), _VSTD::move(value())); + return std::invoke(std::forward<_Func>(__f), std::move(value())); return remove_cvref_t<_Up>(); } @@ -1078,7 +1078,7 @@ static_assert(__is_std_optional>::value, "Result of f(std::move(value())) must be a specialization of std::optional"); if (*this) - return _VSTD::invoke(_VSTD::forward<_Func>(__f), _VSTD::move(value())); + return std::invoke(std::forward<_Func>(__f), std::move(value())); return remove_cvref_t<_Up>(); } @@ -1093,7 +1093,7 @@ "Result of f(value()) should not be std::nullopt_t"); static_assert(is_object_v<_Up>, "Result of f(value()) should be an object type"); if (*this) - return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), value()); + return optional<_Up>(__optional_construct_from_invoke_tag{}, std::forward<_Func>(__f), value()); return optional<_Up>(); } @@ -1108,7 +1108,7 @@ "Result of f(value()) should not be std::nullopt_t"); static_assert(is_object_v<_Up>, "Result of f(value()) should be an object type"); if (*this) - return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), value()); + return optional<_Up>(__optional_construct_from_invoke_tag{}, std::forward<_Func>(__f), value()); return optional<_Up>(); } @@ -1123,7 +1123,7 @@ "Result of f(std::move(value())) should not be std::nullopt_t"); static_assert(is_object_v<_Up>, "Result of f(std::move(value())) should be an object type"); if (*this) - return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), _VSTD::move(value())); + return optional<_Up>(__optional_construct_from_invoke_tag{}, std::forward<_Func>(__f), std::move(value())); return optional<_Up>(); } @@ -1138,7 +1138,7 @@ "Result of f(std::move(value())) should not be std::nullopt_t"); static_assert(is_object_v<_Up>, "Result of f(std::move(value())) should be an object type"); if (*this) - return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), _VSTD::move(value())); + return optional<_Up>(__optional_construct_from_invoke_tag{}, std::forward<_Func>(__f), std::move(value())); return optional<_Up>(); } @@ -1149,7 +1149,7 @@ "Result of f() should be the same type as this optional"); if (*this) return *this; - return _VSTD::forward<_Func>(__f)(); + return std::forward<_Func>(__f)(); } template @@ -1158,8 +1158,8 @@ static_assert(is_same_v>, optional>, "Result of f() should be the same type as this optional"); if (*this) - return _VSTD::move(*this); - return _VSTD::forward<_Func>(__f)(); + return std::move(*this); + return std::forward<_Func>(__f)(); } #endif // _LIBCPP_STD_VER > 20 @@ -1526,21 +1526,21 @@ _LIBCPP_INLINE_VISIBILITY constexpr optional> make_optional(_Tp&& __v) { - return optional>(_VSTD::forward<_Tp>(__v)); + return optional>(std::forward<_Tp>(__v)); } template _LIBCPP_INLINE_VISIBILITY constexpr optional<_Tp> make_optional(_Args&&... __args) { - return optional<_Tp>(in_place, _VSTD::forward<_Args>(__args)...); + return optional<_Tp>(in_place, std::forward<_Args>(__args)...); } template _LIBCPP_INLINE_VISIBILITY constexpr optional<_Tp> make_optional(initializer_list<_Up> __il, _Args&&... __args) { - return optional<_Tp>(in_place, __il, _VSTD::forward<_Args>(__args)...); + return optional<_Tp>(in_place, __il, std::forward<_Args>(__args)...); } template diff --git a/libcxx/include/ostream b/libcxx/include/ostream --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -748,7 +748,7 @@ basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c) { - return _VSTD::__put_character_sequence(__os, &__c, 1); + return std::__put_character_sequence(__os, &__c, 1); } template @@ -788,28 +788,28 @@ basic_ostream& operator<<(basic_ostream& __os, char __c) { - return _VSTD::__put_character_sequence(__os, &__c, 1); + return std::__put_character_sequence(__os, &__c, 1); } template basic_ostream& operator<<(basic_ostream& __os, signed char __c) { - return _VSTD::__put_character_sequence(__os, (char *) &__c, 1); + return std::__put_character_sequence(__os, (char *) &__c, 1); } template basic_ostream& operator<<(basic_ostream& __os, unsigned char __c) { - return _VSTD::__put_character_sequence(__os, (char *) &__c, 1); + return std::__put_character_sequence(__os, (char *) &__c, 1); } template basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str) { - return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str)); + return std::__put_character_sequence(__os, __str, _Traits::length(__str)); } template @@ -862,7 +862,7 @@ basic_ostream& operator<<(basic_ostream& __os, const char* __str) { - return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str)); + return std::__put_character_sequence(__os, __str, _Traits::length(__str)); } template @@ -870,7 +870,7 @@ operator<<(basic_ostream& __os, const signed char* __str) { const char *__s = (const char *) __str; - return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s)); + return std::__put_character_sequence(__os, __s, _Traits::length(__s)); } template @@ -878,7 +878,7 @@ operator<<(basic_ostream& __os, const unsigned char* __str) { const char *__s = (const char *) __str; - return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s)); + return std::__put_character_sequence(__os, __s, _Traits::length(__s)); } template @@ -1038,7 +1038,7 @@ _Stream&& operator<<(_Stream&& __os, const _Tp& __x) { __os << __x; - return _VSTD::move(__os); + return std::move(__os); } template @@ -1046,7 +1046,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Allocator>& __str) { - return _VSTD::__put_character_sequence(__os, __str.data(), __str.size()); + return std::__put_character_sequence(__os, __str.data(), __str.size()); } template @@ -1054,7 +1054,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, basic_string_view<_CharT, _Traits> __sv) { - return _VSTD::__put_character_sequence(__os, __sv.data(), __sv.size()); + return std::__put_character_sequence(__os, __sv.data(), __sv.size()); } template diff --git a/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -291,19 +291,19 @@ _LIBCPP_INLINE_VISIBILITY queue(queue&& __q) _NOEXCEPT_(is_nothrow_move_constructible::value) - : c(_VSTD::move(__q.c)) {} + : c(std::move(__q.c)) {} _LIBCPP_INLINE_VISIBILITY queue& operator=(queue&& __q) _NOEXCEPT_(is_nothrow_move_assignable::value) - {c = _VSTD::move(__q.c); return *this;} + {c = std::move(__q.c); return *this;} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY explicit queue(const container_type& __c) : c(__c) {} #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY - explicit queue(container_type&& __c) : c(_VSTD::move(__c)) {} + explicit queue(container_type&& __c) : c(std::move(__c)) {} #endif // _LIBCPP_CXX03_LANG template _LIBCPP_INLINE_VISIBILITY @@ -325,12 +325,12 @@ _LIBCPP_INLINE_VISIBILITY queue(container_type&& __c, const _Alloc& __a, __enable_if_t::value>* = 0) - : c(_VSTD::move(__c), __a) {} + : c(std::move(__c), __a) {} template _LIBCPP_INLINE_VISIBILITY queue(queue&& __q, const _Alloc& __a, __enable_if_t::value>* = 0) - : c(_VSTD::move(__q.c), __a) {} + : c(std::move(__q.c), __a) {} #endif // _LIBCPP_CXX03_LANG @@ -352,15 +352,15 @@ void push(const value_type& __v) {c.push_back(__v);} #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY - void push(value_type&& __v) {c.push_back(_VSTD::move(__v));} + void push(value_type&& __v) {c.push_back(std::move(__v));} template _LIBCPP_INLINE_VISIBILITY #if _LIBCPP_STD_VER > 14 decltype(auto) emplace(_Args&&... __args) - { return c.emplace_back(_VSTD::forward<_Args>(__args)...);} + { return c.emplace_back(std::forward<_Args>(__args)...);} #else void emplace(_Args&&... __args) - { c.emplace_back(_VSTD::forward<_Args>(__args)...);} + { c.emplace_back(std::forward<_Args>(__args)...);} #endif #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY @@ -370,7 +370,7 @@ void swap(queue& __q) _NOEXCEPT_(__is_nothrow_swappable::value) { - using _VSTD::swap; + using std::swap; swap(c, __q.c); } @@ -516,13 +516,13 @@ priority_queue(priority_queue&& __q) _NOEXCEPT_(is_nothrow_move_constructible::value && is_nothrow_move_constructible::value) - : c(_VSTD::move(__q.c)), comp(_VSTD::move(__q.comp)) {} + : c(std::move(__q.c)), comp(std::move(__q.comp)) {} _LIBCPP_INLINE_VISIBILITY priority_queue& operator=(priority_queue&& __q) _NOEXCEPT_(is_nothrow_move_assignable::value && is_nothrow_move_assignable::value) - {c = _VSTD::move(__q.c); comp = _VSTD::move(__q.comp); return *this;} + {c = std::move(__q.c); comp = std::move(__q.comp); return *this;} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY @@ -691,7 +691,7 @@ : c(__c), comp(__comp) { - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } #ifndef _LIBCPP_CXX03_LANG @@ -700,10 +700,10 @@ inline priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp, container_type&& __c) - : c(_VSTD::move(__c)), + : c(std::move(__c)), comp(__comp) { - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } #endif // _LIBCPP_CXX03_LANG @@ -716,7 +716,7 @@ : c(__f, __l), comp(__comp) { - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } template @@ -729,7 +729,7 @@ comp(__comp) { c.insert(c.end(), __f, __l); - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } #ifndef _LIBCPP_CXX03_LANG @@ -740,11 +740,11 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l, const value_compare& __comp, container_type&& __c) - : c(_VSTD::move(__c)), + : c(std::move(__c)), comp(__comp) { c.insert(c.end(), __f, __l); - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } #endif // _LIBCPP_CXX03_LANG @@ -779,7 +779,7 @@ : c(__c, __a), comp(__comp) { - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } template @@ -802,10 +802,10 @@ container_type&& __c, const _Alloc& __a, __enable_if_t::value>*) - : c(_VSTD::move(__c), __a), + : c(std::move(__c), __a), comp(__comp) { - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } template @@ -814,8 +814,8 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q, const _Alloc& __a, __enable_if_t::value>*) - : c(_VSTD::move(__q.c), __a), - comp(_VSTD::move(__q.comp)) + : c(std::move(__q.c), __a), + comp(std::move(__q.comp)) { } @@ -830,7 +830,7 @@ : c(__f, __l, __a), comp() { - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } template @@ -843,7 +843,7 @@ : c(__f, __l, __a), comp(__comp) { - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } template @@ -857,7 +857,7 @@ comp(__comp) { c.insert(c.end(), __f, __l); - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } #ifndef _LIBCPP_CXX03_LANG @@ -868,11 +868,11 @@ _InputIter __f, _InputIter __l, const value_compare& __comp, container_type&& __c, const _Alloc& __a, __enable_if_t::value>*) - : c(_VSTD::move(__c), __a), + : c(std::move(__c), __a), comp(__comp) { c.insert(c.end(), __f, __l); - _VSTD::make_heap(c.begin(), c.end(), comp); + std::make_heap(c.begin(), c.end(), comp); } #endif // _LIBCPP_CXX03_LANG @@ -882,7 +882,7 @@ priority_queue<_Tp, _Container, _Compare>::push(const value_type& __v) { c.push_back(__v); - _VSTD::push_heap(c.begin(), c.end(), comp); + std::push_heap(c.begin(), c.end(), comp); } #ifndef _LIBCPP_CXX03_LANG @@ -892,8 +892,8 @@ void priority_queue<_Tp, _Container, _Compare>::push(value_type&& __v) { - c.push_back(_VSTD::move(__v)); - _VSTD::push_heap(c.begin(), c.end(), comp); + c.push_back(std::move(__v)); + std::push_heap(c.begin(), c.end(), comp); } template @@ -902,8 +902,8 @@ void priority_queue<_Tp, _Container, _Compare>::emplace(_Args&&... __args) { - c.emplace_back(_VSTD::forward<_Args>(__args)...); - _VSTD::push_heap(c.begin(), c.end(), comp); + c.emplace_back(std::forward<_Args>(__args)...); + std::push_heap(c.begin(), c.end(), comp); } #endif // _LIBCPP_CXX03_LANG @@ -913,7 +913,7 @@ void priority_queue<_Tp, _Container, _Compare>::pop() { - _VSTD::pop_heap(c.begin(), c.end(), comp); + std::pop_heap(c.begin(), c.end(), comp); c.pop_back(); } @@ -924,7 +924,7 @@ _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value) { - using _VSTD::swap; + using std::swap; swap(c, __q.c); swap(comp, __q.comp); } diff --git a/libcxx/include/regex b/libcxx/include/regex --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -999,7 +999,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw regex_error(_Ev); #else - _VSTD::abort(); + std::abort(); #endif } @@ -1421,7 +1421,7 @@ __node(const __node&); __node& operator=(const __node&); public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __node() {} @@ -1441,7 +1441,7 @@ : public __node<_CharT> { public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __end_state() {} @@ -1506,7 +1506,7 @@ typedef __owns_one_state<_CharT> base; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __empty_state(__node<_CharT>* __s) @@ -1532,7 +1532,7 @@ typedef __has_one_state<_CharT> base; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __empty_non_own_state(__node<_CharT>* __s) @@ -1558,7 +1558,7 @@ typedef __has_one_state<_CharT> base; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __repeat_one_loop(__node<_CharT>* __s) @@ -1620,7 +1620,7 @@ bool __greedy_; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __loop(unsigned __loop_id, @@ -1719,7 +1719,7 @@ typedef __owns_two_states<_CharT> base; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __alternate(__owns_one_state<_CharT>* __s1, @@ -1758,7 +1758,7 @@ unsigned __mexp_; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __begin_marked_subexpression(unsigned __mexp, __node<_CharT>* __s) @@ -1786,7 +1786,7 @@ unsigned __mexp_; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __end_marked_subexpression(unsigned __mexp, __node<_CharT>* __s) @@ -1815,7 +1815,7 @@ unsigned __mexp_; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __back_ref(unsigned __mexp, __node<_CharT>* __s) @@ -1835,7 +1835,7 @@ { ptrdiff_t __len = __sm.second - __sm.first; if (__s.__last_ - __s.__current_ >= __len && - _VSTD::equal(__sm.first, __sm.second, __s.__current_)) + std::equal(__sm.first, __sm.second, __s.__current_)) { __s.__do_ = __state::__accept_but_not_consume; __s.__current_ += __len; @@ -1865,7 +1865,7 @@ _Traits __traits_; unsigned __mexp_; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __back_ref_icase(const _Traits& __traits, unsigned __mexp, @@ -1920,7 +1920,7 @@ _Traits __traits_; unsigned __mexp_; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __back_ref_collate(const _Traits& __traits, unsigned __mexp, @@ -1975,7 +1975,7 @@ _Traits __traits_; bool __invert_; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY explicit __word_boundary(const _Traits& __traits, bool __invert, @@ -2052,7 +2052,7 @@ bool __multiline_; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __l_anchor_multiline(bool __multiline, __node<_CharT>* __s) @@ -2073,7 +2073,7 @@ } else if (__multiline_ && !__s.__at_first_ && - __is_eol(*_VSTD::prev(__s.__current_))) + __is_eol(*std::prev(__s.__current_))) { __s.__do_ = __state::__accept_but_not_consume; __s.__node_ = this->first(); @@ -2096,7 +2096,7 @@ bool __multiline; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __r_anchor_multiline(bool __multiline, __node<_CharT>* __s) @@ -2136,7 +2136,7 @@ typedef __owns_one_state<_CharT> base; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __match_any(__node<_CharT>* __s) @@ -2171,7 +2171,7 @@ typedef __owns_one_state<_CharT> base; public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __match_any_but_newline(__node<_CharT>* __s) @@ -2198,7 +2198,7 @@ __match_char(const __match_char&); __match_char& operator=(const __match_char&); public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __match_char(_CharT __c, __node<_CharT>* __s) @@ -2238,7 +2238,7 @@ __match_char_icase(const __match_char_icase&); __match_char_icase& operator=(const __match_char_icase&); public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __match_char_icase(const _Traits& __traits, _CharT __c, __node<_CharT>* __s) @@ -2279,7 +2279,7 @@ __match_char_collate(const __match_char_collate&); __match_char_collate& operator=(const __match_char_collate&); public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __match_char_collate(const _Traits& __traits, _CharT __c, __node<_CharT>* __s) @@ -2331,7 +2331,7 @@ __bracket_expression(const __bracket_expression&); __bracket_expression& operator=(const __bracket_expression&); public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __bracket_expression(const _Traits& __traits, __node<_CharT>* __s, @@ -2397,7 +2397,7 @@ __b[0] = __traits_.translate_nocase(__b[0]); __e[0] = __traits_.translate_nocase(__e[0]); } - __ranges_.push_back(make_pair(_VSTD::move(__b), _VSTD::move(__e))); + __ranges_.push_back(make_pair(std::move(__b), std::move(__e))); } } _LIBCPP_INLINE_VISIBILITY @@ -2434,7 +2434,7 @@ ++__consumed; if (__might_have_digraph_) { - const _CharT* __next = _VSTD::next(__s.__current_); + const _CharT* __next = std::next(__s.__current_); if (__next != __s.__last_) { pair<_CharT, _CharT> __ch2(*__s.__current_, *__next); @@ -2528,7 +2528,7 @@ { const bool __in_neg_mask = __traits_.isctype(__ch, __neg_mask_); const bool __in_neg_chars = - _VSTD::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) != + std::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) != __neg_chars_.end(); if (!(__in_neg_mask || __in_neg_chars)) { @@ -2618,8 +2618,8 @@ shared_ptr<__empty_state<_CharT> > __start_; __owns_one_state<_CharT>* __end_; - typedef _VSTD::__state<_CharT> __state; - typedef _VSTD::__node<_CharT> __node; + typedef std::__state<_CharT> __state; + typedef std::__node<_CharT> __node; public: // constants: @@ -2713,7 +2713,7 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY basic_regex& assign(basic_regex&& __that) _NOEXCEPT - {return *this = _VSTD::move(__that);} + {return *this = std::move(__that);} #endif _LIBCPP_INLINE_VISIBILITY basic_regex& assign(const value_type* __p, flag_type __f = regex_constants::ECMAScript) @@ -3098,7 +3098,7 @@ void basic_regex<_CharT, _Traits>::swap(basic_regex& __r) { - using _VSTD::swap; + using std::swap; swap(__traits_, __r.__traits_); swap(__flags_, __r.__flags_); swap(__marked_count_, __r.__marked_count_); @@ -3131,7 +3131,7 @@ __lookahead(const __lookahead&); __lookahead& operator=(const __lookahead&); public: - typedef _VSTD::__state<_CharT> __state; + typedef std::__state<_CharT> __state; _LIBCPP_INLINE_VISIBILITY __lookahead(const basic_regex<_CharT, _Traits>& __exp, bool __invert, __node<_CharT>* __s, unsigned __mexp) @@ -3232,7 +3232,7 @@ __first = __parse_RE_expression(__first, __last); if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp == __last && *__first == '$') { __push_r_anchor(); @@ -3449,7 +3449,7 @@ { if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last) { if (*__first == '\\' && *__temp == '(') @@ -3467,7 +3467,7 @@ { if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last) { if (*__first == '\\' && *__temp == ')') @@ -3485,7 +3485,7 @@ { if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last) { if (*__first == '\\' && *__temp == '{') @@ -3503,7 +3503,7 @@ { if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last) { if (*__first == '\\' && *__temp == '}') @@ -3521,7 +3521,7 @@ { if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last && *__first == '\\' && __test_back_ref(*__temp)) __first = ++__temp; } @@ -3536,7 +3536,7 @@ { if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp == __last && *__first == '$') return __first; // Not called inside a bracket @@ -3594,7 +3594,7 @@ { if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last) { if (*__first == '\\') @@ -3625,7 +3625,7 @@ { if (__first != __last) { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last) { if (*__first == '\\') @@ -3906,7 +3906,7 @@ { if (__first != __last && *__first != ']') { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); basic_string<_CharT> __start_range; if (__temp != __last && *__first == '[') { @@ -3935,7 +3935,7 @@ } if (__first != __last && *__first != ']') { - __temp = _VSTD::next(__first); + __temp = std::next(__first); if (__temp != __last && *__first == '-' && *__temp != ']') { // parse a range @@ -3961,7 +3961,7 @@ ++__first; } } - __ml->__add_range(_VSTD::move(__start_range), _VSTD::move(__end_range)); + __ml->__add_range(std::move(__start_range), std::move(__end_range)); } else if (!__start_range.empty()) { @@ -4116,7 +4116,7 @@ // Found [= // This means =] must exist value_type _Equal_close[2] = {'=', ']'}; - _ForwardIterator __temp = _VSTD::search(__first, __last, _Equal_close, + _ForwardIterator __temp = std::search(__first, __last, _Equal_close, _Equal_close+2); if (__temp == __last) __throw_regex_error(); @@ -4144,7 +4144,7 @@ __throw_regex_error(); } } - __first = _VSTD::next(__temp, 2); + __first = std::next(__temp, 2); return __first; } @@ -4158,7 +4158,7 @@ // Found [: // This means :] must exist value_type _Colon_close[2] = {':', ']'}; - _ForwardIterator __temp = _VSTD::search(__first, __last, _Colon_close, + _ForwardIterator __temp = std::search(__first, __last, _Colon_close, _Colon_close+2); if (__temp == __last) __throw_regex_error(); @@ -4169,7 +4169,7 @@ if (__class_type == 0) __throw_regex_error(); __ml->__add_class(__class_type); - __first = _VSTD::next(__temp, 2); + __first = std::next(__temp, 2); return __first; } @@ -4183,7 +4183,7 @@ // Found [. // This means .] must exist value_type _Dot_close[2] = {'.', ']'}; - _ForwardIterator __temp = _VSTD::search(__first, __last, _Dot_close, + _ForwardIterator __temp = std::search(__first, __last, _Dot_close, _Dot_close+2); if (__temp == __last) __throw_regex_error(); @@ -4197,7 +4197,7 @@ default: __throw_regex_error(); } - __first = _VSTD::next(__temp, 2); + __first = std::next(__temp, 2); return __first; } @@ -4308,7 +4308,7 @@ break; case '\\': { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last) { if (*__temp == 'b') @@ -4326,7 +4326,7 @@ break; case '(': { - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last && *__temp == '?') { if (++__temp != __last) @@ -4339,7 +4339,7 @@ __exp.__flags_ = __flags_; __temp = __exp.__parse(++__temp, __last); unsigned __mexp = __exp.__marked_count_; - __push_lookahead(_VSTD::move(__exp), false, __marked_count_); + __push_lookahead(std::move(__exp), false, __marked_count_); __marked_count_ += __mexp; if (__temp == __last || *__temp != ')') __throw_regex_error(); @@ -4352,7 +4352,7 @@ __exp.__flags_ = __flags_; __temp = __exp.__parse(++__temp, __last); unsigned __mexp = __exp.__marked_count_; - __push_lookahead(_VSTD::move(__exp), true, __marked_count_); + __push_lookahead(std::move(__exp), true, __marked_count_); __marked_count_ += __mexp; if (__temp == __last || *__temp != ')') __throw_regex_error(); @@ -4394,7 +4394,7 @@ ++__first; if (__first == __last) __throw_regex_error(); - _ForwardIterator __temp = _VSTD::next(__first); + _ForwardIterator __temp = std::next(__first); if (__temp != __last && *__first == '?' && *__temp == ':') { ++__open_count_; @@ -4440,7 +4440,7 @@ { if (__first != __last && *__first == '\\') { - _ForwardIterator __t1 = _VSTD::next(__first); + _ForwardIterator __t1 = std::next(__first); if (__t1 == __last) __throw_regex_error(); @@ -4592,7 +4592,7 @@ ++__first; break; case 'c': - if ((__t = _VSTD::next(__first)) != __last) + if ((__t = std::next(__first)) != __last) { if (('A' <= *__t && *__t <= 'Z') || ('a' <= *__t && *__t <= 'z')) @@ -4711,7 +4711,7 @@ _ForwardIterator __last) { __owns_one_state<_CharT>* __sa = __end_; - _ForwardIterator __t1 = _VSTD::find(__first, __last, _CharT('\n')); + _ForwardIterator __t1 = std::find(__first, __last, _CharT('\n')); if (__t1 != __first) __parse_basic_reg_exp(__first, __t1); else @@ -4721,7 +4721,7 @@ ++__first; while (__first != __last) { - __t1 = _VSTD::find(__first, __last, _CharT('\n')); + __t1 = std::find(__first, __last, _CharT('\n')); __owns_one_state<_CharT>* __sb = __end_; if (__t1 != __first) __parse_basic_reg_exp(__first, __t1); @@ -4742,7 +4742,7 @@ _ForwardIterator __last) { __owns_one_state<_CharT>* __sa = __end_; - _ForwardIterator __t1 = _VSTD::find(__first, __last, _CharT('\n')); + _ForwardIterator __t1 = std::find(__first, __last, _CharT('\n')); if (__t1 != __first) __parse_extended_reg_exp(__first, __t1); else @@ -4752,7 +4752,7 @@ ++__first; while (__first != __last) { - __t1 = _VSTD::find(__first, __last, _CharT('\n')); + __t1 = std::find(__first, __last, _CharT('\n')); __owns_one_state<_CharT>* __sb = __end_; if (__t1 != __first) __parse_extended_reg_exp(__first, __t1); @@ -4976,7 +4976,7 @@ _LIBCPP_INLINE_VISIBILITY difference_type length() const - {return matched ? _VSTD::distance(this->first, this->second) : 0;} + {return matched ? std::distance(this->first, this->second) : 0;} _LIBCPP_INLINE_VISIBILITY string_type str() const {return matched ? string_type(this->first, this->second) : string_type();} @@ -5451,7 +5451,7 @@ difference_type position(size_type __sub = 0) const { _LIBCPP_ASSERT(ready(), "match_results::position() called when not ready"); - return _VSTD::distance(__position_start_, (*this)[__sub].first); + return std::distance(__position_start_, (*this)[__sub].first); } _LIBCPP_INLINE_VISIBILITY string_type str(size_type __sub = 0) const @@ -5538,18 +5538,18 @@ __matches_.resize(__m.size()); for (size_type __i = 0; __i < __matches_.size(); ++__i) { - __matches_[__i].first = _VSTD::next(__f, _VSTD::distance(__mf, __m[__i].first)); - __matches_[__i].second = _VSTD::next(__f, _VSTD::distance(__mf, __m[__i].second)); + __matches_[__i].first = std::next(__f, std::distance(__mf, __m[__i].first)); + __matches_[__i].second = std::next(__f, std::distance(__mf, __m[__i].second)); __matches_[__i].matched = __m[__i].matched; } __unmatched_.first = __l; __unmatched_.second = __l; __unmatched_.matched = false; - __prefix_.first = _VSTD::next(__f, _VSTD::distance(__mf, __m.prefix().first)); - __prefix_.second = _VSTD::next(__f, _VSTD::distance(__mf, __m.prefix().second)); + __prefix_.first = std::next(__f, std::distance(__mf, __m.prefix().first)); + __prefix_.second = std::next(__f, std::distance(__mf, __m.prefix().second)); __prefix_.matched = __m.prefix().matched; - __suffix_.first = _VSTD::next(__f, _VSTD::distance(__mf, __m.suffix().first)); - __suffix_.second = _VSTD::next(__f, _VSTD::distance(__mf, __m.suffix().second)); + __suffix_.first = std::next(__f, std::distance(__mf, __m.suffix().first)); + __suffix_.second = std::next(__f, std::distance(__mf, __m.suffix().second)); __suffix_.matched = __m.suffix().matched; if (!__no_update_pos) __position_start_ = __prefix_.first; @@ -5621,7 +5621,7 @@ for (; __fmt_first != __fmt_last; ++__fmt_first) { if (*__fmt_first == '&') - __output_iter = _VSTD::copy(__matches_[0].first, __matches_[0].second, + __output_iter = std::copy(__matches_[0].first, __matches_[0].second, __output_iter); else if (*__fmt_first == '\\' && __fmt_first + 1 != __fmt_last) { @@ -5629,7 +5629,7 @@ if ('0' <= *__fmt_first && *__fmt_first <= '9') { size_t __i = *__fmt_first - '0'; - __output_iter = _VSTD::copy((*this)[__i].first, + __output_iter = std::copy((*this)[__i].first, (*this)[__i].second, __output_iter); } else @@ -5659,16 +5659,16 @@ break; case '&': ++__fmt_first; - __output_iter = _VSTD::copy(__matches_[0].first, __matches_[0].second, + __output_iter = std::copy(__matches_[0].first, __matches_[0].second, __output_iter); break; case '`': ++__fmt_first; - __output_iter = _VSTD::copy(__prefix_.first, __prefix_.second, __output_iter); + __output_iter = std::copy(__prefix_.first, __prefix_.second, __output_iter); break; case '\'': ++__fmt_first; - __output_iter = _VSTD::copy(__suffix_.first, __suffix_.second, __output_iter); + __output_iter = std::copy(__suffix_.first, __suffix_.second, __output_iter); break; default: if ('0' <= __fmt_first[1] && __fmt_first[1] <= '9') @@ -5683,7 +5683,7 @@ __throw_regex_error(); __idx = 10 * __idx + *__fmt_first - '0'; } - __output_iter = _VSTD::copy((*this)[__idx].first, + __output_iter = std::copy((*this)[__idx].first, (*this)[__idx].second, __output_iter); } else @@ -5708,7 +5708,7 @@ void match_results<_BidirectionalIterator, _Allocator>::swap(match_results& __m) { - using _VSTD::swap; + using std::swap; swap(__matches_, __m.__matches_); swap(__unmatched_, __m.__unmatched_); swap(__prefix_, __m.__prefix_); @@ -5805,7 +5805,7 @@ break; } __m.__matches_[0].first = __first; - __m.__matches_[0].second = _VSTD::next(__first, __s.__current_ - __first); + __m.__matches_[0].second = std::next(__first, __s.__current_ - __first); __m.__matches_[0].matched = true; for (unsigned __i = 0; __i < __s.__sub_matches_.size(); ++__i) __m.__matches_[__i+1] = __s.__sub_matches_[__i]; @@ -5819,7 +5819,7 @@ __state __snext = __s; __s.__node_->__exec_split(true, __s); __snext.__node_->__exec_split(false, __snext); - __states.push_back(_VSTD::move(__snext)); + __states.push_back(std::move(__snext)); } break; case __state::__reject: @@ -5845,7 +5845,7 @@ { deque<__state> __states; ptrdiff_t __highest_j = 0; - ptrdiff_t _Np = _VSTD::distance(__first, __last); + ptrdiff_t _Np = std::distance(__first, __last); __node* __st = __start_.get(); if (__st) { @@ -5896,7 +5896,7 @@ case __state::__consume_input: break; case __state::__accept_and_consume: - __states.push_front(_VSTD::move(__s)); + __states.push_front(std::move(__s)); __states.pop_back(); break; case __state::__repeat: @@ -5907,7 +5907,7 @@ __state __snext = __s; __s.__node_->__exec_split(true, __s); __snext.__node_->__exec_split(false, __snext); - __states.push_back(_VSTD::move(__snext)); + __states.push_back(std::move(__snext)); } break; case __state::__reject: @@ -5921,7 +5921,7 @@ if (__matched) { __m.__matches_[0].first = __first; - __m.__matches_[0].second = _VSTD::next(__first, __highest_j); + __m.__matches_[0].second = std::next(__first, __highest_j); __m.__matches_[0].matched = true; return true; } @@ -5940,7 +5940,7 @@ vector<__state> __states; __state __best_state; ptrdiff_t __highest_j = 0; - ptrdiff_t _Np = _VSTD::distance(__first, __last); + ptrdiff_t _Np = std::distance(__first, __last); __node* __st = __start_.get(); if (__st) { @@ -6006,7 +6006,7 @@ __state __snext = __s; __s.__node_->__exec_split(true, __s); __snext.__node_->__exec_split(false, __snext); - __states.push_back(_VSTD::move(__snext)); + __states.push_back(std::move(__snext)); } break; case __state::__reject: @@ -6020,7 +6020,7 @@ if (__matched) { __m.__matches_[0].first = __first; - __m.__matches_[0].second = _VSTD::next(__first, __highest_j); + __m.__matches_[0].second = std::next(__first, __highest_j); __m.__matches_[0].matched = true; for (unsigned __i = 0; __i < __best_state.__sub_matches_.size(); ++__i) __m.__matches_[__i+1] = __best_state.__sub_matches_[__i]; @@ -6097,7 +6097,7 @@ regex_constants::match_flag_type __flags = regex_constants::match_default) { int __offset = (__flags & regex_constants::match_prev_avail) ? 1 : 0; - basic_string<_CharT> __s(_VSTD::prev(__first, __offset), __last); + basic_string<_CharT> __s(std::prev(__first, __offset), __last); match_results __mc; bool __r = __e.__search(__s.data() + __offset, __s.data() + __s.size(), __mc, __flags); __m.__assign(__first, __last, __mc, __flags & regex_constants::__no_update_pos); @@ -6170,7 +6170,7 @@ regex_constants::match_flag_type __flags = regex_constants::match_default) { match_results __m; - return _VSTD::regex_search(__str, __m, __e, __flags); + return std::regex_search(__str, __m, __e, __flags); } template @@ -6216,7 +6216,7 @@ const basic_regex<_CharT, _Traits>& __e, regex_constants::match_flag_type __flags = regex_constants::match_default) { - bool __r = _VSTD::regex_search( + bool __r = std::regex_search( __first, __last, __m, __e, __flags | regex_constants::match_continuous | regex_constants::__full_match); @@ -6237,7 +6237,7 @@ regex_constants::match_flag_type __flags = regex_constants::match_default) { match_results<_BidirectionalIterator> __m; - return _VSTD::regex_match(__first, __last, __m, __e, __flags); + return std::regex_match(__first, __last, __m, __e, __flags); } template @@ -6247,7 +6247,7 @@ const basic_regex<_CharT, _Traits>& __e, regex_constants::match_flag_type __flags = regex_constants::match_default) { - return _VSTD::regex_match(__str, __str + _Traits::length(__str), __m, __e, __flags); + return std::regex_match(__str, __str + _Traits::length(__str), __m, __e, __flags); } template @@ -6258,7 +6258,7 @@ const basic_regex<_CharT, _Traits>& __e, regex_constants::match_flag_type __flags = regex_constants::match_default) { - return _VSTD::regex_match(__s.begin(), __s.end(), __m, __e, __flags); + return std::regex_match(__s.begin(), __s.end(), __m, __e, __flags); } #if _LIBCPP_STD_VER > 11 @@ -6277,7 +6277,7 @@ regex_match(const _CharT* __str, const basic_regex<_CharT, _Traits>& __e, regex_constants::match_flag_type __flags = regex_constants::match_default) { - return _VSTD::regex_match(__str, __str + _Traits::length(__str), __e, __flags); + return std::regex_match(__str, __str + _Traits::length(__str), __e, __flags); } template @@ -6287,7 +6287,7 @@ const basic_regex<_CharT, _Traits>& __e, regex_constants::match_flag_type __flags = regex_constants::match_default) { - return _VSTD::regex_match(__s.begin(), __s.end(), __e, __flags); + return std::regex_match(__s.begin(), __s.end(), __e, __flags); } // regex_iterator @@ -6348,7 +6348,7 @@ _LIBCPP_INLINE_VISIBILITY reference operator*() const {return __match_;} _LIBCPP_INLINE_VISIBILITY - pointer operator->() const {return _VSTD::addressof(__match_);} + pointer operator->() const {return std::addressof(__match_);} regex_iterator& operator++(); _LIBCPP_INLINE_VISIBILITY @@ -6372,10 +6372,10 @@ const regex_type& __re, regex_constants::match_flag_type __m) : __begin_(__a), __end_(__b), - __pregex_(_VSTD::addressof(__re)), + __pregex_(std::addressof(__re)), __flags_(__m) { - _VSTD::regex_search(__begin_, __end_, __match_, *__pregex_, __flags_); + std::regex_search(__begin_, __end_, __match_, *__pregex_, __flags_); } template @@ -6407,7 +6407,7 @@ __match_ = value_type(); return *this; } - else if (_VSTD::regex_search(__start, __end_, __match_, *__pregex_, + else if (std::regex_search(__start, __end_, __match_, *__pregex_, __flags_ | regex_constants::match_not_null | regex_constants::match_continuous)) return *this; @@ -6415,7 +6415,7 @@ ++__start; } __flags_ |= regex_constants::match_prev_avail; - if (!_VSTD::regex_search(__start, __end_, __match_, *__pregex_, __flags_)) + if (!std::regex_search(__start, __end_, __match_, *__pregex_, __flags_)) __match_ = value_type(); return *this; } @@ -6704,7 +6704,7 @@ __establish_result(); else { - if (_VSTD::find(__subs_.begin(), __subs_.end(), -1) != __subs_.end() + if (std::find(__subs_.begin(), __subs_.end(), -1) != __subs_.end() && __prev->suffix().length() != 0) { __suffix_.matched = true; @@ -6735,7 +6735,7 @@ if (__i == __eof) { if (!(__flags & regex_constants::format_no_copy)) - __output_iter = _VSTD::copy(__first, __last, __output_iter); + __output_iter = std::copy(__first, __last, __output_iter); } else { @@ -6743,14 +6743,14 @@ for (size_t __len = char_traits<_CharT>::length(__fmt); __i != __eof; ++__i) { if (!(__flags & regex_constants::format_no_copy)) - __output_iter = _VSTD::copy(__i->prefix().first, __i->prefix().second, __output_iter); + __output_iter = std::copy(__i->prefix().first, __i->prefix().second, __output_iter); __output_iter = __i->format(__output_iter, __fmt, __fmt + __len, __flags); __lm = __i->suffix(); if (__flags & regex_constants::format_first_only) break; } if (!(__flags & regex_constants::format_no_copy)) - __output_iter = _VSTD::copy(__lm.first, __lm.second, __output_iter); + __output_iter = std::copy(__lm.first, __lm.second, __output_iter); } return __output_iter; } @@ -6765,7 +6765,7 @@ const basic_string<_CharT, _ST, _SA>& __fmt, regex_constants::match_flag_type __flags = regex_constants::match_default) { - return _VSTD::regex_replace(__output_iter, __first, __last, __e, __fmt.c_str(), __flags); + return std::regex_replace(__output_iter, __first, __last, __e, __fmt.c_str(), __flags); } template __r; - _VSTD::regex_replace(back_inserter(__r), __s.begin(), __s.end(), __e, + std::regex_replace(back_inserter(__r), __s.begin(), __s.end(), __e, __fmt.c_str(), __flags); return __r; } @@ -6791,7 +6791,7 @@ regex_constants::match_flag_type __flags = regex_constants::match_default) { basic_string<_CharT, _ST, _SA> __r; - _VSTD::regex_replace(back_inserter(__r), __s.begin(), __s.end(), __e, + std::regex_replace(back_inserter(__r), __s.begin(), __s.end(), __e, __fmt, __flags); return __r; } @@ -6805,7 +6805,7 @@ regex_constants::match_flag_type __flags = regex_constants::match_default) { basic_string<_CharT> __r; - _VSTD::regex_replace(back_inserter(__r), __s, + std::regex_replace(back_inserter(__r), __s, __s + char_traits<_CharT>::length(__s), __e, __fmt.c_str(), __flags); return __r; @@ -6820,7 +6820,7 @@ regex_constants::match_flag_type __flags = regex_constants::match_default) { basic_string<_CharT> __r; - _VSTD::regex_replace(back_inserter(__r), __s, + std::regex_replace(back_inserter(__r), __s, __s + char_traits<_CharT>::length(__s), __e, __fmt, __flags); return __r; diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -220,7 +220,7 @@ _LIBCPP_INLINE_VISIBILITY __scoped_allocator_storage(_OuterA2&& __outerAlloc, const _InnerAllocs& ...__innerAllocs) _NOEXCEPT - : outer_allocator_type(_VSTD::forward<_OuterA2>(__outerAlloc)), + : outer_allocator_type(std::forward<_OuterA2>(__outerAlloc)), __inner_(__innerAllocs...) {} template && __other) _NOEXCEPT - : outer_allocator_type(_VSTD::move(__other.outer_allocator())), - __inner_(_VSTD::move(__other.inner_allocator())) {} + : outer_allocator_type(std::move(__other.outer_allocator())), + __inner_(std::move(__other.inner_allocator())) {} template (__o)), + : outer_allocator_type(std::forward<_OuterA2>(__o)), __inner_(__i) { } @@ -300,7 +300,7 @@ >::type> _LIBCPP_INLINE_VISIBILITY __scoped_allocator_storage(_OuterA2&& __outerAlloc) _NOEXCEPT - : outer_allocator_type(_VSTD::forward<_OuterA2>(__outerAlloc)) {} + : outer_allocator_type(std::forward<_OuterA2>(__outerAlloc)) {} template && __other) _NOEXCEPT - : outer_allocator_type(_VSTD::move(__other.outer_allocator())) {} + : outer_allocator_type(std::move(__other.outer_allocator())) {} _LIBCPP_INLINE_VISIBILITY inner_allocator_type& inner_allocator() _NOEXCEPT @@ -445,7 +445,7 @@ _LIBCPP_INLINE_VISIBILITY scoped_allocator_adaptor(_OuterA2&& __outerAlloc, const _InnerAllocs& ...__innerAllocs) _NOEXCEPT - : base(_VSTD::forward<_OuterA2>(__outerAlloc), __innerAllocs...) {} + : base(std::forward<_OuterA2>(__outerAlloc), __innerAllocs...) {} // scoped_allocator_adaptor(const scoped_allocator_adaptor& __other) = default; template && __other) _NOEXCEPT - : base(_VSTD::move(__other)) {} + : base(std::move(__other)) {} // scoped_allocator_adaptor& operator=(const scoped_allocator_adaptor&) = default; // scoped_allocator_adaptor& operator=(scoped_allocator_adaptor&&) = default; @@ -504,7 +504,7 @@ _LIBCPP_INLINE_VISIBILITY void construct(_Tp* __p, _Args&& ...__args) {__construct(__uses_alloc_ctor<_Tp, inner_allocator_type&, _Args...>(), - __p, _VSTD::forward<_Args>(__args)...);} + __p, std::forward<_Args>(__args)...);} template void construct(pair<_T1, _T2>* __p, piecewise_construct_t, @@ -517,14 +517,14 @@ typename __uses_alloc_ctor< _T1, inner_allocator_type&, _Args1... >::type() - , _VSTD::move(__x) + , std::move(__x) , typename __make_tuple_indices::type{} ) , __transform_tuple( typename __uses_alloc_ctor< _T2, inner_allocator_type&, _Args2... >::type() - , _VSTD::move(__y) + , std::move(__y) , typename __make_tuple_indices::type{} ) ); @@ -537,22 +537,22 @@ template void construct(pair<_T1, _T2>* __p, _Up&& __x, _Vp&& __y) { construct(__p, piecewise_construct, - _VSTD::forward_as_tuple(_VSTD::forward<_Up>(__x)), - _VSTD::forward_as_tuple(_VSTD::forward<_Vp>(__y))); + std::forward_as_tuple(std::forward<_Up>(__x)), + std::forward_as_tuple(std::forward<_Vp>(__y))); } template void construct(pair<_T1, _T2>* __p, const pair<_Up, _Vp>& __x) { construct(__p, piecewise_construct, - _VSTD::forward_as_tuple(__x.first), - _VSTD::forward_as_tuple(__x.second)); + std::forward_as_tuple(__x.first), + std::forward_as_tuple(__x.second)); } template void construct(pair<_T1, _T2>* __p, pair<_Up, _Vp>&& __x) { construct(__p, piecewise_construct, - _VSTD::forward_as_tuple(_VSTD::forward<_Up>(__x.first)), - _VSTD::forward_as_tuple(_VSTD::forward<_Vp>(__x.second))); + std::forward_as_tuple(std::forward<_Up>(__x.first)), + std::forward_as_tuple(std::forward<_Vp>(__x.second))); } template @@ -578,7 +578,7 @@ _LIBCPP_INLINE_VISIBILITY scoped_allocator_adaptor(_OuterA2&& __o, const inner_allocator_type& __i) _NOEXCEPT - : base(_VSTD::forward<_OuterA2>(__o), __i) {} + : base(std::forward<_OuterA2>(__o), __i) {} template _LIBCPP_INLINE_VISIBILITY @@ -589,7 +589,7 @@ ( _OM()(outer_allocator()), __p, - _VSTD::forward<_Args>(__args)... + std::forward<_Args>(__args)... ); } @@ -602,7 +602,7 @@ ( _OM()(outer_allocator()), __p, allocator_arg, inner_allocator(), - _VSTD::forward<_Args>(__args)... + std::forward<_Args>(__args)... ); } @@ -615,7 +615,7 @@ ( _OM()(outer_allocator()), __p, - _VSTD::forward<_Args>(__args)..., + std::forward<_Args>(__args)..., inner_allocator() ); } @@ -626,7 +626,7 @@ __transform_tuple(integral_constant, tuple<_Args...>&& __t, __tuple_indices<_Idx...>) { - return _VSTD::forward_as_tuple(_VSTD::get<_Idx>(_VSTD::move(__t))...); + return std::forward_as_tuple(std::get<_Idx>(std::move(__t))...); } template @@ -637,7 +637,7 @@ { using _Tup = tuple; return _Tup(allocator_arg, inner_allocator(), - _VSTD::get<_Idx>(_VSTD::move(__t))...); + std::get<_Idx>(std::move(__t))...); } template @@ -647,7 +647,7 @@ __tuple_indices<_Idx...>) { using _Tup = tuple<_Args&&..., inner_allocator_type&>; - return _Tup(_VSTD::get<_Idx>(_VSTD::move(__t))..., inner_allocator()); + return _Tup(std::get<_Idx>(std::move(__t))..., inner_allocator()); } template friend class __scoped_allocator_storage; diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -523,8 +523,8 @@ typedef typename __base::difference_type difference_type; typedef typename __base::const_iterator iterator; typedef typename __base::const_iterator const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; #if _LIBCPP_STD_VER > 14 typedef __set_node_handle node_type; @@ -597,7 +597,7 @@ _LIBCPP_INLINE_VISIBILITY set(set&& __s) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value) - : __tree_(_VSTD::move(__s.__tree_)) {} + : __tree_(std::move(__s.__tree_)) {} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY @@ -646,7 +646,7 @@ set& operator=(set&& __s) _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) { - __tree_ = _VSTD::move(__s.__tree_); + __tree_ = std::move(__s.__tree_); return *this; } #endif // _LIBCPP_CXX03_LANG @@ -699,11 +699,11 @@ template _LIBCPP_INLINE_VISIBILITY pair emplace(_Args&&... __args) - {return __tree_.__emplace_unique(_VSTD::forward<_Args>(__args)...);} + {return __tree_.__emplace_unique(std::forward<_Args>(__args)...);} template _LIBCPP_INLINE_VISIBILITY iterator emplace_hint(const_iterator __p, _Args&&... __args) - {return __tree_.__emplace_hint_unique(__p, _VSTD::forward<_Args>(__args)...);} + {return __tree_.__emplace_hint_unique(__p, std::forward<_Args>(__args)...);} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY @@ -724,11 +724,11 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY pair insert(value_type&& __v) - {return __tree_.__insert_unique(_VSTD::move(__v));} + {return __tree_.__insert_unique(std::move(__v));} _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, value_type&& __v) - {return __tree_.__insert_unique(__p, _VSTD::move(__v));} + {return __tree_.__insert_unique(__p, std::move(__v));} _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) @@ -753,7 +753,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to set::insert()"); return __tree_.template __node_handle_insert_unique< - node_type, insert_return_type>(_VSTD::move(__nh)); + node_type, insert_return_type>(std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __hint, node_type&& __nh) @@ -761,7 +761,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to set::insert()"); return __tree_.template __node_handle_insert_unique( - __hint, _VSTD::move(__nh)); + __hint, std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY node_type extract(key_type const& __key) @@ -940,13 +940,13 @@ template set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a) - : __tree_(_VSTD::move(__s.__tree_), __a) + : __tree_(std::move(__s.__tree_), __a) { if (__a != __s.get_allocator()) { const_iterator __e = cend(); while (!__s.empty()) - insert(__e, _VSTD::move(__s.__tree_.remove(__s.begin())->__value_)); + insert(__e, std::move(__s.__tree_.remove(__s.begin())->__value_)); } } @@ -958,7 +958,7 @@ operator==(const set<_Key, _Compare, _Allocator>& __x, const set<_Key, _Compare, _Allocator>& __y) { - return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template @@ -967,7 +967,7 @@ operator< (const set<_Key, _Compare, _Allocator>& __x, const set<_Key, _Compare, _Allocator>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template @@ -1022,7 +1022,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename set<_Key, _Compare, _Allocator>::size_type erase_if(set<_Key, _Compare, _Allocator>& __c, _Predicate __pred) { - return _VSTD::__libcpp_erase_if_container(__c, __pred); + return std::__libcpp_erase_if_container(__c, __pred); } #endif @@ -1056,8 +1056,8 @@ typedef typename __base::difference_type difference_type; typedef typename __base::const_iterator iterator; typedef typename __base::const_iterator const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; #if _LIBCPP_STD_VER > 14 typedef __set_node_handle node_type; @@ -1131,7 +1131,7 @@ _LIBCPP_INLINE_VISIBILITY multiset(multiset&& __s) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value) - : __tree_(_VSTD::move(__s.__tree_)) {} + : __tree_(std::move(__s.__tree_)) {} multiset(multiset&& __s, const allocator_type& __a); #endif // _LIBCPP_CXX03_LANG @@ -1178,7 +1178,7 @@ multiset& operator=(multiset&& __s) _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) { - __tree_ = _VSTD::move(__s.__tree_); + __tree_ = std::move(__s.__tree_); return *this; } #endif // _LIBCPP_CXX03_LANG @@ -1231,11 +1231,11 @@ template _LIBCPP_INLINE_VISIBILITY iterator emplace(_Args&&... __args) - {return __tree_.__emplace_multi(_VSTD::forward<_Args>(__args)...);} + {return __tree_.__emplace_multi(std::forward<_Args>(__args)...);} template _LIBCPP_INLINE_VISIBILITY iterator emplace_hint(const_iterator __p, _Args&&... __args) - {return __tree_.__emplace_hint_multi(__p, _VSTD::forward<_Args>(__args)...);} + {return __tree_.__emplace_hint_multi(__p, std::forward<_Args>(__args)...);} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY @@ -1256,11 +1256,11 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY iterator insert(value_type&& __v) - {return __tree_.__insert_multi(_VSTD::move(__v));} + {return __tree_.__insert_multi(std::move(__v));} _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, value_type&& __v) - {return __tree_.__insert_multi(__p, _VSTD::move(__v));} + {return __tree_.__insert_multi(__p, std::move(__v));} _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) @@ -1284,7 +1284,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to multiset::insert()"); return __tree_.template __node_handle_insert_multi( - _VSTD::move(__nh)); + std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __hint, node_type&& __nh) @@ -1292,7 +1292,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to multiset::insert()"); return __tree_.template __node_handle_insert_multi( - __hint, _VSTD::move(__nh)); + __hint, std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY node_type extract(key_type const& __key) @@ -1472,13 +1472,13 @@ template multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_type& __a) - : __tree_(_VSTD::move(__s.__tree_), __a) + : __tree_(std::move(__s.__tree_), __a) { if (__a != __s.get_allocator()) { const_iterator __e = cend(); while (!__s.empty()) - insert(__e, _VSTD::move(__s.__tree_.remove(__s.begin())->__value_)); + insert(__e, std::move(__s.__tree_.remove(__s.begin())->__value_)); } } @@ -1490,7 +1490,7 @@ operator==(const multiset<_Key, _Compare, _Allocator>& __x, const multiset<_Key, _Compare, _Allocator>& __y) { - return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template @@ -1499,7 +1499,7 @@ operator< (const multiset<_Key, _Compare, _Allocator>& __x, const multiset<_Key, _Compare, _Allocator>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template @@ -1553,7 +1553,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename multiset<_Key, _Compare, _Allocator>::size_type erase_if(multiset<_Key, _Compare, _Allocator>& __c, _Predicate __pred) { - return _VSTD::__libcpp_erase_if_container(__c, __pred); + return std::__libcpp_erase_if_container(__c, __pred); } #endif diff --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex --- a/libcxx/include/shared_mutex +++ b/libcxx/include/shared_mutex @@ -325,25 +325,25 @@ _LIBCPP_INLINE_VISIBILITY explicit shared_lock(mutex_type& __m) - : __m_(_VSTD::addressof(__m)), + : __m_(std::addressof(__m)), __owns_(true) {__m_->lock_shared();} _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT - : __m_(_VSTD::addressof(__m)), + : __m_(std::addressof(__m)), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, try_to_lock_t) - : __m_(_VSTD::addressof(__m)), + : __m_(std::addressof(__m)), __owns_(__m.try_lock_shared()) {} _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, adopt_lock_t) - : __m_(_VSTD::addressof(__m)), + : __m_(std::addressof(__m)), __owns_(true) {} @@ -351,7 +351,7 @@ _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __abs_time) - : __m_(_VSTD::addressof(__m)), + : __m_(std::addressof(__m)), __owns_(__m.try_lock_shared_until(__abs_time)) {} @@ -359,7 +359,7 @@ _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __rel_time) - : __m_(_VSTD::addressof(__m)), + : __m_(std::addressof(__m)), __owns_(__m.try_lock_shared_for(__rel_time)) {} @@ -408,8 +408,8 @@ _LIBCPP_INLINE_VISIBILITY void swap(shared_lock& __u) _NOEXCEPT { - _VSTD::swap(__m_, __u.__m_); - _VSTD::swap(__owns_, __u.__owns_); + std::swap(__m_, __u.__m_); + std::swap(__owns_, __u.__owns_); } _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/span b/libcxx/include/span --- a/libcxx/include/span +++ b/libcxx/include/span @@ -199,7 +199,7 @@ #else using iterator = __wrap_iter; #endif - using reverse_iterator = _VSTD::reverse_iterator; + using reverse_iterator = std::reverse_iterator; static constexpr size_type extent = _Extent; @@ -217,7 +217,7 @@ nullptr_t> = nullptr> _LIBCPP_INLINE_VISIBILITY constexpr explicit span(_It __first, size_type __count) - : __data{_VSTD::to_address(__first)} { + : __data{std::to_address(__first)} { (void)__count; _LIBCPP_ASSERT(_Extent == __count, "size mismatch in span's constructor (iterator, len)"); } @@ -228,7 +228,7 @@ contiguous_iterator<_It> && sized_sentinel_for<_End, _It> && !is_convertible_v<_End, size_t>, nullptr_t> = nullptr> _LIBCPP_INLINE_VISIBILITY - constexpr explicit span(_It __first, _End __last) : __data{_VSTD::to_address(__first)} { + constexpr explicit span(_It __first, _End __last) : __data{std::to_address(__first)} { (void)__last; _LIBCPP_ASSERT((__last - __first >= 0), "invalid range in span's constructor (iterator, sentinel)"); _LIBCPP_ASSERT(__last - __first == _Extent, @@ -391,7 +391,7 @@ #else using iterator = __wrap_iter; #endif - using reverse_iterator = _VSTD::reverse_iterator; + using reverse_iterator = std::reverse_iterator; static constexpr size_type extent = dynamic_extent; @@ -408,7 +408,7 @@ nullptr_t> = nullptr> _LIBCPP_INLINE_VISIBILITY constexpr span(_It __first, size_type __count) - : __data{_VSTD::to_address(__first)}, __size{__count} {} + : __data{std::to_address(__first)}, __size{__count} {} template < class _It, class _End, @@ -417,7 +417,7 @@ nullptr_t> = nullptr> _LIBCPP_INLINE_VISIBILITY constexpr span(_It __first, _End __last) - : __data(_VSTD::to_address(__first)), __size(__last - __first) {} + : __data(std::to_address(__first)), __size(__last - __first) {} #endif template diff --git a/libcxx/include/sstream b/libcxx/include/sstream --- a/libcxx/include/sstream +++ b/libcxx/include/sstream @@ -284,7 +284,7 @@ __eout = __rhs.epptr() - __p; } ptrdiff_t __hm = __rhs.__hm_ == nullptr ? -1 : __rhs.__hm_ - __p; - __str_ = _VSTD::move(__rhs.__str_); + __str_ = std::move(__rhs.__str_); __p = const_cast(__str_.data()); if (__binp != -1) this->setg(__p + __binp, __p + __ninp, __p + __einp); @@ -325,7 +325,7 @@ __eout = __rhs.epptr() - __p; } ptrdiff_t __hm = __rhs.__hm_ == nullptr ? -1 : __rhs.__hm_ - __p; - __str_ = _VSTD::move(__rhs.__str_); + __str_ = std::move(__rhs.__str_); __p = const_cast(__str_.data()); if (__binp != -1) this->setg(__p + __binp, __p + __ninp, __p + __einp); @@ -393,7 +393,7 @@ __leout = this->epptr() - __p; } ptrdiff_t __lhm = __hm_ == nullptr ? -1 : __hm_ - __p; - _VSTD::swap(__mode_, __rhs.__mode_); + std::swap(__mode_, __rhs.__mode_); __str_.swap(__rhs.__str_); __p = const_cast(__str_.data()); if (__rbinp != -1) @@ -554,7 +554,7 @@ } #endif // _LIBCPP_NO_EXCEPTIONS } - __hm_ = _VSTD::max(this->pptr() + 1, __hm_); + __hm_ = std::max(this->pptr() + 1, __hm_); if (__mode_ & ios_base::in) { char_type* __p = const_cast(__str_.data()); @@ -655,16 +655,16 @@ _LIBCPP_INLINE_VISIBILITY basic_istringstream(basic_istringstream&& __rhs) - : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs)) - , __sb_(_VSTD::move(__rhs.__sb_)) + : basic_istream<_CharT, _Traits>(std::move(__rhs)) + , __sb_(std::move(__rhs.__sb_)) { basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_); } // 27.8.2.2 Assign and swap: basic_istringstream& operator=(basic_istringstream&& __rhs) { - basic_istream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + basic_istream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } _LIBCPP_INLINE_VISIBILITY @@ -735,16 +735,16 @@ _LIBCPP_INLINE_VISIBILITY basic_ostringstream(basic_ostringstream&& __rhs) - : basic_ostream<_CharT, _Traits>(_VSTD::move(__rhs)) - , __sb_(_VSTD::move(__rhs.__sb_)) + : basic_ostream<_CharT, _Traits>(std::move(__rhs)) + , __sb_(std::move(__rhs.__sb_)) { basic_ostream<_CharT, _Traits>::set_rdbuf(&__sb_); } // 27.8.2.2 Assign and swap: basic_ostringstream& operator=(basic_ostringstream&& __rhs) { - basic_ostream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + basic_ostream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } @@ -816,16 +816,16 @@ _LIBCPP_INLINE_VISIBILITY basic_stringstream(basic_stringstream&& __rhs) - : basic_iostream<_CharT, _Traits>(_VSTD::move(__rhs)) - , __sb_(_VSTD::move(__rhs.__sb_)) + : basic_iostream<_CharT, _Traits>(std::move(__rhs)) + , __sb_(std::move(__rhs.__sb_)) { basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_); } // 27.8.2.2 Assign and swap: basic_stringstream& operator=(basic_stringstream&& __rhs) { - basic_iostream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + basic_iostream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } _LIBCPP_INLINE_VISIBILITY diff --git a/libcxx/include/stack b/libcxx/include/stack --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -155,15 +155,15 @@ _LIBCPP_INLINE_VISIBILITY stack(stack&& __q) _NOEXCEPT_(is_nothrow_move_constructible::value) - : c(_VSTD::move(__q.c)) {} + : c(std::move(__q.c)) {} _LIBCPP_INLINE_VISIBILITY stack& operator=(stack&& __q) _NOEXCEPT_(is_nothrow_move_assignable::value) - {c = _VSTD::move(__q.c); return *this;} + {c = std::move(__q.c); return *this;} _LIBCPP_INLINE_VISIBILITY - explicit stack(container_type&& __c) : c(_VSTD::move(__c)) {} + explicit stack(container_type&& __c) : c(std::move(__c)) {} #endif // _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY @@ -189,12 +189,12 @@ _LIBCPP_INLINE_VISIBILITY stack(container_type&& __c, const _Alloc& __a, __enable_if_t::value>* = 0) - : c(_VSTD::move(__c), __a) {} + : c(std::move(__c), __a) {} template _LIBCPP_INLINE_VISIBILITY stack(stack&& __s, const _Alloc& __a, __enable_if_t::value>* = 0) - : c(_VSTD::move(__s.c), __a) {} + : c(std::move(__s.c), __a) {} #endif // _LIBCPP_CXX03_LANG #if _LIBCPP_STD_VER > 20 @@ -224,16 +224,16 @@ void push(const value_type& __v) {c.push_back(__v);} #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY - void push(value_type&& __v) {c.push_back(_VSTD::move(__v));} + void push(value_type&& __v) {c.push_back(std::move(__v));} template _LIBCPP_INLINE_VISIBILITY #if _LIBCPP_STD_VER > 14 decltype(auto) emplace(_Args&&... __args) - { return c.emplace_back(_VSTD::forward<_Args>(__args)...);} + { return c.emplace_back(std::forward<_Args>(__args)...);} #else void emplace(_Args&&... __args) - { c.emplace_back(_VSTD::forward<_Args>(__args)...);} + { c.emplace_back(std::forward<_Args>(__args)...);} #endif #endif // _LIBCPP_CXX03_LANG @@ -244,7 +244,7 @@ void swap(stack& __s) _NOEXCEPT_(__is_nothrow_swappable::value) { - using _VSTD::swap; + using std::swap; swap(c, __s.c); } diff --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept --- a/libcxx/include/stdexcept +++ b/libcxx/include/stdexcept @@ -78,7 +78,7 @@ { #ifndef _LIBCPP_ABI_VCRUNTIME private: - _VSTD::__libcpp_refstring __imp_; + std::__libcpp_refstring __imp_; public: explicit logic_error(const string&); explicit logic_error(const char*); @@ -91,7 +91,7 @@ virtual const char* what() const _NOEXCEPT; #else public: - explicit logic_error(const _VSTD::string&); // Symbol uses versioned std::string + explicit logic_error(const std::string&); // Symbol uses versioned std::string _LIBCPP_INLINE_VISIBILITY explicit logic_error(const char* __s) : exception(__s) {} #endif }; @@ -101,7 +101,7 @@ { #ifndef _LIBCPP_ABI_VCRUNTIME private: - _VSTD::__libcpp_refstring __imp_; + std::__libcpp_refstring __imp_; public: explicit runtime_error(const string&); explicit runtime_error(const char*); @@ -114,7 +114,7 @@ virtual const char* what() const _NOEXCEPT; #else public: - explicit runtime_error(const _VSTD::string&); // Symbol uses versioned std::string + explicit runtime_error(const std::string&); // Symbol uses versioned std::string _LIBCPP_INLINE_VISIBILITY explicit runtime_error(const char* __s) : exception(__s) {} #endif // _LIBCPP_ABI_VCRUNTIME }; @@ -223,7 +223,7 @@ throw logic_error(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } @@ -234,7 +234,7 @@ throw domain_error(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } @@ -245,7 +245,7 @@ throw invalid_argument(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } @@ -256,7 +256,7 @@ throw length_error(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } @@ -267,7 +267,7 @@ throw out_of_range(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } @@ -278,7 +278,7 @@ throw range_error(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } @@ -289,7 +289,7 @@ throw overflow_error(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } @@ -300,7 +300,7 @@ throw underflow_error(__msg); #else ((void)__msg); - _VSTD::abort(); + std::abort(); #endif } diff --git a/libcxx/include/streambuf b/libcxx/include/streambuf --- a/libcxx/include/streambuf +++ b/libcxx/include/streambuf @@ -349,13 +349,13 @@ void basic_streambuf<_CharT, _Traits>::swap(basic_streambuf& __sb) { - _VSTD::swap(__loc_, __sb.__loc_); - _VSTD::swap(__binp_, __sb.__binp_); - _VSTD::swap(__ninp_, __sb.__ninp_); - _VSTD::swap(__einp_, __sb.__einp_); - _VSTD::swap(__bout_, __sb.__bout_); - _VSTD::swap(__nout_, __sb.__nout_); - _VSTD::swap(__eout_, __sb.__eout_); + std::swap(__loc_, __sb.__loc_); + std::swap(__binp_, __sb.__binp_); + std::swap(__ninp_, __sb.__ninp_); + std::swap(__einp_, __sb.__einp_); + std::swap(__bout_, __sb.__bout_); + std::swap(__nout_, __sb.__nout_); + std::swap(__eout_, __sb.__eout_); } template @@ -411,8 +411,8 @@ { if (__ninp_ < __einp_) { - const streamsize __len = _VSTD::min(static_cast(INT_MAX), - _VSTD::min(__einp_ - __ninp_, __n - __i)); + const streamsize __len = std::min(static_cast(INT_MAX), + std::min(__einp_ - __ninp_, __n - __i)); traits_type::copy(__s, __ninp_, __len); __s += __len; __i += __len; @@ -470,7 +470,7 @@ } else { - streamsize __chunk_size = _VSTD::min(__eout_ - __nout_, __n - __i); + streamsize __chunk_size = std::min(__eout_ - __nout_, __n - __i); traits_type::copy(__nout_, __s, __chunk_size); __nout_ += __chunk_size; __s += __chunk_size; diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -706,8 +706,8 @@ typedef __wrap_iter iterator; typedef __wrap_iter const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; private: @@ -829,7 +829,7 @@ basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) { _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr"); __init(__s, traits_type::length(__s)); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template ::value, nullptr_t> > @@ -979,7 +979,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void resize_and_overwrite(size_type __n, _Op __op) { __resize_default_init(__n); - __erase_to_end(_VSTD::move(__op)(data(), _LIBCPP_AUTO_CAST(__n))); + __erase_to_end(std::move(__op)(data(), _LIBCPP_AUTO_CAST(__n))); } #endif @@ -1096,7 +1096,7 @@ _LIBCPP_INLINE_VISIBILITY basic_string& assign(basic_string&& __str) _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value)) - {*this = _VSTD::move(__str); return *this;} + {*this = std::move(__str); return *this;} #endif basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos); template @@ -1259,10 +1259,10 @@ _LIBCPP_INLINE_VISIBILITY const value_type* c_str() const _NOEXCEPT {return data();} _LIBCPP_INLINE_VISIBILITY - const value_type* data() const _NOEXCEPT {return _VSTD::__to_address(__get_pointer());} + const value_type* data() const _NOEXCEPT {return std::__to_address(__get_pointer());} #if _LIBCPP_STD_VER > 14 || defined(_LIBCPP_BUILDING_LIBRARY) _LIBCPP_INLINE_VISIBILITY - value_type* data() _NOEXCEPT {return _VSTD::__to_address(__get_pointer());} + value_type* data() _NOEXCEPT {return std::__to_address(__get_pointer());} #endif _LIBCPP_INLINE_VISIBILITY @@ -1651,7 +1651,7 @@ allocator_type __a = __str.__alloc(); pointer __p = __alloc_traits::allocate(__a, __str.__get_long_cap()); __clear_and_shrink(); - __alloc() = _VSTD::move(__a); + __alloc() = std::move(__a); __set_long_pointer(__p); __set_long_cap(__str.__get_long_cap()); __set_long_size(__str.size()); @@ -1689,7 +1689,7 @@ void __move_assign_alloc(basic_string& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { - __alloc() = _VSTD::move(__c.__alloc()); + __alloc() = std::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY @@ -1705,7 +1705,7 @@ pointer __p = __is_long() ? (__set_long_size(__n), __get_long_pointer()) : (__set_short_size(__n), __get_short_pointer()); - traits_type::move(_VSTD::__to_address(__p), __s, __n); + traits_type::move(std::__to_address(__p), __s, __n); traits_type::assign(__p[__n], value_type()); return *this; } @@ -1723,7 +1723,7 @@ template _LIBCPP_INLINE_VISIBILITY bool __addr_in_range(_Tp&& __t) const { - const volatile void *__p = _VSTD::addressof(__t); + const volatile void *__p = std::addressof(__t); return data() <= __p && __p <= data() + size(); } @@ -1732,7 +1732,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS __basic_string_common::__throw_length_error(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -1741,7 +1741,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS __basic_string_common::__throw_out_of_range(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -1825,7 +1825,7 @@ { (*__p)->__c_ = nullptr; if (--__c->end_ != __p) - _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); } } __get_db()->unlock(); @@ -1842,7 +1842,7 @@ _NOEXCEPT_(is_nothrow_default_constructible::value) : __r_(__default_init_tag(), __default_init_tag()) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __zero(); } @@ -1856,7 +1856,7 @@ #endif : __r_(__default_init_tag(), __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __zero(); } @@ -1881,7 +1881,7 @@ __set_long_cap(__cap+1); __set_long_size(__sz); } - traits_type::copy(_VSTD::__to_address(__p), __s, __sz); + traits_type::copy(std::__to_address(__p), __s, __sz); traits_type::assign(__p[__sz], value_type()); } @@ -1905,7 +1905,7 @@ __set_long_cap(__cap+1); __set_long_size(__sz); } - traits_type::copy(_VSTD::__to_address(__p), __s, __sz); + traits_type::copy(std::__to_address(__p), __s, __sz); traits_type::assign(__p[__sz], value_type()); } @@ -1916,7 +1916,7 @@ { _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*, allocator) detected nullptr"); __init(__s, traits_type::length(__s)); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -1926,7 +1926,7 @@ { _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr"); __init(__s, __n); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -1936,7 +1936,7 @@ { _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullptr"); __init(__s, __n); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -1946,9 +1946,9 @@ if (!__str.__is_long()) __r_.first().__r = __str.__r_.first().__r; else - __init_copy_ctor_external(_VSTD::__to_address(__str.__get_long_pointer()), + __init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size()); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -1959,9 +1959,9 @@ if (!__str.__is_long()) __r_.first().__r = __str.__r_.first().__r; else - __init_copy_ctor_external(_VSTD::__to_address(__str.__get_long_pointer()), + __init_copy_ctor_external(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size()); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -1980,7 +1980,7 @@ __set_long_cap(__cap + 1); __set_long_size(__sz); } - traits_type::copy(_VSTD::__to_address(__p), __s, __sz + 1); + traits_type::copy(std::__to_address(__p), __s, __sz + 1); } #ifndef _LIBCPP_CXX03_LANG @@ -1993,10 +1993,10 @@ #else _NOEXCEPT #endif - : __r_(_VSTD::move(__str.__r_)) + : __r_(std::move(__str.__r_)) { __str.__zero(); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 if (!__libcpp_is_constant_evaluated() && __is_long()) __get_db()->swap(this, &__str); @@ -2009,13 +2009,13 @@ : __r_(__default_init_tag(), __a) { if (__str.__is_long() && __a != __str.__alloc()) // copy, not move - __init(_VSTD::__to_address(__str.__get_long_pointer()), __str.__get_long_size()); + __init(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size()); else { __r_.first().__r = __str.__r_.first().__r; __str.__zero(); } - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 if (!__libcpp_is_constant_evaluated() && __is_long()) __get_db()->swap(this, &__str); @@ -2044,7 +2044,7 @@ __set_long_cap(__cap+1); __set_long_size(__n); } - traits_type::assign(_VSTD::__to_address(__p), __n, __c); + traits_type::assign(std::__to_address(__p), __n, __c); traits_type::assign(__p[__n], value_type()); } @@ -2054,7 +2054,7 @@ : __r_(__default_init_tag(), __default_init_tag()) { __init(__n, __c); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2063,7 +2063,7 @@ : __r_(__default_init_tag(), __a) { __init(__n, __c); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2075,8 +2075,8 @@ size_type __str_sz = __str.size(); if (__pos > __str_sz) this->__throw_out_of_range(); - __init(__str.data() + __pos, _VSTD::min(__n, __str_sz - __pos)); - _VSTD::__debug_db_insert_c(this); + __init(__str.data() + __pos, std::min(__n, __str_sz - __pos)); + std::__debug_db_insert_c(this); } template @@ -2089,7 +2089,7 @@ if (__pos > __str_sz) this->__throw_out_of_range(); __init(__str.data() + __pos, __str_sz - __pos); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2101,7 +2101,7 @@ __self_view __sv0 = __t; __self_view __sv = __sv0.substr(__pos, __n); __init(__sv.data(), __sv.size()); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2111,7 +2111,7 @@ { __self_view __sv = __t; __init(__sv.data(), __sv.size()); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2121,7 +2121,7 @@ { __self_view __sv = __t; __init(__sv.data(), __sv.size()); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2158,7 +2158,7 @@ > basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _ForwardIterator __last) { - size_type __sz = static_cast(_VSTD::distance(__first, __last)); + size_type __sz = static_cast(std::distance(__first, __last)); if (__sz > max_size()) this->__throw_length_error(); pointer __p; @@ -2201,7 +2201,7 @@ : __r_(__default_init_tag(), __default_init_tag()) { __init(__first, __last); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2212,7 +2212,7 @@ : __r_(__default_init_tag(), __a) { __init(__first, __last); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } #ifndef _LIBCPP_CXX03_LANG @@ -2224,7 +2224,7 @@ : __r_(__default_init_tag(), __default_init_tag()) { __init(__il.begin(), __il.end()); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2235,7 +2235,7 @@ : __r_(__default_init_tag(), __a) { __init(__il.begin(), __il.end()); - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } #endif // _LIBCPP_CXX03_LANG @@ -2262,19 +2262,19 @@ this->__throw_length_error(); pointer __old_p = __get_pointer(); size_type __cap = __old_cap < __ms / 2 - __alignment ? - __recommend(_VSTD::max(__old_cap + __delta_cap, 2 * __old_cap)) : + __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) : __ms - 1; pointer __p = __alloc_traits::allocate(__alloc(), __cap+1); __invalidate_all_iterators(); if (__n_copy != 0) - traits_type::copy(_VSTD::__to_address(__p), - _VSTD::__to_address(__old_p), __n_copy); + traits_type::copy(std::__to_address(__p), + std::__to_address(__old_p), __n_copy); if (__n_add != 0) - traits_type::copy(_VSTD::__to_address(__p) + __n_copy, __p_new_stuff, __n_add); + traits_type::copy(std::__to_address(__p) + __n_copy, __p_new_stuff, __n_add); size_type __sec_cp_sz = __old_sz - __n_del - __n_copy; if (__sec_cp_sz != 0) - traits_type::copy(_VSTD::__to_address(__p) + __n_copy + __n_add, - _VSTD::__to_address(__old_p) + __n_copy + __n_del, __sec_cp_sz); + traits_type::copy(std::__to_address(__p) + __n_copy + __n_add, + std::__to_address(__old_p) + __n_copy + __n_del, __sec_cp_sz); if (__old_cap+1 != __min_cap) __alloc_traits::deallocate(__alloc(), __old_p, __old_cap+1); __set_long_pointer(__p); @@ -2294,17 +2294,17 @@ this->__throw_length_error(); pointer __old_p = __get_pointer(); size_type __cap = __old_cap < __ms / 2 - __alignment ? - __recommend(_VSTD::max(__old_cap + __delta_cap, 2 * __old_cap)) : + __recommend(std::max(__old_cap + __delta_cap, 2 * __old_cap)) : __ms - 1; pointer __p = __alloc_traits::allocate(__alloc(), __cap+1); __invalidate_all_iterators(); if (__n_copy != 0) - traits_type::copy(_VSTD::__to_address(__p), - _VSTD::__to_address(__old_p), __n_copy); + traits_type::copy(std::__to_address(__p), + std::__to_address(__old_p), __n_copy); size_type __sec_cp_sz = __old_sz - __n_del - __n_copy; if (__sec_cp_sz != 0) - traits_type::copy(_VSTD::__to_address(__p) + __n_copy + __n_add, - _VSTD::__to_address(__old_p) + __n_copy + __n_del, + traits_type::copy(std::__to_address(__p) + __n_copy + __n_add, + std::__to_address(__old_p) + __n_copy + __n_del, __sec_cp_sz); if (__old_cap+1 != __min_cap) __alloc_traits::deallocate(__alloc(), __old_p, __old_cap+1); @@ -2323,7 +2323,7 @@ if (__n < __cap) { pointer __p = __is_short ? __get_short_pointer() : __get_long_pointer(); __is_short ? __set_short_size(__n) : __set_long_size(__n); - traits_type::copy(_VSTD::__to_address(__p), __s, __n); + traits_type::copy(std::__to_address(__p), __s, __n); traits_type::assign(__p[__n], value_type()); __invalidate_iterators_past(__n); } else { @@ -2339,7 +2339,7 @@ const value_type* __s, size_type __n) { size_type __cap = capacity(); if (__cap >= __n) { - value_type* __p = _VSTD::__to_address(__get_pointer()); + value_type* __p = std::__to_address(__get_pointer()); traits_type::move(__p, __s, __n); return __null_terminate_at(__p, __n); } else { @@ -2369,7 +2369,7 @@ size_type __sz = size(); __grow_by(__cap, __n - __cap, __sz, 0, __sz); } - value_type* __p = _VSTD::__to_address(__get_pointer()); + value_type* __p = std::__to_address(__get_pointer()); traits_type::assign(__p, __n, __c); return __null_terminate_at(__p, __n); } @@ -2492,7 +2492,7 @@ { size_type __cap = capacity(); size_type __n = __string_is_trivial_iterator<_ForwardIterator>::value ? - static_cast(_VSTD::distance(__first, __last)) : 0; + static_cast(std::distance(__first, __last)) : 0; if (__string_is_trivial_iterator<_ForwardIterator>::value && (__cap >= __n || !__addr_in_range(*__first))) @@ -2524,7 +2524,7 @@ size_type __sz = __str.size(); if (__pos > __sz) this->__throw_out_of_range(); - return assign(__str.data() + __pos, _VSTD::min(__n, __sz - __pos)); + return assign(__str.data() + __pos, std::min(__n, __sz - __pos)); } template @@ -2541,7 +2541,7 @@ size_type __sz = __sv.size(); if (__pos > __sz) this->__throw_out_of_range(); - return assign(__sv.data() + __pos, _VSTD::min(__n, __sz - __pos)); + return assign(__sv.data() + __pos, std::min(__n, __sz - __pos)); } @@ -2575,7 +2575,7 @@ { if (__n) { - value_type* __p = _VSTD::__to_address(__get_pointer()); + value_type* __p = std::__to_address(__get_pointer()); traits_type::copy(__p + __sz, __s, __n); __sz += __n; __set_size(__sz); @@ -2598,7 +2598,7 @@ if (__cap - __sz < __n) __grow_by(__cap, __sz + __n - __cap, __sz, __sz, 0); pointer __p = __get_pointer(); - traits_type::assign(_VSTD::__to_address(__p) + __sz, __n, __c); + traits_type::assign(std::__to_address(__p) + __sz, __n, __c); __sz += __n; __set_size(__sz); traits_type::assign(__p[__sz], value_type()); @@ -2672,7 +2672,7 @@ { size_type __sz = size(); size_type __cap = capacity(); - size_type __n = static_cast(_VSTD::distance(__first, __last)); + size_type __n = static_cast(std::distance(__first, __last)); if (__n) { if (__string_is_trivial_iterator<_ForwardIterator>::value && @@ -2710,7 +2710,7 @@ size_type __sz = __str.size(); if (__pos > __sz) this->__throw_out_of_range(); - return append(__str.data() + __pos, _VSTD::min(__n, __sz - __pos)); + return append(__str.data() + __pos, std::min(__n, __sz - __pos)); } template @@ -2726,7 +2726,7 @@ size_type __sz = __sv.size(); if (__pos > __sz) this->__throw_out_of_range(); - return append(__sv.data() + __pos, _VSTD::min(__n, __sz - __pos)); + return append(__sv.data() + __pos, std::min(__n, __sz - __pos)); } template @@ -2752,7 +2752,7 @@ { if (__n) { - value_type* __p = _VSTD::__to_address(__get_pointer()); + value_type* __p = std::__to_address(__get_pointer()); size_type __n_move = __sz - __pos; if (__n_move != 0) { @@ -2784,7 +2784,7 @@ value_type* __p; if (__cap - __sz >= __n) { - __p = _VSTD::__to_address(__get_pointer()); + __p = std::__to_address(__get_pointer()); size_type __n_move = __sz - __pos; if (__n_move != 0) traits_type::move(__p + __pos + __n, __p + __pos, __n_move); @@ -2792,7 +2792,7 @@ else { __grow_by(__cap, __sz + __n - __cap, __sz, __pos, 0, __n); - __p = _VSTD::__to_address(__get_long_pointer()); + __p = std::__to_address(__get_long_pointer()); } traits_type::assign(__p + __pos, __n, __c); __sz += __n; @@ -2832,7 +2832,7 @@ " referring to this string"); size_type __ip = static_cast(__pos - begin()); - size_type __n = static_cast(_VSTD::distance(__first, __last)); + size_type __n = static_cast(std::distance(__first, __last)); if (__n) { if (__string_is_trivial_iterator<_ForwardIterator>::value && @@ -2843,7 +2843,7 @@ value_type* __p; if (__cap - __sz >= __n) { - __p = _VSTD::__to_address(__get_pointer()); + __p = std::__to_address(__get_pointer()); size_type __n_move = __sz - __ip; if (__n_move != 0) traits_type::move(__p + __ip + __n, __p + __ip, __n_move); @@ -2851,7 +2851,7 @@ else { __grow_by(__cap, __sz + __n - __cap, __sz, __ip, 0, __n); - __p = _VSTD::__to_address(__get_long_pointer()); + __p = std::__to_address(__get_long_pointer()); } __sz += __n; __set_size(__sz); @@ -2884,7 +2884,7 @@ size_type __str_sz = __str.size(); if (__pos2 > __str_sz) this->__throw_out_of_range(); - return insert(__pos1, __str.data() + __pos2, _VSTD::min(__n, __str_sz - __pos2)); + return insert(__pos1, __str.data() + __pos2, std::min(__n, __str_sz - __pos2)); } template @@ -2901,7 +2901,7 @@ size_type __str_sz = __sv.size(); if (__pos2 > __str_sz) this->__throw_out_of_range(); - return insert(__pos1, __sv.data() + __pos2, _VSTD::min(__n, __str_sz - __pos2)); + return insert(__pos1, __sv.data() + __pos2, std::min(__n, __str_sz - __pos2)); } template @@ -2923,11 +2923,11 @@ if (__cap == __sz) { __grow_by(__cap, 1, __sz, __ip, 0, 1); - __p = _VSTD::__to_address(__get_long_pointer()); + __p = std::__to_address(__get_long_pointer()); } else { - __p = _VSTD::__to_address(__get_pointer()); + __p = std::__to_address(__get_pointer()); size_type __n_move = __sz - __ip; if (__n_move != 0) traits_type::move(__p + __ip + 1, __p + __ip, __n_move); @@ -2962,11 +2962,11 @@ size_type __sz = size(); if (__pos > __sz) this->__throw_out_of_range(); - __n1 = _VSTD::min(__n1, __sz - __pos); + __n1 = std::min(__n1, __sz - __pos); size_type __cap = capacity(); if (__cap - __sz + __n1 >= __n2) { - value_type* __p = _VSTD::__to_address(__get_pointer()); + value_type* __p = std::__to_address(__get_pointer()); if (__n1 != __n2) { size_type __n_move = __sz - __pos - __n1; @@ -3009,12 +3009,12 @@ size_type __sz = size(); if (__pos > __sz) this->__throw_out_of_range(); - __n1 = _VSTD::min(__n1, __sz - __pos); + __n1 = std::min(__n1, __sz - __pos); size_type __cap = capacity(); value_type* __p; if (__cap - __sz + __n1 >= __n2) { - __p = _VSTD::__to_address(__get_pointer()); + __p = std::__to_address(__get_pointer()); if (__n1 != __n2) { size_type __n_move = __sz - __pos - __n1; @@ -3025,7 +3025,7 @@ else { __grow_by(__cap, __sz - __n1 + __n2 - __cap, __sz, __pos, __n1, __n2); - __p = _VSTD::__to_address(__get_long_pointer()); + __p = std::__to_address(__get_long_pointer()); } traits_type::assign(__p + __pos, __n2, __c); return __null_terminate_at(__p, __sz - (__n1 - __n2)); @@ -3061,7 +3061,7 @@ size_type __str_sz = __str.size(); if (__pos2 > __str_sz) this->__throw_out_of_range(); - return replace(__pos1, __n1, __str.data() + __pos2, _VSTD::min(__n2, __str_sz - __pos2)); + return replace(__pos1, __n1, __str.data() + __pos2, std::min(__n2, __str_sz - __pos2)); } template @@ -3078,7 +3078,7 @@ size_type __str_sz = __sv.size(); if (__pos2 > __str_sz) this->__throw_out_of_range(); - return replace(__pos1, __n1, __sv.data() + __pos2, _VSTD::min(__n2, __str_sz - __pos2)); + return replace(__pos1, __n1, __sv.data() + __pos2, std::min(__n2, __str_sz - __pos2)); } template @@ -3134,8 +3134,8 @@ if (__n) { size_type __sz = size(); - value_type* __p = _VSTD::__to_address(__get_pointer()); - __n = _VSTD::min(__n, __sz - __pos); + value_type* __p = std::__to_address(__get_pointer()); + __n = std::min(__n, __sz - __pos); size_type __n_move = __sz - __pos - __n; if (__n_move != 0) traits_type::move(__p + __pos, __p + __pos + __n, __n_move); @@ -3220,7 +3220,7 @@ void basic_string<_CharT, _Traits, _Allocator>::__erase_to_end(size_type __pos) { - __null_terminate_at(_VSTD::__to_address(__get_pointer()), __pos); + __null_terminate_at(std::__to_address(__get_pointer()), __pos); } template @@ -3270,7 +3270,7 @@ if (__requested_capacity <= capacity()) return; #endif - size_type __target_capacity = _VSTD::max(__requested_capacity, size()); + size_type __target_capacity = std::max(__requested_capacity, size()); __target_capacity = __recommend(__target_capacity); if (__target_capacity == capacity()) return; @@ -3331,8 +3331,8 @@ __was_long = __is_long(); __p = __get_pointer(); } - traits_type::copy(_VSTD::__to_address(__new_data), - _VSTD::__to_address(__p), size()+1); + traits_type::copy(std::__to_address(__new_data), + std::__to_address(__p), size()+1); if (__was_long) __alloc_traits::deallocate(__alloc(), __p, __cap+1); if (__now_long) @@ -3425,7 +3425,7 @@ size_type __sz = size(); if (__pos > __sz) this->__throw_out_of_range(); - size_type __rlen = _VSTD::min(__n, __sz - __pos); + size_type __rlen = std::min(__n, __sz - __pos); traits_type::copy(__s, data() + __pos, __rlen); return __rlen; } @@ -3462,8 +3462,8 @@ __alloc_traits::propagate_on_container_swap::value || __alloc_traits::is_always_equal::value || __alloc() == __str.__alloc(), "swapping non-equal allocators"); - _VSTD::swap(__r_.first(), __str.__r_.first()); - _VSTD::__swap_allocator(__alloc(), __str.__alloc()); + std::swap(__r_.first(), __str.__r_.first()); + std::__swap_allocator(__alloc(), __str.__alloc()); } // find @@ -3840,7 +3840,7 @@ size_t __lhs_sz = size(); size_t __rhs_sz = __sv.size(); int __result = traits_type::compare(data(), __sv.data(), - _VSTD::min(__lhs_sz, __rhs_sz)); + std::min(__lhs_sz, __rhs_sz)); if (__result != 0) return __result; if (__lhs_sz < __rhs_sz) @@ -3869,8 +3869,8 @@ size_type __sz = size(); if (__pos1 > __sz || __n2 == npos) this->__throw_out_of_range(); - size_type __rlen = _VSTD::min(__n1, __sz - __pos1); - int __r = traits_type::compare(data() + __pos1, __s, _VSTD::min(__rlen, __n2)); + size_type __rlen = std::min(__n1, __sz - __pos1); + int __r = traits_type::compare(data() + __pos1, __s, std::min(__rlen, __n2)); if (__r == 0) { if (__rlen < __n2) @@ -4259,7 +4259,7 @@ basic_string<_CharT, _Traits, _Allocator> operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs) { - return _VSTD::move(__lhs.append(__rhs)); + return std::move(__lhs.append(__rhs)); } template @@ -4267,7 +4267,7 @@ basic_string<_CharT, _Traits, _Allocator> operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs) { - return _VSTD::move(__rhs.insert(0, __lhs)); + return std::move(__rhs.insert(0, __lhs)); } template @@ -4275,7 +4275,7 @@ basic_string<_CharT, _Traits, _Allocator> operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs) { - return _VSTD::move(__lhs.append(__rhs)); + return std::move(__lhs.append(__rhs)); } template @@ -4283,7 +4283,7 @@ basic_string<_CharT, _Traits, _Allocator> operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs) { - return _VSTD::move(__rhs.insert(0, __lhs)); + return std::move(__rhs.insert(0, __lhs)); } template @@ -4292,7 +4292,7 @@ operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs) { __rhs.insert(__rhs.begin(), __lhs); - return _VSTD::move(__rhs); + return std::move(__rhs); } template @@ -4300,7 +4300,7 @@ basic_string<_CharT, _Traits, _Allocator> operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs) { - return _VSTD::move(__lhs.append(__rhs)); + return std::move(__lhs.append(__rhs)); } template @@ -4309,7 +4309,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs) { __lhs.push_back(__rhs); - return _VSTD::move(__lhs); + return std::move(__lhs); } #endif // _LIBCPP_CXX03_LANG @@ -4424,7 +4424,7 @@ typename basic_string<_CharT, _Traits, _Allocator>::size_type erase(basic_string<_CharT, _Traits, _Allocator>& __str, const _Up& __v) { auto __old_size = __str.size(); - __str.erase(_VSTD::remove(__str.begin(), __str.end(), __v), __str.end()); + __str.erase(std::remove(__str.begin(), __str.end(), __v), __str.end()); return __old_size - __str.size(); } @@ -4434,7 +4434,7 @@ erase_if(basic_string<_CharT, _Traits, _Allocator>& __str, _Predicate __pred) { auto __old_size = __str.size(); - __str.erase(_VSTD::remove_if(__str.begin(), __str.end(), __pred), + __str.erase(std::remove_if(__str.begin(), __str.end(), __pred), __str.end()); return __old_size - __str.size(); } @@ -4446,23 +4446,23 @@ bool basic_string<_CharT, _Traits, _Allocator>::__dereferenceable(const const_iterator* __i) const { - return this->data() <= _VSTD::__to_address(__i->base()) && - _VSTD::__to_address(__i->base()) < this->data() + this->size(); + return this->data() <= std::__to_address(__i->base()) && + std::__to_address(__i->base()) < this->data() + this->size(); } template bool basic_string<_CharT, _Traits, _Allocator>::__decrementable(const const_iterator* __i) const { - return this->data() < _VSTD::__to_address(__i->base()) && - _VSTD::__to_address(__i->base()) <= this->data() + this->size(); + return this->data() < std::__to_address(__i->base()) && + std::__to_address(__i->base()) <= this->data() + this->size(); } template bool basic_string<_CharT, _Traits, _Allocator>::__addable(const const_iterator* __i, ptrdiff_t __n) const { - const value_type* __p = _VSTD::__to_address(__i->base()) + __n; + const value_type* __p = std::__to_address(__i->base()) + __n; return this->data() <= __p && __p <= this->data() + this->size(); } @@ -4470,7 +4470,7 @@ bool basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator* __i, ptrdiff_t __n) const { - const value_type* __p = _VSTD::__to_address(__i->base()) + __n; + const value_type* __p = std::__to_address(__i->base()) + __n; return this->data() <= __p && __p < this->data() + this->size(); } diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -255,7 +255,7 @@ typedef const _CharT& const_reference; typedef const_pointer const_iterator; // See [string.view.iterators] typedef const_iterator iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; typedef const_reverse_iterator reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; @@ -290,7 +290,7 @@ template _End> requires (is_same_v, _CharT> && !is_convertible_v<_End, size_type>) constexpr _LIBCPP_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end) - : __data(_VSTD::to_address(__begin)), __size(__end - __begin) + : __data(std::to_address(__begin)), __size(__end - __begin) { _LIBCPP_ASSERT((__end - __begin) >= 0, "std::string_view::string_view(iterator, sentinel) received invalid range"); } @@ -305,7 +305,7 @@ is_same_v, _CharT> && !is_convertible_v<_Range, const _CharT*> && (!requires(remove_cvref_t<_Range>& d) { - d.operator _VSTD::basic_string_view<_CharT, _Traits>(); + d.operator std::basic_string_view<_CharT, _Traits>(); }) && (!requires { typename remove_reference_t<_Range>::traits_type; @@ -317,7 +317,7 @@ _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY basic_string_view(const _CharT* __s) - : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {} + : __data(__s), __size(std::__char_traits_length_checked<_Traits>(__s)) {} #if _LIBCPP_STD_VER > 20 basic_string_view(nullptr_t) = delete; @@ -423,7 +423,7 @@ { if (__pos > size()) __throw_out_of_range("string_view::copy"); - size_type __rlen = _VSTD::min(__n, size() - __pos); + size_type __rlen = std::min(__n, size() - __pos); _Traits::copy(__s, data() + __pos, __rlen); return __rlen; } @@ -433,12 +433,12 @@ { return __pos > size() ? (__throw_out_of_range("string_view::substr"), basic_string_view()) - : basic_string_view(data() + __pos, _VSTD::min(__n, size() - __pos)); + : basic_string_view(data() + __pos, std::min(__n, size() - __pos)); } _LIBCPP_CONSTEXPR_AFTER_CXX11 int compare(basic_string_view __sv) const _NOEXCEPT { - size_type __rlen = _VSTD::min( size(), __sv.size()); + size_type __rlen = std::min( size(), __sv.size()); int __retval = _Traits::compare(data(), __sv.data(), __rlen); if ( __retval == 0 ) // first __rlen chars matched __retval = size() == __sv.size() ? 0 : ( size() < __sv.size() ? -1 : 1 ); diff --git a/libcxx/include/strstream b/libcxx/include/strstream --- a/libcxx/include/strstream +++ b/libcxx/include/strstream @@ -256,8 +256,8 @@ #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY istrstream(istrstream&& __rhs) - : istream(_VSTD::move(__rhs)), - __sb_(_VSTD::move(__rhs.__sb_)) + : istream(std::move(__rhs)), + __sb_(std::move(__rhs.__sb_)) { istream::set_rdbuf(&__sb_); } @@ -265,8 +265,8 @@ _LIBCPP_INLINE_VISIBILITY istrstream& operator=(istrstream&& __rhs) { - istream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + istream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } #endif // _LIBCPP_CXX03_LANG @@ -299,14 +299,14 @@ _LIBCPP_INLINE_VISIBILITY ostrstream(char* __s, int __n, ios_base::openmode __mode = ios_base::out) : ostream(&__sb_), - __sb_(__s, __n, __s + (__mode & ios::app ? _VSTD::strlen(__s) : 0)) + __sb_(__s, __n, __s + (__mode & ios::app ? std::strlen(__s) : 0)) {} #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY ostrstream(ostrstream&& __rhs) - : ostream(_VSTD::move(__rhs)), - __sb_(_VSTD::move(__rhs.__sb_)) + : ostream(std::move(__rhs)), + __sb_(std::move(__rhs.__sb_)) { ostream::set_rdbuf(&__sb_); } @@ -314,8 +314,8 @@ _LIBCPP_INLINE_VISIBILITY ostrstream& operator=(ostrstream&& __rhs) { - ostream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + ostream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } #endif // _LIBCPP_CXX03_LANG @@ -359,14 +359,14 @@ _LIBCPP_INLINE_VISIBILITY strstream(char* __s, int __n, ios_base::openmode __mode = ios_base::in | ios_base::out) : iostream(&__sb_), - __sb_(__s, __n, __s + (__mode & ios::app ? _VSTD::strlen(__s) : 0)) + __sb_(__s, __n, __s + (__mode & ios::app ? std::strlen(__s) : 0)) {} #ifndef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY strstream(strstream&& __rhs) - : iostream(_VSTD::move(__rhs)), - __sb_(_VSTD::move(__rhs.__sb_)) + : iostream(std::move(__rhs)), + __sb_(std::move(__rhs.__sb_)) { iostream::set_rdbuf(&__sb_); } @@ -374,8 +374,8 @@ _LIBCPP_INLINE_VISIBILITY strstream& operator=(strstream&& __rhs) { - iostream::operator=(_VSTD::move(__rhs)); - __sb_ = _VSTD::move(__rhs.__sb_); + iostream::operator=(std::move(__rhs)); + __sb_ = std::move(__rhs.__sb_); return *this; } #endif // _LIBCPP_CXX03_LANG diff --git a/libcxx/include/thread b/libcxx/include/thread --- a/libcxx/include/thread +++ b/libcxx/include/thread @@ -258,7 +258,7 @@ } _LIBCPP_INLINE_VISIBILITY - void swap(thread& __t) _NOEXCEPT {_VSTD::swap(__t_, __t.__t_);} + void swap(thread& __t) _NOEXCEPT {std::swap(__t_, __t.__t_);} _LIBCPP_INLINE_VISIBILITY bool joinable() const _NOEXCEPT {return !__libcpp_thread_isnull(&__t_);} @@ -279,7 +279,7 @@ void __thread_execute(tuple<_TSp, _Fp, _Args...>& __t, __tuple_indices<_Indices...>) { - _VSTD::__invoke(_VSTD::move(_VSTD::get<1>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...); + std::__invoke(std::move(std::get<1>(__t)), std::move(std::get<_Indices>(__t))...); } template @@ -288,9 +288,9 @@ { // _Fp = tuple< unique_ptr<__thread_struct>, Functor, Args...> unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp)); - __thread_local_data().set_pointer(_VSTD::get<0>(*__p.get()).release()); + __thread_local_data().set_pointer(std::get<0>(*__p.get()).release()); typedef typename __make_tuple_indices::value, 2>::type _Index; - _VSTD::__thread_execute(*__p.get(), _Index()); + std::__thread_execute(*__p.get(), _Index()); return nullptr; } @@ -303,10 +303,10 @@ _TSPtr __tsp(new __thread_struct); typedef tuple<_TSPtr, typename decay<_Fp>::type, typename decay<_Args>::type...> _Gp; unique_ptr<_Gp> __p( - new _Gp(_VSTD::move(__tsp), - _VSTD::forward<_Fp>(__f), - _VSTD::forward<_Args>(__args)...)); - int __ec = _VSTD::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get()); + new _Gp(std::move(__tsp), + std::forward<_Fp>(__f), + std::forward<_Args>(__args)...)); + int __ec = std::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get()); if (__ec == 0) __p.release(); else @@ -341,7 +341,7 @@ typedef __thread_invoke_pair<_Fp> _InvokePair; typedef unique_ptr<_InvokePair> _PairPtr; _PairPtr __pp(new _InvokePair(__f)); - int __ec = _VSTD::__libcpp_thread_create(&__t_, &__thread_proxy_cxx03<_InvokePair>, __pp.get()); + int __ec = std::__libcpp_thread_create(&__t_, &__thread_proxy_cxx03<_InvokePair>, __pp.get()); if (__ec == 0) __pp.release(); else diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -259,28 +259,28 @@ > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value)) - : __value_(_VSTD::forward<_Tp>(__t)) + : __value_(std::forward<_Tp>(__t)) {static_assert(__can_bind_reference<_Tp&&>(), "Attempted construction of reference element binds to a temporary whose lifetime has ended");} template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit __tuple_leaf(integral_constant, const _Alloc&, _Tp&& __t) - : __value_(_VSTD::forward<_Tp>(__t)) + : __value_(std::forward<_Tp>(__t)) {static_assert(__can_bind_reference<_Tp&&>(), "Attempted construction of reference element binds to a temporary whose lifetime has ended");} template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit __tuple_leaf(integral_constant, const _Alloc& __a, _Tp&& __t) - : __value_(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t)) + : __value_(allocator_arg_t(), __a, std::forward<_Tp>(__t)) {static_assert(!is_reference<_Hp>::value, "Attempted to uses-allocator construct a reference element in a tuple");} template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit __tuple_leaf(integral_constant, const _Alloc& __a, _Tp&& __t) - : __value_(_VSTD::forward<_Tp>(__t), __a) + : __value_(std::forward<_Tp>(__t), __a) {static_assert(!is_reference<_Hp>::value, "Attempted to uses-allocator construct a reference element in a tuple");} @@ -290,7 +290,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 int swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value) { - _VSTD::swap(*this, __t); + std::swap(*this, __t); return 0; } @@ -332,22 +332,22 @@ > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value)) - : _Hp(_VSTD::forward<_Tp>(__t)) {} + : _Hp(std::forward<_Tp>(__t)) {} template _LIBCPP_INLINE_VISIBILITY constexpr explicit __tuple_leaf(integral_constant, const _Alloc&, _Tp&& __t) - : _Hp(_VSTD::forward<_Tp>(__t)) {} + : _Hp(std::forward<_Tp>(__t)) {} template _LIBCPP_INLINE_VISIBILITY constexpr explicit __tuple_leaf(integral_constant, const _Alloc& __a, _Tp&& __t) - : _Hp(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t)) {} + : _Hp(allocator_arg_t(), __a, std::forward<_Tp>(__t)) {} template _LIBCPP_INLINE_VISIBILITY constexpr explicit __tuple_leaf(integral_constant, const _Alloc& __a, _Tp&& __t) - : _Hp(_VSTD::forward<_Tp>(__t), __a) {} + : _Hp(std::forward<_Tp>(__t), __a) {} __tuple_leaf(__tuple_leaf const &) = default; __tuple_leaf(__tuple_leaf &&) = default; @@ -356,7 +356,7 @@ int swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value) { - _VSTD::swap(*this, __t); + std::swap(*this, __t); return 0; } @@ -397,7 +397,7 @@ _Up&&... __u) _NOEXCEPT_((__all::value...>::value && __all::value...>::value)) : - __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))..., + __tuple_leaf<_Uf, _Tf>(std::forward<_Up>(__u))..., __tuple_leaf<_Ul, _Tl>()... {} @@ -410,7 +410,7 @@ __tuple_indices<_Ul...>, __tuple_types<_Tl...>, _Up&&... __u) : __tuple_leaf<_Uf, _Tf>(__uses_alloc_ctor<_Tf, _Alloc, _Up>(), __a, - _VSTD::forward<_Up>(__u))..., + std::forward<_Up>(__u))..., __tuple_leaf<_Ul, _Tl>(__uses_alloc_ctor<_Tl, _Alloc>(), __a)... {} @@ -423,8 +423,8 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 __tuple_impl(_Tuple&& __t) _NOEXCEPT_((__all::type>::type>::value...>::value)) - : __tuple_leaf<_Indx, _Tp>(_VSTD::forward::type>::type>(_VSTD::get<_Indx>(__t)))... + : __tuple_leaf<_Indx, _Tp>(std::forward::type>::type>(std::get<_Indx>(__t)))... {} template (__uses_alloc_ctor<_Tp, _Alloc, typename tuple_element<_Indx, typename __make_tuple_types<_Tuple>::type>::type>(), __a, - _VSTD::forward::type>::type>(_VSTD::get<_Indx>(__t)))... + std::forward::type>::type>(std::get<_Indx>(__t)))... {} __tuple_impl(const __tuple_impl&) = default; @@ -448,21 +448,21 @@ void swap(__tuple_impl& __t) _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value) { - _VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...); + std::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...); } }; template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 void __memberwise_copy_assign(_Dest& __dest, _Source const& __source, __tuple_indices<_Np...>) { - _VSTD::__swallow(((_VSTD::get<_Np>(__dest) = _VSTD::get<_Np>(__source)), void(), 0)...); + std::__swallow(((std::get<_Np>(__dest) = std::get<_Np>(__source)), void(), 0)...); } template _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 void __memberwise_forward_assign(_Dest& __dest, _Source&& __source, __tuple_types<_Up...>, __tuple_indices<_Np...>) { - _VSTD::__swallow((( - _VSTD::get<_Np>(__dest) = _VSTD::forward<_Up>(_VSTD::get<_Np>(__source)) + std::__swallow((( + std::get<_Np>(__dest) = std::forward<_Up>(std::get<_Np>(__source)) ), void(), 0)...); } @@ -628,7 +628,7 @@ typename __make_tuple_types::type(), typename __make_tuple_indices::type(), typename __make_tuple_types::type(), - _VSTD::forward<_Up>(__u)...) {} + std::forward<_Up>(__u)...) {} template ::type(), typename __make_tuple_indices::type(), typename __make_tuple_types::type(), - _VSTD::forward<_Up>(__u)...) {} + std::forward<_Up>(__u)...) {} template ::type(), typename __make_tuple_indices::type(), typename __make_tuple_types::type(), - _VSTD::forward<_Up>(__u)...) {} + std::forward<_Up>(__u)...) {} template ::type(), typename __make_tuple_indices::type(), typename __make_tuple_types::type(), - _VSTD::forward<_Up>(__u)...) {} + std::forward<_Up>(__u)...) {} // Copy and move constructors (including the allocator_arg_t variants) tuple(const tuple&) = default; @@ -693,7 +693,7 @@ _And...>::value , int> = 0> tuple(allocator_arg_t, const _Alloc& __alloc, tuple&& __t) - : __base_(allocator_arg_t(), __alloc, _VSTD::move(__t)) + : __base_(allocator_arg_t(), __alloc, std::move(__t)) { } // tuple(const tuple&) constructors (including allocator_arg_t variants) @@ -788,7 +788,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 tuple(tuple<_Up...>&& __t) _NOEXCEPT_((_And...>::value)) - : __base_(_VSTD::move(__t)) + : __base_(std::move(__t)) { } template && __t) _NOEXCEPT_((_And...>::value)) - : __base_(_VSTD::move(__t)) + : __base_(std::move(__t)) { } template = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 tuple(allocator_arg_t, const _Alloc& __a, tuple<_Up...>&& __t) - : __base_(allocator_arg_t(), __a, _VSTD::move(__t)) + : __base_(allocator_arg_t(), __a, std::move(__t)) { } template = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit tuple(allocator_arg_t, const _Alloc& __a, tuple<_Up...>&& __t) - : __base_(allocator_arg_t(), __a, _VSTD::move(__t)) + : __base_(allocator_arg_t(), __a, std::move(__t)) { } // tuple(const pair&) constructors (including allocator_arg_t variants) @@ -926,7 +926,7 @@ is_nothrow_constructible<_FirstType<_Tp...>, _Up1>, is_nothrow_constructible<_SecondType<_Tp...>, _Up2> >::value)) - : __base_(_VSTD::move(__p)) + : __base_(std::move(__p)) { } template class _And = _And, __enable_if_t< @@ -941,7 +941,7 @@ is_nothrow_constructible<_FirstType<_Tp...>, _Up1>, is_nothrow_constructible<_SecondType<_Tp...>, _Up2> >::value)) - : __base_(_VSTD::move(__p)) + : __base_(std::move(__p)) { } template class _And = _And, __enable_if_t< @@ -952,7 +952,7 @@ , int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 tuple(allocator_arg_t, const _Alloc& __a, pair<_Up1, _Up2>&& __p) - : __base_(allocator_arg_t(), __a, _VSTD::move(__p)) + : __base_(allocator_arg_t(), __a, std::move(__p)) { } template class _And = _And, __enable_if_t< @@ -963,7 +963,7 @@ , int> = 0> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit tuple(allocator_arg_t, const _Alloc& __a, pair<_Up1, _Up2>&& __p) - : __base_(allocator_arg_t(), __a, _VSTD::move(__p)) + : __base_(allocator_arg_t(), __a, std::move(__p)) { } // [tuple.assign] @@ -971,7 +971,7 @@ tuple& operator=(_If<_And...>::value, tuple, __nat> const& __tuple) _NOEXCEPT_((_And...>::value)) { - _VSTD::__memberwise_copy_assign(*this, __tuple, + std::__memberwise_copy_assign(*this, __tuple, typename __make_tuple_indices::type()); return *this; } @@ -980,7 +980,7 @@ tuple& operator=(_If<_And...>::value, tuple, __nat>&& __tuple) _NOEXCEPT_((_And...>::value)) { - _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__tuple), + std::__memberwise_forward_assign(*this, std::move(__tuple), __tuple_types<_Tp...>(), typename __make_tuple_indices::type()); return *this; @@ -996,7 +996,7 @@ tuple& operator=(tuple<_Up...> const& __tuple) _NOEXCEPT_((_And...>::value)) { - _VSTD::__memberwise_copy_assign(*this, __tuple, + std::__memberwise_copy_assign(*this, __tuple, typename __make_tuple_indices::type()); return *this; } @@ -1011,7 +1011,7 @@ tuple& operator=(tuple<_Up...>&& __tuple) _NOEXCEPT_((_And...>::value)) { - _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__tuple), + std::__memberwise_forward_assign(*this, std::move(__tuple), __tuple_types<_Up...>(), typename __make_tuple_indices::type()); return *this; @@ -1031,8 +1031,8 @@ is_nothrow_assignable<_SecondType<_Tp...>&, _Up2 const&> >::value)) { - _VSTD::get<0>(*this) = __pair.first; - _VSTD::get<1>(*this) = __pair.second; + std::get<0>(*this) = __pair.first; + std::get<1>(*this) = __pair.second; return *this; } @@ -1050,8 +1050,8 @@ is_nothrow_assignable<_SecondType<_Tp...>&, _Up2> >::value)) { - _VSTD::get<0>(*this) = _VSTD::forward<_Up1>(__pair.first); - _VSTD::get<1>(*this) = _VSTD::forward<_Up2>(__pair.second); + std::get<0>(*this) = std::forward<_Up1>(__pair.first); + std::get<1>(*this) = std::forward<_Up2>(__pair.second); return *this; } @@ -1066,7 +1066,7 @@ tuple& operator=(array<_Up, _Np> const& __array) _NOEXCEPT_((_And...>::value)) { - _VSTD::__memberwise_copy_assign(*this, __array, + std::__memberwise_copy_assign(*this, __array, typename __make_tuple_indices::type()); return *this; } @@ -1082,7 +1082,7 @@ tuple& operator=(array<_Up, _Np>&& __array) _NOEXCEPT_((_And...>::value)) { - _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__array), + std::__memberwise_forward_assign(*this, std::move(__array), __tuple_types<_If...>(), typename __make_tuple_indices::type()); return *this; @@ -1238,28 +1238,28 @@ inline _LIBCPP_INLINE_VISIBILITY constexpr _T1& get(tuple<_Args...>& __tup) noexcept { - return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup); + return std::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup); } template inline _LIBCPP_INLINE_VISIBILITY constexpr _T1 const& get(tuple<_Args...> const& __tup) noexcept { - return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup); + return std::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup); } template inline _LIBCPP_INLINE_VISIBILITY constexpr _T1&& get(tuple<_Args...>&& __tup) noexcept { - return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_VSTD::move(__tup)); + return std::get<__find_exactly_one_t<_T1, _Args...>::value>(std::move(__tup)); } template inline _LIBCPP_INLINE_VISIBILITY constexpr _T1 const&& get(tuple<_Args...> const&& __tup) noexcept { - return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_VSTD::move(__tup)); + return std::get<__find_exactly_one_t<_T1, _Args...>::value>(std::move(__tup)); } #endif @@ -1291,7 +1291,7 @@ tuple::type...> make_tuple(_Tp&&... __t) { - return tuple::type...>(_VSTD::forward<_Tp>(__t)...); + return tuple::type...>(std::forward<_Tp>(__t)...); } template @@ -1299,7 +1299,7 @@ tuple<_Tp&&...> forward_as_tuple(_Tp&&... __t) _NOEXCEPT { - return tuple<_Tp&&...>(_VSTD::forward<_Tp>(__t)...); + return tuple<_Tp&&...>(std::forward<_Tp>(__t)...); } template @@ -1309,7 +1309,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _Tp& __x, const _Up& __y) { - return __tuple_equal<_Ip - 1>()(__x, __y) && _VSTD::get<_Ip-1>(__x) == _VSTD::get<_Ip-1>(__y); + return __tuple_equal<_Ip - 1>()(__x, __y) && std::get<_Ip-1>(__x) == std::get<_Ip-1>(__y); } }; @@ -1342,7 +1342,7 @@ auto __tuple_compare_three_way(const tuple<_Tp...>& __x, const tuple<_Up...>& __y, index_sequence<_Is...>) { common_comparison_category_t<__synth_three_way_result<_Tp, _Up>...> __result = strong_ordering::equal; - static_cast(((__result = _VSTD::__synth_three_way(_VSTD::get<_Is>(__x), _VSTD::get<_Is>(__y)), __result != 0) || ...)); + static_cast(((__result = std::__synth_three_way(std::get<_Is>(__x), std::get<_Is>(__y)), __result != 0) || ...)); return __result; } @@ -1352,7 +1352,7 @@ common_comparison_category_t<__synth_three_way_result<_Tp, _Up>...> operator<=>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y) { - return _VSTD::__tuple_compare_three_way(__x, __y, index_sequence_for<_Tp...>{}); + return std::__tuple_compare_three_way(__x, __y, index_sequence_for<_Tp...>{}); } #else // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS) @@ -1373,9 +1373,9 @@ bool operator()(const _Tp& __x, const _Up& __y) { const size_t __idx = tuple_size<_Tp>::value - _Ip; - if (_VSTD::get<__idx>(__x) < _VSTD::get<__idx>(__y)) + if (std::get<__idx>(__x) < std::get<__idx>(__y)) return true; - if (_VSTD::get<__idx>(__y) < _VSTD::get<__idx>(__x)) + if (std::get<__idx>(__y) < std::get<__idx>(__x)) return false; return __tuple_less<_Ip-1>()(__x, __y); } @@ -1529,9 +1529,9 @@ typename __tuple_cat_return_ref&&, _Tuple0&&>::type operator()(tuple<_Types...> __t, _Tuple0&& __t0) { - return _VSTD::forward_as_tuple( - _VSTD::forward<_Types>(_VSTD::get<_I0>(__t))..., - _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...); + return std::forward_as_tuple( + std::forward<_Types>(std::get<_I0>(__t))..., + std::get<_J0>(std::forward<_Tuple0>(__t0))...); } template @@ -1548,10 +1548,10 @@ typename __make_tuple_indices::value>::type, typename __make_tuple_indices::value>::type>()( - _VSTD::forward_as_tuple( - _VSTD::forward<_Types>(_VSTD::get<_I0>(__t))..., - _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...), - _VSTD::forward<_Tuple1>(__t1), _VSTD::forward<_Tuples>(__tpls)...); + std::forward_as_tuple( + std::forward<_Types>(std::get<_I0>(__t))..., + std::get<_J0>(std::forward<_Tuple0>(__t0))...), + std::forward<_Tuple1>(__t1), std::forward<_Tuples>(__tpls)...); } }; @@ -1563,8 +1563,8 @@ typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0; return __tuple_cat, __tuple_indices<>, typename __make_tuple_indices::value>::type>() - (tuple<>(), _VSTD::forward<_Tuple0>(__t0), - _VSTD::forward<_Tuples>(__tpls)...); + (tuple<>(), std::forward<_Tuple0>(__t0), + std::forward<_Tuples>(__tpls)...); } template @@ -1577,8 +1577,8 @@ pair<_T1, _T2>::pair(piecewise_construct_t, tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args, __tuple_indices<_I1...>, __tuple_indices<_I2...>) - : first(_VSTD::forward<_Args1>(_VSTD::get<_I1>( __first_args))...), - second(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...) + : first(std::forward<_Args1>(std::get<_I1>( __first_args))...), + second(std::forward<_Args2>(std::get<_I2>(__second_args))...) { } @@ -1593,17 +1593,17 @@ constexpr decltype(auto) __apply_tuple_impl(_Fn && __f, _Tuple && __t, __tuple_indices<_Id...>) _LIBCPP_NOEXCEPT_RETURN( - _VSTD::__invoke_constexpr( - _VSTD::forward<_Fn>(__f), - _VSTD::get<_Id>(_VSTD::forward<_Tuple>(__t))...) + std::__invoke_constexpr( + std::forward<_Fn>(__f), + std::get<_Id>(std::forward<_Tuple>(__t))...) ) template inline _LIBCPP_INLINE_VISIBILITY constexpr decltype(auto) apply(_Fn && __f, _Tuple && __t) _LIBCPP_NOEXCEPT_RETURN( - _VSTD::__apply_tuple_impl( - _VSTD::forward<_Fn>(__f), _VSTD::forward<_Tuple>(__t), + std::__apply_tuple_impl( + std::forward<_Fn>(__f), std::forward<_Tuple>(__t), typename __make_tuple_indices>>::type{}) ) @@ -1611,14 +1611,14 @@ inline _LIBCPP_INLINE_VISIBILITY constexpr _Tp __make_from_tuple_impl(_Tuple&& __t, __tuple_indices<_Idx...>) _LIBCPP_NOEXCEPT_RETURN( - _Tp(_VSTD::get<_Idx>(_VSTD::forward<_Tuple>(__t))...) + _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...) ) template inline _LIBCPP_INLINE_VISIBILITY constexpr _Tp make_from_tuple(_Tuple&& __t) _LIBCPP_NOEXCEPT_RETURN( - _VSTD::__make_from_tuple_impl<_Tp>(_VSTD::forward<_Tuple>(__t), + std::__make_from_tuple_impl<_Tp>(std::forward<_Tuple>(__t), typename __make_tuple_indices>>::type{}) ) diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -1746,7 +1746,7 @@ static void __test_noexcept(_Tp) noexcept; template -static bool_constant(declval<_Fm>()))> +static bool_constant(declval<_Fm>()))> __is_nothrow_convertible_test(); template @@ -2624,7 +2624,7 @@ template ::value || is_void<_Arg>::value> struct __is_assignable_imp - : public decltype((_VSTD::__is_assignable_test<_Tp, _Arg>(0))) {}; + : public decltype((std::__is_assignable_test<_Tp, _Arg>(0))) {}; template struct __is_assignable_imp<_Tp, _Arg, true> @@ -3178,7 +3178,7 @@ template struct __libcpp_is_nothrow_constructible - : public integral_constant(declval<_Arg>()))> + : public integral_constant(declval<_Arg>()))> { }; @@ -3653,7 +3653,7 @@ { template static auto __try_call(int) -> decltype( - _VSTD::__invoke(declval<_XFp>(), declval<_XArgs>()...)); + std::__invoke(declval<_XFp>(), declval<_XArgs>()...)); template static __nat __try_call(...); @@ -3690,14 +3690,14 @@ static void __test_noexcept(_Tp) noexcept; static const bool value = noexcept(_ThisT::__test_noexcept<_Ret>( - _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...))); + std::__invoke(declval<_Fp>(), declval<_Args>()...))); }; template struct __nothrow_invokable_r_imp { static const bool value = noexcept( - _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...)); + std::__invoke(declval<_Fp>(), declval<_Args>()...)); }; template diff --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo --- a/libcxx/include/typeinfo +++ b/libcxx/include/typeinfo @@ -372,7 +372,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_cast(); #else - _VSTD::abort(); + std::abort(); #endif } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -566,7 +566,7 @@ void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value) { - using _VSTD::swap; + using std::swap; swap(static_cast<_Hash&>(*this), static_cast<_Hash&>(__y)); } }; @@ -602,7 +602,7 @@ void swap(__unordered_map_hasher& __y) _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value) { - using _VSTD::swap; + using std::swap; swap(__hash_, __y.__hash_); } }; @@ -664,7 +664,7 @@ void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value) { - using _VSTD::swap; + using std::swap; swap(static_cast<_Pred&>(*this), static_cast<_Pred&>(__y)); } }; @@ -715,7 +715,7 @@ void swap(__unordered_map_equal& __y) _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value) { - using _VSTD::swap; + using std::swap; swap(__pred_, __y.__pred_); } }; @@ -781,9 +781,9 @@ void operator()(pointer __p) _NOEXCEPT { if (__second_constructed) - __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().second)); + __alloc_traits::destroy(__na_, std::addressof(__p->__value_.__get_value().second)); if (__first_constructed) - __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().first)); + __alloc_traits::destroy(__na_, std::addressof(__p->__value_.__get_value().first)); if (__p) __alloc_traits::deallocate(__na_, __p, 1); } @@ -807,7 +807,7 @@ value_type& __get_value() { #if _LIBCPP_STD_VER > 14 - return *_VSTD::launder(_VSTD::addressof(__cc)); + return *std::launder(std::addressof(__cc)); #else return __cc; #endif @@ -817,7 +817,7 @@ const value_type& __get_value() const { #if _LIBCPP_STD_VER > 14 - return *_VSTD::launder(_VSTD::addressof(__cc)); + return *std::launder(std::addressof(__cc)); #else return __cc; #endif @@ -835,8 +835,8 @@ { value_type& __v = __get_value(); return __nc_rref_pair_type( - _VSTD::move(const_cast(__v.first)), - _VSTD::move(__v.second)); + std::move(const_cast(__v.first)), + std::move(__v.second)); } _LIBCPP_INLINE_VISIBILITY @@ -861,7 +861,7 @@ _LIBCPP_INLINE_VISIBILITY __hash_value_type& operator=(_ValueTp&& __v) { - __ref() = _VSTD::forward<_ValueTp>(__v); + __ref() = std::forward<_ValueTp>(__v); return *this; } @@ -1069,7 +1069,7 @@ unordered_map() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } explicit unordered_map(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); @@ -1138,7 +1138,7 @@ #ifndef _LIBCPP_CXX03_LANG __table_ = __u.__table_; #else - if (this != _VSTD::addressof(__u)) { + if (this != std::addressof(__u)) { __table_.clear(); __table_.hash_function() = __u.__table_.hash_function(); __table_.key_eq() = __u.__table_.key_eq(); @@ -1204,21 +1204,21 @@ _LIBCPP_INLINE_VISIBILITY pair insert(value_type&& __x) - {return __table_.__insert_unique(_VSTD::move(__x));} + {return __table_.__insert_unique(std::move(__x));} iterator insert(const_iterator __p, value_type&& __x) { _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, "unordered_map::insert(const_iterator, const value_type&) called with an iterator not" " referring to this unordered_map"); ((void)__p); - return __table_.__insert_unique(_VSTD::move(__x)).first; + return __table_.__insert_unique(std::move(__x)).first; } template ::value>::type> _LIBCPP_INLINE_VISIBILITY pair insert(_Pp&& __x) - {return __table_.__insert_unique(_VSTD::forward<_Pp>(__x));} + {return __table_.__insert_unique(std::forward<_Pp>(__x));} template ::value>::type> @@ -1229,13 +1229,13 @@ "unordered_map::insert(const_iterator, value_type&&) called with an iterator not" " referring to this unordered_map"); ((void)__p); - return insert(_VSTD::forward<_Pp>(__x)).first; + return insert(std::forward<_Pp>(__x)).first; } template _LIBCPP_INLINE_VISIBILITY pair emplace(_Args&&... __args) { - return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...); + return __table_.__emplace_unique(std::forward<_Args>(__args)...); } template @@ -1245,7 +1245,7 @@ "unordered_map::emplace_hint(const_iterator, args...) called with an iterator not" " referring to this unordered_map"); ((void)__p); - return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first; + return __table_.__emplace_unique(std::forward<_Args>(__args)...).first; } #endif // _LIBCPP_CXX03_LANG @@ -1256,8 +1256,8 @@ pair try_emplace(const key_type& __k, _Args&&... __args) { return __table_.__emplace_unique_key_args(__k, piecewise_construct, - _VSTD::forward_as_tuple(__k), - _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); + std::forward_as_tuple(__k), + std::forward_as_tuple(std::forward<_Args>(__args)...)); } template @@ -1265,8 +1265,8 @@ pair try_emplace(key_type&& __k, _Args&&... __args) { return __table_.__emplace_unique_key_args(__k, piecewise_construct, - _VSTD::forward_as_tuple(_VSTD::move(__k)), - _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); + std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple(std::forward<_Args>(__args)...)); } template @@ -1277,7 +1277,7 @@ "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not" " referring to this unordered_map"); ((void)__h); - return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first; + return try_emplace(__k, std::forward<_Args>(__args)...).first; } template @@ -1288,7 +1288,7 @@ "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not" " referring to this unordered_map"); ((void)__h); - return try_emplace(_VSTD::move(__k), _VSTD::forward<_Args>(__args)...).first; + return try_emplace(std::move(__k), std::forward<_Args>(__args)...).first; } template @@ -1296,9 +1296,9 @@ pair insert_or_assign(const key_type& __k, _Vp&& __v) { pair __res = __table_.__emplace_unique_key_args(__k, - __k, _VSTD::forward<_Vp>(__v)); + __k, std::forward<_Vp>(__v)); if (!__res.second) { - __res.first->second = _VSTD::forward<_Vp>(__v); + __res.first->second = std::forward<_Vp>(__v); } return __res; } @@ -1308,9 +1308,9 @@ pair insert_or_assign(key_type&& __k, _Vp&& __v) { pair __res = __table_.__emplace_unique_key_args(__k, - _VSTD::move(__k), _VSTD::forward<_Vp>(__v)); + std::move(__k), std::forward<_Vp>(__v)); if (!__res.second) { - __res.first->second = _VSTD::forward<_Vp>(__v); + __res.first->second = std::forward<_Vp>(__v); } return __res; } @@ -1320,7 +1320,7 @@ iterator insert_or_assign(const_iterator, const key_type& __k, _Vp&& __v) { // FIXME: Add debug mode checking for the iterator input - return insert_or_assign(__k, _VSTD::forward<_Vp>(__v)).first; + return insert_or_assign(__k, std::forward<_Vp>(__v)).first; } template @@ -1328,7 +1328,7 @@ iterator insert_or_assign(const_iterator, key_type&& __k, _Vp&& __v) { // FIXME: Add debug mode checking for the iterator input - return insert_or_assign(_VSTD::move(__k), _VSTD::forward<_Vp>(__v)).first; + return insert_or_assign(std::move(__k), std::forward<_Vp>(__v)).first; } #endif // _LIBCPP_STD_VER > 14 @@ -1351,7 +1351,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to unordered_map::insert()"); return __table_.template __node_handle_insert_unique< - node_type, insert_return_type>(_VSTD::move(__nh)); + node_type, insert_return_type>(std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __hint, node_type&& __nh) @@ -1359,7 +1359,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to unordered_map::insert()"); return __table_.template __node_handle_insert_unique( - __hint.__i_, _VSTD::move(__nh)); + __hint.__i_, std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY node_type extract(key_type const& __key) @@ -1512,13 +1512,13 @@ #if _LIBCPP_DEBUG_LEVEL == 2 bool __dereferenceable(const const_iterator* __i) const - {return __table_.__dereferenceable(_VSTD::addressof(__i->__i_));} + {return __table_.__dereferenceable(std::addressof(__i->__i_));} bool __decrementable(const const_iterator* __i) const - {return __table_.__decrementable(_VSTD::addressof(__i->__i_));} + {return __table_.__decrementable(std::addressof(__i->__i_));} bool __addable(const const_iterator* __i, ptrdiff_t __n) const - {return __table_.__addable(_VSTD::addressof(__i->__i_), __n);} + {return __table_.__addable(std::addressof(__i->__i_), __n);} bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const - {return __table_.__addable(_VSTD::addressof(__i->__i_), __n);} + {return __table_.__addable(std::addressof(__i->__i_), __n);} #endif // _LIBCPP_DEBUG_LEVEL == 2 @@ -1605,7 +1605,7 @@ size_type __n, const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -1615,7 +1615,7 @@ const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -1625,7 +1625,7 @@ const allocator_type& __a) : __table_(typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -1633,7 +1633,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( _InputIterator __first, _InputIterator __last) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); insert(__first, __last); } @@ -1644,7 +1644,7 @@ const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -1656,7 +1656,7 @@ const hasher& __hf, const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -1666,7 +1666,7 @@ const unordered_map& __u) : __table_(__u.__table_) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -1676,7 +1676,7 @@ const unordered_map& __u, const allocator_type& __a) : __table_(__u.__table_, typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -1688,9 +1688,9 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( unordered_map&& __u) _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) - : __table_(_VSTD::move(__u.__table_)) + : __table_(std::move(__u.__table_)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 __get_db()->swap(this, &__u); #endif @@ -1699,9 +1699,9 @@ template unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( unordered_map&& __u, const allocator_type& __a) - : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a)) + : __table_(std::move(__u.__table_), typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__a != __u.get_allocator()) { iterator __i = __u.begin(); @@ -1720,7 +1720,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( initializer_list __il) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); insert(__il.begin(), __il.end()); } @@ -1730,7 +1730,7 @@ const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -1741,7 +1741,7 @@ const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -1752,7 +1752,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value) { - __table_ = _VSTD::move(__u.__table_); + __table_ = std::move(__u.__table_); return *this; } @@ -1786,8 +1786,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k) { return __table_.__emplace_unique_key_args(__k, - piecewise_construct, _VSTD::forward_as_tuple(__k), - _VSTD::forward_as_tuple()).first->__get_value().second; + piecewise_construct, std::forward_as_tuple(__k), + std::forward_as_tuple()).first->__get_value().second; } template @@ -1795,8 +1795,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k) { return __table_.__emplace_unique_key_args(__k, - piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__k)), - _VSTD::forward_as_tuple()).first->__get_value().second; + piecewise_construct, std::forward_as_tuple(std::move(__k)), + std::forward_as_tuple()).first->__get_value().second; } #else // _LIBCPP_CXX03_LANG @@ -1806,9 +1806,9 @@ { __node_allocator& __na = __table_.__node_alloc(); __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); - __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().first), __k); + __node_traits::construct(__na, std::addressof(__h->__value_.__get_value().first), __k); __h.get_deleter().__first_constructed = true; - __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second)); + __node_traits::construct(__na, std::addressof(__h->__value_.__get_value().second)); __h.get_deleter().__second_constructed = true; return __h; } @@ -1865,7 +1865,7 @@ typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type erase_if(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __c, _Predicate __pred) { - return _VSTD::__libcpp_erase_if_container(__c, __pred); + return std::__libcpp_erase_if_container(__c, __pred); } #endif @@ -1960,7 +1960,7 @@ unordered_multimap() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } explicit unordered_multimap(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); @@ -2030,7 +2030,7 @@ #ifndef _LIBCPP_CXX03_LANG __table_ = __u.__table_; #else - if (this != _VSTD::addressof(__u)) { + if (this != std::addressof(__u)) { __table_.clear(); __table_.hash_function() = __u.__table_.hash_function(); __table_.key_eq() = __u.__table_.key_eq(); @@ -2089,32 +2089,32 @@ void insert(initializer_list __il) {insert(__il.begin(), __il.end());} _LIBCPP_INLINE_VISIBILITY - iterator insert(value_type&& __x) {return __table_.__insert_multi(_VSTD::move(__x));} + iterator insert(value_type&& __x) {return __table_.__insert_multi(std::move(__x));} _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, value_type&& __x) - {return __table_.__insert_multi(__p.__i_, _VSTD::move(__x));} + {return __table_.__insert_multi(__p.__i_, std::move(__x));} template ::value>::type> _LIBCPP_INLINE_VISIBILITY iterator insert(_Pp&& __x) - {return __table_.__insert_multi(_VSTD::forward<_Pp>(__x));} + {return __table_.__insert_multi(std::forward<_Pp>(__x));} template ::value>::type> _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, _Pp&& __x) - {return __table_.__insert_multi(__p.__i_, _VSTD::forward<_Pp>(__x));} + {return __table_.__insert_multi(__p.__i_, std::forward<_Pp>(__x));} template iterator emplace(_Args&&... __args) { - return __table_.__emplace_multi(_VSTD::forward<_Args>(__args)...); + return __table_.__emplace_multi(std::forward<_Args>(__args)...); } template iterator emplace_hint(const_iterator __p, _Args&&... __args) { - return __table_.__emplace_hint_multi(__p.__i_, _VSTD::forward<_Args>(__args)...); + return __table_.__emplace_hint_multi(__p.__i_, std::forward<_Args>(__args)...); } #endif // _LIBCPP_CXX03_LANG @@ -2138,7 +2138,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to unordered_multimap::insert()"); return __table_.template __node_handle_insert_multi( - _VSTD::move(__nh)); + std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __hint, node_type&& __nh) @@ -2146,7 +2146,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to unordered_multimap::insert()"); return __table_.template __node_handle_insert_multi( - __hint.__i_, _VSTD::move(__nh)); + __hint.__i_, std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY node_type extract(key_type const& __key) @@ -2292,13 +2292,13 @@ #if _LIBCPP_DEBUG_LEVEL == 2 bool __dereferenceable(const const_iterator* __i) const - {return __table_.__dereferenceable(_VSTD::addressof(__i->__i_));} + {return __table_.__dereferenceable(std::addressof(__i->__i_));} bool __decrementable(const const_iterator* __i) const - {return __table_.__decrementable(_VSTD::addressof(__i->__i_));} + {return __table_.__decrementable(std::addressof(__i->__i_));} bool __addable(const const_iterator* __i, ptrdiff_t __n) const - {return __table_.__addable(_VSTD::addressof(__i->__i_), __n);} + {return __table_.__addable(std::addressof(__i->__i_), __n);} bool __subscriptable(const const_iterator* __i, ptrdiff_t __n) const - {return __table_.__addable(_VSTD::addressof(__i->__i_), __n);} + {return __table_.__addable(std::addressof(__i->__i_), __n);} #endif // _LIBCPP_DEBUG_LEVEL == 2 @@ -2381,7 +2381,7 @@ size_type __n, const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -2391,7 +2391,7 @@ const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -2400,7 +2400,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( _InputIterator __first, _InputIterator __last) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); insert(__first, __last); } @@ -2411,7 +2411,7 @@ const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -2423,7 +2423,7 @@ const hasher& __hf, const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -2434,7 +2434,7 @@ const allocator_type& __a) : __table_(typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -2442,7 +2442,7 @@ const unordered_multimap& __u) : __table_(__u.__table_) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -2452,7 +2452,7 @@ const unordered_multimap& __u, const allocator_type& __a) : __table_(__u.__table_, typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -2464,9 +2464,9 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( unordered_multimap&& __u) _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) - : __table_(_VSTD::move(__u.__table_)) + : __table_(std::move(__u.__table_)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 __get_db()->swap(this, &__u); #endif @@ -2475,9 +2475,9 @@ template unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( unordered_multimap&& __u, const allocator_type& __a) - : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a)) + : __table_(std::move(__u.__table_), typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__a != __u.get_allocator()) { iterator __i = __u.begin(); @@ -2497,7 +2497,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( initializer_list __il) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); insert(__il.begin(), __il.end()); } @@ -2507,7 +2507,7 @@ const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -2518,7 +2518,7 @@ const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, typename __table::allocator_type(__a)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -2529,7 +2529,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multimap&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value) { - __table_ = _VSTD::move(__u.__table_); + __table_ = std::move(__u.__table_); return *this; } @@ -2575,7 +2575,7 @@ typename unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type erase_if(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __c, _Predicate __pred) { - return _VSTD::__libcpp_erase_if_container(__c, __pred); + return std::__libcpp_erase_if_container(__c, __pred); } #endif @@ -2593,9 +2593,9 @@ { _EqRng __xeq = __x.equal_range(__i->first); _EqRng __yeq = __y.equal_range(__i->first); - if (_VSTD::distance(__xeq.first, __xeq.second) != - _VSTD::distance(__yeq.first, __yeq.second) || - !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first)) + if (std::distance(__xeq.first, __xeq.second) != + std::distance(__yeq.first, __yeq.second) || + !std::is_permutation(__xeq.first, __xeq.second, __yeq.first)) return false; __i = __xeq.second; } diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -525,7 +525,7 @@ unordered_set() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } explicit unordered_set(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); @@ -634,7 +634,7 @@ template _LIBCPP_INLINE_VISIBILITY pair emplace(_Args&&... __args) - {return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...);} + {return __table_.__emplace_unique(std::forward<_Args>(__args)...);} template _LIBCPP_INLINE_VISIBILITY #if _LIBCPP_DEBUG_LEVEL == 2 @@ -643,16 +643,16 @@ _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, "unordered_set::emplace_hint(const_iterator, args...) called with an iterator not" " referring to this unordered_set"); - return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first; + return __table_.__emplace_unique(std::forward<_Args>(__args)...).first; } #else iterator emplace_hint(const_iterator, _Args&&... __args) - {return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;} + {return __table_.__emplace_unique(std::forward<_Args>(__args)...).first;} #endif _LIBCPP_INLINE_VISIBILITY pair insert(value_type&& __x) - {return __table_.__insert_unique(_VSTD::move(__x));} + {return __table_.__insert_unique(std::move(__x));} _LIBCPP_INLINE_VISIBILITY #if _LIBCPP_DEBUG_LEVEL == 2 iterator insert(const_iterator __p, value_type&& __x) @@ -660,11 +660,11 @@ _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, "unordered_set::insert(const_iterator, value_type&&) called with an iterator not" " referring to this unordered_set"); - return insert(_VSTD::move(__x)).first; + return insert(std::move(__x)).first; } #else iterator insert(const_iterator, value_type&& __x) - {return insert(_VSTD::move(__x)).first;} + {return insert(std::move(__x)).first;} #endif _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) @@ -708,7 +708,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to unordered_set::insert()"); return __table_.template __node_handle_insert_unique< - node_type, insert_return_type>(_VSTD::move(__nh)); + node_type, insert_return_type>(std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __h, node_type&& __nh) @@ -716,7 +716,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to unordered_set::insert()"); return __table_.template __node_handle_insert_unique( - __h, _VSTD::move(__nh)); + __h, std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY node_type extract(key_type const& __key) @@ -933,7 +933,7 @@ const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -942,7 +942,7 @@ const hasher& __hf, const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -951,7 +951,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( _InputIterator __first, _InputIterator __last) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); insert(__first, __last); } @@ -962,7 +962,7 @@ const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -974,7 +974,7 @@ const hasher& __hf, const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -985,7 +985,7 @@ const allocator_type& __a) : __table_(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -993,7 +993,7 @@ const unordered_set& __u) : __table_(__u.__table_) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -1003,7 +1003,7 @@ const unordered_set& __u, const allocator_type& __a) : __table_(__u.__table_, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -1015,9 +1015,9 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( unordered_set&& __u) _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) - : __table_(_VSTD::move(__u.__table_)) + : __table_(std::move(__u.__table_)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 __get_db()->swap(this, &__u); #endif @@ -1026,14 +1026,14 @@ template unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( unordered_set&& __u, const allocator_type& __a) - : __table_(_VSTD::move(__u.__table_), __a) + : __table_(std::move(__u.__table_), __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__a != __u.get_allocator()) { iterator __i = __u.begin(); while (__u.size() != 0) - __table_.__insert_unique(_VSTD::move(__u.__table_.remove(__i++)->__value_)); + __table_.__insert_unique(std::move(__u.__table_.remove(__i++)->__value_)); } #if _LIBCPP_DEBUG_LEVEL == 2 else @@ -1045,7 +1045,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( initializer_list __il) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); insert(__il.begin(), __il.end()); } @@ -1055,7 +1055,7 @@ const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -1066,7 +1066,7 @@ const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -1077,7 +1077,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value) { - __table_ = _VSTD::move(__u.__table_); + __table_ = std::move(__u.__table_); return *this; } @@ -1121,7 +1121,7 @@ typename unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type erase_if(unordered_set<_Value, _Hash, _Pred, _Alloc>& __c, _Predicate __pred) { - return _VSTD::__libcpp_erase_if_container(__c, __pred); + return std::__libcpp_erase_if_container(__c, __pred); } #endif @@ -1198,7 +1198,7 @@ unordered_multiset() _NOEXCEPT_(is_nothrow_default_constructible<__table>::value) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } explicit unordered_multiset(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); @@ -1305,17 +1305,17 @@ template _LIBCPP_INLINE_VISIBILITY iterator emplace(_Args&&... __args) - {return __table_.__emplace_multi(_VSTD::forward<_Args>(__args)...);} + {return __table_.__emplace_multi(std::forward<_Args>(__args)...);} template _LIBCPP_INLINE_VISIBILITY iterator emplace_hint(const_iterator __p, _Args&&... __args) - {return __table_.__emplace_hint_multi(__p, _VSTD::forward<_Args>(__args)...);} + {return __table_.__emplace_hint_multi(__p, std::forward<_Args>(__args)...);} _LIBCPP_INLINE_VISIBILITY - iterator insert(value_type&& __x) {return __table_.__insert_multi(_VSTD::move(__x));} + iterator insert(value_type&& __x) {return __table_.__insert_multi(std::move(__x));} _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, value_type&& __x) - {return __table_.__insert_multi(__p, _VSTD::move(__x));} + {return __table_.__insert_multi(__p, std::move(__x));} _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} @@ -1339,7 +1339,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to unordered_multiset::insert()"); return __table_.template __node_handle_insert_multi( - _VSTD::move(__nh)); + std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __hint, node_type&& __nh) @@ -1347,7 +1347,7 @@ _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(), "node_type with incompatible allocator passed to unordered_multiset::insert()"); return __table_.template __node_handle_insert_multi( - __hint, _VSTD::move(__nh)); + __hint, std::move(__nh)); } _LIBCPP_INLINE_VISIBILITY node_type extract(const_iterator __position) @@ -1573,7 +1573,7 @@ size_type __n, const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -1583,7 +1583,7 @@ const allocator_type& __a) : __table_(__hf, __eql, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); } @@ -1592,7 +1592,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( _InputIterator __first, _InputIterator __last) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); insert(__first, __last); } @@ -1603,7 +1603,7 @@ const hasher& __hf, const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -1615,7 +1615,7 @@ const hasher& __hf, const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__first, __last); } @@ -1626,7 +1626,7 @@ const allocator_type& __a) : __table_(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } template @@ -1634,7 +1634,7 @@ const unordered_multiset& __u) : __table_(__u.__table_) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -1644,7 +1644,7 @@ const unordered_multiset& __u, const allocator_type& __a) : __table_(__u.__table_, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__u.bucket_count()); insert(__u.begin(), __u.end()); } @@ -1656,9 +1656,9 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( unordered_multiset&& __u) _NOEXCEPT_(is_nothrow_move_constructible<__table>::value) - : __table_(_VSTD::move(__u.__table_)) + : __table_(std::move(__u.__table_)) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 __get_db()->swap(this, &__u); #endif @@ -1667,14 +1667,14 @@ template unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( unordered_multiset&& __u, const allocator_type& __a) - : __table_(_VSTD::move(__u.__table_), __a) + : __table_(std::move(__u.__table_), __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__a != __u.get_allocator()) { iterator __i = __u.begin(); while (__u.size() != 0) - __table_.__insert_multi(_VSTD::move(__u.__table_.remove(__i++)->__value_)); + __table_.__insert_multi(std::move(__u.__table_.remove(__i++)->__value_)); } #if _LIBCPP_DEBUG_LEVEL == 2 else @@ -1686,7 +1686,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( initializer_list __il) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); insert(__il.begin(), __il.end()); } @@ -1696,7 +1696,7 @@ const key_equal& __eql) : __table_(__hf, __eql) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -1707,7 +1707,7 @@ const key_equal& __eql, const allocator_type& __a) : __table_(__hf, __eql, __a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); __table_.rehash(__n); insert(__il.begin(), __il.end()); } @@ -1719,7 +1719,7 @@ unordered_multiset&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value) { - __table_ = _VSTD::move(__u.__table_); + __table_ = std::move(__u.__table_); return *this; } @@ -1763,7 +1763,7 @@ typename unordered_multiset<_Value, _Hash, _Pred, _Alloc>::size_type erase_if(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __c, _Predicate __pred) { - return _VSTD::__libcpp_erase_if_container(__c, __pred); + return std::__libcpp_erase_if_container(__c, __pred); } #endif @@ -1781,9 +1781,9 @@ { _EqRng __xeq = __x.equal_range(*__i); _EqRng __yeq = __y.equal_range(*__i); - if (_VSTD::distance(__xeq.first, __xeq.second) != - _VSTD::distance(__yeq.first, __yeq.second) || - !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first)) + if (std::distance(__xeq.first, __xeq.second) != + std::distance(__yeq.first, __yeq.second) || + !std::is_permutation(__xeq.first, __xeq.second, __yeq.first)) return false; __i = __xeq.second; } diff --git a/libcxx/include/valarray b/libcxx/include/valarray --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -3045,9 +3045,9 @@ __clear(size()); __begin_ = allocator().allocate(__n); __end_ = __begin_ + __n; - _VSTD::uninitialized_copy(__f, __l, __begin_); + std::uninitialized_copy(__f, __l, __begin_); } else { - _VSTD::copy(__f, __l, __begin_); + std::copy(__f, __l, __begin_); } return *this; } @@ -3056,7 +3056,7 @@ valarray<_Tp>& valarray<_Tp>::operator=(const valarray& __v) { - if (this != _VSTD::addressof(__v)) + if (this != std::addressof(__v)) return __assign_range(__v.__begin_, __v.__end_); return *this; } @@ -3091,7 +3091,7 @@ valarray<_Tp>& valarray<_Tp>::operator=(const value_type& __x) { - _VSTD::fill(__begin_, __end_, __x); + std::fill(__begin_, __end_, __x); return *this; } @@ -3613,8 +3613,8 @@ void valarray<_Tp>::swap(valarray& __v) _NOEXCEPT { - _VSTD::swap(__begin_, __v.__begin_); - _VSTD::swap(__end_, __v.__end_); + std::swap(__begin_, __v.__begin_); + std::swap(__end_, __v.__end_); } template @@ -3638,7 +3638,7 @@ { if (__begin_ == __end_) return value_type(); - return *_VSTD::min_element(__begin_, __end_); + return *std::min_element(__begin_, __end_); } template @@ -3648,7 +3648,7 @@ { if (__begin_ == __end_) return value_type(); - return *_VSTD::max_element(__begin_, __end_); + return *std::max_element(__begin_, __end_); } template @@ -3665,14 +3665,14 @@ value_type* __te; if (__i >= 0) { - __i = _VSTD::min(__i, static_cast(__n)); + __i = std::min(__i, static_cast(__n)); __sb = __begin_ + __i; __tb = __r.__begin_; __te = __r.__begin_ + (__n - __i); } else { - __i = _VSTD::min(-__i, static_cast(__n)); + __i = std::min(-__i, static_cast(__n)); __sb = __begin_; __tb = __r.__begin_ + __i; __te = __r.__begin_ + __n; diff --git a/libcxx/include/variant b/libcxx/include/variant --- a/libcxx/include/variant +++ b/libcxx/include/variant @@ -255,7 +255,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_variant_access(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -348,13 +348,13 @@ template _LIBCPP_INLINE_VISIBILITY constexpr variant<_Types...>&& __as_variant(variant<_Types...>&& __vs) noexcept { - return _VSTD::move(__vs); + return std::move(__vs); } template _LIBCPP_INLINE_VISIBILITY constexpr const variant<_Types...>&& __as_variant(const variant<_Types...>&& __vs) noexcept { - return _VSTD::move(__vs); + return std::move(__vs); } namespace __find_detail { @@ -446,13 +446,13 @@ template inline _LIBCPP_INLINE_VISIBILITY static constexpr auto&& __get_alt(_Vp&& __v, in_place_index_t<0>) { - return _VSTD::forward<_Vp>(__v).__head; + return std::forward<_Vp>(__v).__head; } template inline _LIBCPP_INLINE_VISIBILITY static constexpr auto&& __get_alt(_Vp&& __v, in_place_index_t<_Ip>) { - return __get_alt(_VSTD::forward<_Vp>(__v).__tail, in_place_index<_Ip - 1>); + return __get_alt(std::forward<_Vp>(__v).__tail, in_place_index<_Ip - 1>); } }; @@ -460,7 +460,7 @@ template inline _LIBCPP_INLINE_VISIBILITY static constexpr auto&& __get_alt(_Vp&& __v) { - return __union::__get_alt(_VSTD::forward<_Vp>(__v).__data, + return __union::__get_alt(std::forward<_Vp>(__v).__data, in_place_index<_Ip>); } }; @@ -469,7 +469,7 @@ template inline _LIBCPP_INLINE_VISIBILITY static constexpr auto&& __get_alt(_Vp&& __v) { - return __base::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v).__impl); + return __base::__get_alt<_Ip>(std::forward<_Vp>(__v).__impl); } }; @@ -484,9 +484,9 @@ __visit_alt_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) { constexpr auto __fdiagonal = __make_fdiagonal<_Visitor&&, - decltype(_VSTD::forward<_Vs>(__vs).__as_base())...>(); - return __fdiagonal[__index](_VSTD::forward<_Visitor>(__visitor), - _VSTD::forward<_Vs>(__vs).__as_base()...); + decltype(std::forward<_Vs>(__vs).__as_base())...>(); + return __fdiagonal[__index](std::forward<_Visitor>(__visitor), + std::forward<_Vs>(__vs).__as_base()...); } template @@ -495,10 +495,10 @@ _Vs&&... __vs) { constexpr auto __fmatrix = __make_fmatrix<_Visitor&&, - decltype(_VSTD::forward<_Vs>(__vs).__as_base())...>(); + decltype(std::forward<_Vs>(__vs).__as_base())...>(); return __at(__fmatrix, __vs.index()...)( - _VSTD::forward<_Visitor>(__visitor), - _VSTD::forward<_Vs>(__vs).__as_base()...); + std::forward<_Visitor>(__visitor), + std::forward<_Vs>(__vs).__as_base()...); } private: @@ -525,7 +525,7 @@ static constexpr auto __make_farray(_Fs&&... __fs) { __std_visit_visitor_return_type_check<__uncvref_t<_Fs>...>(); using __result = __farray...>, sizeof...(_Fs)>; - return __result{{_VSTD::forward<_Fs>(__fs)...}}; + return __result{{std::forward<_Fs>(__fs)...}}; } template @@ -533,7 +533,7 @@ template inline _LIBCPP_INLINE_VISIBILITY static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) { - return _VSTD::__invoke_constexpr( + return std::__invoke_constexpr( static_cast<_Fp>(__f), __access::__base::__get_alt<_Is>(static_cast<_Vs>(__vs))...); } @@ -595,8 +595,8 @@ static constexpr decltype(auto) __visit_alt_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) { return __base::__visit_alt_at(__index, - _VSTD::forward<_Visitor>(__visitor), - _VSTD::forward<_Vs>(__vs).__impl...); + std::forward<_Visitor>(__visitor), + std::forward<_Vs>(__vs).__impl...); } template @@ -604,8 +604,8 @@ static constexpr decltype(auto) __visit_alt(_Visitor&& __visitor, _Vs&&... __vs) { return __base::__visit_alt( - _VSTD::forward<_Visitor>(__visitor), - _VSTD::__as_variant(_VSTD::forward<_Vs>(__vs)).__impl...); + std::forward<_Visitor>(__visitor), + std::__as_variant(std::forward<_Vs>(__vs)).__impl...); } template @@ -614,8 +614,8 @@ __visit_value_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) { return __visit_alt_at( __index, - __make_value_visitor(_VSTD::forward<_Visitor>(__visitor)), - _VSTD::forward<_Vs>(__vs)...); + __make_value_visitor(std::forward<_Visitor>(__visitor)), + std::forward<_Vs>(__vs)...); } template @@ -623,8 +623,8 @@ static constexpr decltype(auto) __visit_value(_Visitor&& __visitor, _Vs&&... __vs) { return __visit_alt( - __make_value_visitor(_VSTD::forward<_Visitor>(__visitor)), - _VSTD::forward<_Vs>(__vs)...); + __make_value_visitor(std::forward<_Visitor>(__visitor)), + std::forward<_Vs>(__vs)...); } #if _LIBCPP_STD_VER > 17 @@ -633,8 +633,8 @@ static constexpr _Rp __visit_value(_Visitor&& __visitor, _Vs&&... __vs) { return __visit_alt( - __make_value_visitor<_Rp>(_VSTD::forward<_Visitor>(__visitor)), - _VSTD::forward<_Vs>(__vs)...); + __make_value_visitor<_Rp>(std::forward<_Visitor>(__visitor)), + std::forward<_Vs>(__vs)...); } #endif @@ -652,9 +652,9 @@ constexpr decltype(auto) operator()(_Alts&&... __alts) const { __std_visit_exhaustive_visitor_check< _Visitor, - decltype((_VSTD::forward<_Alts>(__alts).__value))...>(); - return _VSTD::__invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), - _VSTD::forward<_Alts>(__alts).__value...); + decltype((std::forward<_Alts>(__alts).__value))...>(); + return std::__invoke_constexpr(std::forward<_Visitor>(__visitor), + std::forward<_Alts>(__alts).__value...); } _Visitor&& __visitor; }; @@ -667,14 +667,14 @@ constexpr _Rp operator()(_Alts&&... __alts) const { __std_visit_exhaustive_visitor_check< _Visitor, - decltype((_VSTD::forward<_Alts>(__alts).__value))...>(); + decltype((std::forward<_Alts>(__alts).__value))...>(); if constexpr (is_void_v<_Rp>) { - _VSTD::__invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), - _VSTD::forward<_Alts>(__alts).__value...); + std::__invoke_constexpr(std::forward<_Visitor>(__visitor), + std::forward<_Alts>(__alts).__value...); } else { - return _VSTD::__invoke_constexpr(_VSTD::forward<_Visitor>(__visitor), - _VSTD::forward<_Alts>(__alts).__value...); + return std::__invoke_constexpr(std::forward<_Visitor>(__visitor), + std::forward<_Alts>(__alts).__value...); } } @@ -685,14 +685,14 @@ template inline _LIBCPP_INLINE_VISIBILITY static constexpr auto __make_value_visitor(_Visitor&& __visitor) { - return __value_visitor<_Visitor>{_VSTD::forward<_Visitor>(__visitor)}; + return __value_visitor<_Visitor>{std::forward<_Visitor>(__visitor)}; } #if _LIBCPP_STD_VER > 17 template inline _LIBCPP_INLINE_VISIBILITY static constexpr auto __make_value_visitor(_Visitor&& __visitor) { - return __value_visitor_return_type<_Rp, _Visitor>{_VSTD::forward<_Visitor>(__visitor)}; + return __value_visitor_return_type<_Rp, _Visitor>{std::forward<_Visitor>(__visitor)}; } #endif }; @@ -706,7 +706,7 @@ template inline _LIBCPP_INLINE_VISIBILITY explicit constexpr __alt(in_place_t, _Args&&... __args) - : __value(_VSTD::forward<_Args>(__args)...) {} + : __value(std::forward<_Args>(__args)...) {} __value_type __value; }; @@ -730,12 +730,12 @@ template \ inline _LIBCPP_INLINE_VISIBILITY \ explicit constexpr __union(in_place_index_t<0>, _Args&&... __args) \ - : __head(in_place, _VSTD::forward<_Args>(__args)...) {} \ + : __head(in_place, std::forward<_Args>(__args)...) {} \ \ template \ inline _LIBCPP_INLINE_VISIBILITY \ explicit constexpr __union(in_place_index_t<_Ip>, _Args&&... __args) \ - : __tail(in_place_index<_Ip - 1>, _VSTD::forward<_Args>(__args)...) {} \ + : __tail(in_place_index<_Ip - 1>, std::forward<_Args>(__args)...) {} \ \ __union(const __union&) = default; \ __union(__union&&) = default; \ @@ -772,7 +772,7 @@ inline _LIBCPP_INLINE_VISIBILITY explicit constexpr __base(in_place_index_t<_Ip>, _Args&&... __args) : - __data(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...), + __data(in_place_index<_Ip>, std::forward<_Args>(__args)...), __index(_Ip) {} inline _LIBCPP_INLINE_VISIBILITY @@ -790,13 +790,13 @@ constexpr auto&& __as_base() & { return *this; } inline _LIBCPP_INLINE_VISIBILITY - constexpr auto&& __as_base() && { return _VSTD::move(*this); } + constexpr auto&& __as_base() && { return std::move(*this); } inline _LIBCPP_INLINE_VISIBILITY constexpr auto&& __as_base() const & { return *this; } inline _LIBCPP_INLINE_VISIBILITY - constexpr auto&& __as_base() const && { return _VSTD::move(*this); } + constexpr auto&& __as_base() const && { return std::move(*this); } inline _LIBCPP_INLINE_VISIBILITY static constexpr size_t __size() { return sizeof...(_Types); } @@ -873,8 +873,8 @@ template inline _LIBCPP_INLINE_VISIBILITY static _Tp& __construct_alt(__alt<_Ip, _Tp>& __a, _Args&&... __args) { - ::new ((void*)_VSTD::addressof(__a)) - __alt<_Ip, _Tp>(in_place, _VSTD::forward<_Args>(__args)...); + ::new ((void*)std::addressof(__a)) + __alt<_Ip, _Tp>(in_place, std::forward<_Args>(__args)...); return __a.__value; } @@ -888,9 +888,9 @@ [](auto& __lhs_alt, auto&& __rhs_alt) { __construct_alt( __lhs_alt, - _VSTD::forward(__rhs_alt).__value); + std::forward(__rhs_alt).__value); }, - __lhs, _VSTD::forward<_Rhs>(__rhs)); + __lhs, std::forward<_Rhs>(__rhs)); __lhs.__index = __rhs.index(); } } @@ -927,7 +927,7 @@ __move_constructor(__move_constructor&& __that) noexcept( __all...>::value) : __move_constructor(__valueless_t{}) { - this->__generic_construct(*this, _VSTD::move(__that)); + this->__generic_construct(*this, std::move(__that)); }); _LIBCPP_VARIANT_MOVE_CONSTRUCTOR( @@ -988,7 +988,7 @@ auto& __emplace(_Args&&... __args) { this->__destroy(); auto& __res = this->__construct_alt(__access::__base::__get_alt<_Ip>(*this), - _VSTD::forward<_Args>(__args)...); + std::forward<_Args>(__args)...); this->__index = _Ip; return __res; } @@ -998,18 +998,18 @@ inline _LIBCPP_INLINE_VISIBILITY void __assign_alt(__alt<_Ip, _Tp>& __a, _Arg&& __arg) { if (this->index() == _Ip) { - __a.__value = _VSTD::forward<_Arg>(__arg); + __a.__value = std::forward<_Arg>(__arg); } else { struct { void operator()(true_type) const { - __this->__emplace<_Ip>(_VSTD::forward<_Arg>(__arg)); + __this->__emplace<_Ip>(std::forward<_Arg>(__arg)); } void operator()(false_type) const { - __this->__emplace<_Ip>(_Tp(_VSTD::forward<_Arg>(__arg))); + __this->__emplace<_Ip>(_Tp(std::forward<_Arg>(__arg))); } __assignment* __this; _Arg&& __arg; - } __impl{this, _VSTD::forward<_Arg>(__arg)}; + } __impl{this, std::forward<_Arg>(__arg)}; __impl(bool_constant || !is_nothrow_move_constructible_v<_Tp>>{}); } @@ -1028,9 +1028,9 @@ [this](auto& __this_alt, auto&& __that_alt) { this->__assign_alt( __this_alt, - _VSTD::forward(__that_alt).__value); + std::forward(__that_alt).__value); }, - *this, _VSTD::forward<_That>(__that)); + *this, std::forward<_That>(__that)); } } }; @@ -1066,7 +1066,7 @@ __move_assignment& operator=(__move_assignment&& __that) noexcept( __all<(is_nothrow_move_constructible_v<_Types> && is_nothrow_move_assignable_v<_Types>)...>::value) { - this->__generic_assign(_VSTD::move(__that)); + this->__generic_assign(std::move(__that)); return *this; }); @@ -1128,7 +1128,7 @@ inline _LIBCPP_INLINE_VISIBILITY void __assign(_Arg&& __arg) { this->__assign_alt(__access::__base::__get_alt<_Ip>(*this), - _VSTD::forward<_Arg>(__arg)); + std::forward<_Arg>(__arg)); } inline _LIBCPP_INLINE_VISIBILITY @@ -1139,30 +1139,30 @@ __visitation::__base::__visit_alt_at( this->index(), [](auto& __this_alt, auto& __that_alt) { - using _VSTD::swap; + using std::swap; swap(__this_alt.__value, __that_alt.__value); }, *this, __that); } else { __impl* __lhs = this; - __impl* __rhs = _VSTD::addressof(__that); + __impl* __rhs = std::addressof(__that); if (__lhs->__move_nothrow() && !__rhs->__move_nothrow()) { - _VSTD::swap(__lhs, __rhs); + std::swap(__lhs, __rhs); } - __impl __tmp(_VSTD::move(*__rhs)); + __impl __tmp(std::move(*__rhs)); #ifndef _LIBCPP_NO_EXCEPTIONS if constexpr (__all...>::value) { - this->__generic_construct(*__rhs, _VSTD::move(*__lhs)); + this->__generic_construct(*__rhs, std::move(*__lhs)); } else { // EXTENSION: When the move construction of `__lhs` into `__rhs` throws // and `__tmp` is nothrow move constructible then we move `__tmp` back // into `__rhs` and provide the strong exception safety guarantee. try { - this->__generic_construct(*__rhs, _VSTD::move(*__lhs)); + this->__generic_construct(*__rhs, std::move(*__lhs)); } catch (...) { if (__tmp.__move_nothrow()) { - this->__generic_construct(*__rhs, _VSTD::move(__tmp)); + this->__generic_construct(*__rhs, std::move(__tmp)); } throw; } @@ -1170,9 +1170,9 @@ #else // this isn't consolidated with the `if constexpr` branch above due to // `throw` being ill-formed with exceptions disabled even when discarded. - this->__generic_construct(*__rhs, _VSTD::move(*__lhs)); + this->__generic_construct(*__rhs, std::move(*__lhs)); #endif - this->__generic_construct(*__lhs, _VSTD::move(__tmp)); + this->__generic_construct(*__lhs, std::move(__tmp)); } } @@ -1302,7 +1302,7 @@ inline _LIBCPP_INLINE_VISIBILITY constexpr variant(_Arg&& __arg) noexcept( is_nothrow_constructible_v<_Tp, _Arg>) - : __impl(in_place_index<_Ip>, _VSTD::forward<_Arg>(__arg)) {} + : __impl(in_place_index<_Ip>, std::forward<_Arg>(__arg)) {} template , @@ -1312,7 +1312,7 @@ explicit constexpr variant( in_place_index_t<_Ip>, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) - : __impl(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {} + : __impl(in_place_index<_Ip>, std::forward<_Args>(__args)...) {} template < size_t _Ip, @@ -1328,7 +1328,7 @@ initializer_list<_Up> __il, _Args&&... __args) noexcept( is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>) - : __impl(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {} + : __impl(in_place_index<_Ip>, __il, std::forward<_Args>(__args)...) {} template < class _Tp, @@ -1339,7 +1339,7 @@ inline _LIBCPP_INLINE_VISIBILITY explicit constexpr variant(in_place_type_t<_Tp>, _Args&&... __args) noexcept( is_nothrow_constructible_v<_Tp, _Args...>) - : __impl(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {} + : __impl(in_place_index<_Ip>, std::forward<_Args>(__args)...) {} template < class _Tp, @@ -1355,7 +1355,7 @@ initializer_list<_Up> __il, _Args&&... __args) noexcept( is_nothrow_constructible_v<_Tp, initializer_list< _Up>&, _Args...>) - : __impl(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {} + : __impl(in_place_index<_Ip>, __il, std::forward<_Args>(__args)...) {} ~variant() = default; @@ -1374,7 +1374,7 @@ variant& operator=(_Arg&& __arg) noexcept( is_nothrow_assignable_v<_Tp&, _Arg> && is_nothrow_constructible_v<_Tp, _Arg>) { - __impl.template __assign<_Ip>(_VSTD::forward<_Arg>(__arg)); + __impl.template __assign<_Ip>(std::forward<_Arg>(__arg)); return *this; } @@ -1386,7 +1386,7 @@ enable_if_t, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _Tp& emplace(_Args&&... __args) { - return __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...); + return __impl.template __emplace<_Ip>(std::forward<_Args>(__args)...); } template < @@ -1399,7 +1399,7 @@ int> = 0> inline _LIBCPP_INLINE_VISIBILITY _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) { - return __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...); + return __impl.template __emplace<_Ip>(__il, std::forward<_Args>(__args)...); } template < @@ -1410,7 +1410,7 @@ enable_if_t, int> = 0> inline _LIBCPP_INLINE_VISIBILITY _Tp& emplace(_Args&&... __args) { - return __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...); + return __impl.template __emplace<_Ip>(std::forward<_Args>(__args)...); } template < @@ -1423,7 +1423,7 @@ int> = 0> inline _LIBCPP_INLINE_VISIBILITY _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) { - return __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...); + return __impl.template __emplace<_Ip>(__il, std::forward<_Args>(__args)...); } inline _LIBCPP_INLINE_VISIBILITY @@ -1475,7 +1475,7 @@ if (!__holds_alternative<_Ip>(__v)) { __throw_bad_variant_access(); } - return __variant::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v)).__value; + return __variant::__get_alt<_Ip>(std::forward<_Vp>(__v)).__value; } template @@ -1495,7 +1495,7 @@ variant<_Types...>&& __v) { static_assert(_Ip < sizeof...(_Types)); static_assert(!is_void_v>>); - return __generic_get<_Ip>(_VSTD::move(__v)); + return __generic_get<_Ip>(std::move(__v)); } template @@ -1515,7 +1515,7 @@ const variant<_Types...>&& __v) { static_assert(_Ip < sizeof...(_Types)); static_assert(!is_void_v>>); - return __generic_get<_Ip>(_VSTD::move(__v)); + return __generic_get<_Ip>(std::move(__v)); } template @@ -1523,7 +1523,7 @@ _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr _Tp& get(variant<_Types...>& __v) { static_assert(!is_void_v<_Tp>); - return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v); + return std::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v); } template @@ -1531,8 +1531,8 @@ _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr _Tp&& get(variant<_Types...>&& __v) { static_assert(!is_void_v<_Tp>); - return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>( - _VSTD::move(__v)); + return std::get<__find_exactly_one_t<_Tp, _Types...>::value>( + std::move(__v)); } template @@ -1540,7 +1540,7 @@ _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr const _Tp& get(const variant<_Types...>& __v) { static_assert(!is_void_v<_Tp>); - return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v); + return std::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v); } template @@ -1548,8 +1548,8 @@ _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr const _Tp&& get(const variant<_Types...>&& __v) { static_assert(!is_void_v<_Tp>); - return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>( - _VSTD::move(__v)); + return std::get<__find_exactly_one_t<_Tp, _Types...>::value>( + std::move(__v)); } template @@ -1557,7 +1557,7 @@ constexpr auto* __generic_get_if(_Vp* __v) noexcept { using __variant_detail::__access::__variant; return __v && __holds_alternative<_Ip>(*__v) - ? _VSTD::addressof(__variant::__get_alt<_Ip>(*__v).__value) + ? std::addressof(__variant::__get_alt<_Ip>(*__v).__value) : nullptr; } @@ -1584,7 +1584,7 @@ constexpr add_pointer_t<_Tp> get_if(variant<_Types...>* __v) noexcept { static_assert(!is_void_v<_Tp>); - return _VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v); + return std::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v); } template @@ -1592,16 +1592,16 @@ constexpr add_pointer_t get_if(const variant<_Types...>* __v) noexcept { static_assert(!is_void_v<_Tp>); - return _VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v); + return std::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v); } template struct __convert_to_bool { template _LIBCPP_INLINE_VISIBILITY constexpr bool operator()(_T1 && __t1, _T2&& __t2) const { - static_assert(is_convertible(__t1), _VSTD::forward<_T2>(__t2))), bool>::value, + static_assert(is_convertible(__t1), std::forward<_T2>(__t2))), bool>::value, "the relational operator does not return a type which is implicitly convertible to bool"); - return _Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2)); + return _Operator{}(std::forward<_T1>(__t1), std::forward<_T2>(__t2)); } }; @@ -1681,7 +1681,7 @@ _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr void __throw_if_valueless(_Vs&&... __vs) { const bool __valueless = - (... || _VSTD::__as_variant(__vs).valueless_by_exception()); + (... || std::__as_variant(__vs).valueless_by_exception()); if (__valueless) { __throw_bad_variant_access(); } @@ -1689,27 +1689,27 @@ template < class _Visitor, class... _Vs, - typename = void_t()))...> > + typename = void_t()))...> > inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) { using __variant_detail::__visitation::__variant; - _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...); - return __variant::__visit_value(_VSTD::forward<_Visitor>(__visitor), - _VSTD::forward<_Vs>(__vs)...); + std::__throw_if_valueless(std::forward<_Vs>(__vs)...); + return __variant::__visit_value(std::forward<_Visitor>(__visitor), + std::forward<_Vs>(__vs)...); } #if _LIBCPP_STD_VER > 17 template < class _Rp, class _Visitor, class... _Vs, - typename = void_t()))...> > + typename = void_t()))...> > inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr _Rp visit(_Visitor&& __visitor, _Vs&&... __vs) { using __variant_detail::__visitation::__variant; - _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...); - return __variant::__visit_value<_Rp>(_VSTD::forward<_Visitor>(__visitor), - _VSTD::forward<_Vs>(__vs)...); + std::__throw_if_valueless(std::forward<_Vs>(__vs)...); + return __variant::__visit_value<_Rp>(std::forward<_Visitor>(__visitor), + std::forward<_Vs>(__vs)...); } #endif @@ -1751,7 +1751,7 @@ inline _LIBCPP_INLINE_VISIBILITY constexpr auto&& __unchecked_get(_Vp&& __v) noexcept { using __variant_detail::__access::__variant; - return __variant::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v)).__value; + return __variant::__get_alt<_Ip>(std::forward<_Vp>(__v)).__value; } template diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -340,7 +340,7 @@ _LIBCPP_INLINE_VISIBILITY __vector_base(allocator_type&& __a) _NOEXCEPT : __begin_(nullptr), __end_(nullptr), - __end_cap_(nullptr, _VSTD::move(__a)) {} + __end_cap_(nullptr, std::move(__a)) {} #endif }; @@ -365,8 +365,8 @@ typedef typename __alloc_traits::const_pointer const_pointer; typedef __wrap_iter iterator; typedef __wrap_iter const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; static_assert((is_same::value), "Allocator::value_type must be same type as value_type"); @@ -374,7 +374,7 @@ _LIBCPP_INLINE_VISIBILITY vector() _NOEXCEPT_(is_nothrow_default_constructible::value) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a) #if _LIBCPP_STD_VER <= 14 @@ -384,7 +384,7 @@ #endif : __base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); } explicit vector(size_type __n); #if _LIBCPP_STD_VER > 11 @@ -396,7 +396,7 @@ vector(size_type __n, const value_type& __x, const allocator_type& __a) : __base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__n > 0) { __vallocate(__n); @@ -586,10 +586,10 @@ _LIBCPP_INLINE_VISIBILITY value_type* data() _NOEXCEPT - {return _VSTD::__to_address(this->__begin_);} + {return std::__to_address(this->__begin_);} _LIBCPP_INLINE_VISIBILITY const value_type* data() const _NOEXCEPT - {return _VSTD::__to_address(this->__begin_);} + {return std::__to_address(this->__begin_);} #ifdef _LIBCPP_CXX03_LANG _LIBCPP_INLINE_VISIBILITY @@ -598,7 +598,7 @@ template _LIBCPP_INLINE_VISIBILITY void __emplace_back(_Arg&& __arg) { - emplace_back(_VSTD::forward<_Arg>(__arg)); + emplace_back(std::forward<_Arg>(__arg)); } #endif @@ -815,8 +815,8 @@ _LIBCPP_INLINE_VISIBILITY void __construct_one_at_end(_Args&& ...__args) { _ConstructTransaction __tx(*this, 1); - __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_), - _VSTD::forward<_Args>(__args)...); + __alloc_traits::construct(this->__alloc(), std::__to_address(__tx.__pos_), + std::forward<_Args>(__args)...); ++__tx.__pos_; } @@ -840,7 +840,7 @@ void __base_destruct_at_end(pointer __new_last) _NOEXCEPT { pointer __soon_to_be_end = this->__end_; while (__new_last != __soon_to_be_end) - __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__soon_to_be_end)); + __alloc_traits::destroy(__alloc(), std::__to_address(--__soon_to_be_end)); this->__end_ = __new_last; } @@ -862,7 +862,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS __vector_base_common::__throw_length_error(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -871,7 +871,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS __vector_base_common::__throw_out_of_range(); #else - _VSTD::abort(); + std::abort(); #endif } @@ -895,7 +895,7 @@ void __move_assign_alloc(vector& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { - __alloc() = _VSTD::move(__c.__alloc()); + __alloc() = std::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY @@ -928,10 +928,10 @@ { __annotate_delete(); - _VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, this->__end_, __v.__begin_); - _VSTD::swap(this->__begin_, __v.__begin_); - _VSTD::swap(this->__end_, __v.__end_); - _VSTD::swap(this->__end_cap(), __v.__end_cap()); + std::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, this->__end_, __v.__begin_); + std::swap(this->__begin_, __v.__begin_); + std::swap(this->__end_, __v.__end_); + std::swap(this->__end_cap(), __v.__end_cap()); __v.__first_ = __v.__begin_; __annotate_new(size()); __invalidate_all_iterators(); @@ -943,11 +943,11 @@ { __annotate_delete(); pointer __r = __v.__begin_; - _VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, __p, __v.__begin_); - _VSTD::__construct_forward_with_exception_guarantees(this->__alloc(), __p, this->__end_, __v.__end_); - _VSTD::swap(this->__begin_, __v.__begin_); - _VSTD::swap(this->__end_, __v.__end_); - _VSTD::swap(this->__end_cap(), __v.__end_cap()); + std::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, __p, __v.__begin_); + std::__construct_forward_with_exception_guarantees(this->__alloc(), __p, this->__end_, __v.__end_); + std::swap(this->__begin_, __v.__begin_); + std::swap(this->__end_, __v.__end_); + std::swap(this->__end_cap(), __v.__end_cap()); __v.__first_ = __v.__begin_; __annotate_new(size()); __invalidate_all_iterators(); @@ -988,7 +988,7 @@ typename vector<_Tp, _Allocator>::size_type vector<_Tp, _Allocator>::max_size() const _NOEXCEPT { - return _VSTD::min(__alloc_traits::max_size(this->__alloc()), + return std::min(__alloc_traits::max_size(this->__alloc()), numeric_limits::max()); } @@ -1004,7 +1004,7 @@ const size_type __cap = capacity(); if (__cap >= __ms / 2) return __ms; - return _VSTD::max(2 * __cap, __new_size); + return std::max(2 * __cap, __new_size); } // Default constructs __n objects starting at __end_ @@ -1019,7 +1019,7 @@ _ConstructTransaction __tx(*this, __n); const_pointer __new_end = __tx.__new_end_; for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) { - __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos)); + __alloc_traits::construct(this->__alloc(), std::__to_address(__pos)); } } @@ -1037,7 +1037,7 @@ _ConstructTransaction __tx(*this, __n); const_pointer __new_end = __tx.__new_end_; for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) { - __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos), __x); + __alloc_traits::construct(this->__alloc(), std::__to_address(__pos), __x); } } @@ -1051,7 +1051,7 @@ vector<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n) { _ConstructTransaction __tx(*this, __n); - _VSTD::__construct_range_forward(this->__alloc(), __first, __last, __tx.__pos_); + std::__construct_range_forward(this->__alloc(), __first, __last, __tx.__pos_); } // Default constructs __n objects starting at __end_ @@ -1095,7 +1095,7 @@ template vector<_Tp, _Allocator>::vector(size_type __n) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__n > 0) { __vallocate(__n); @@ -1108,7 +1108,7 @@ vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a) : __base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__n > 0) { __vallocate(__n); @@ -1120,7 +1120,7 @@ template vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__n > 0) { __vallocate(__n); @@ -1138,7 +1138,7 @@ typename iterator_traits<_InputIterator>::reference>::value, _InputIterator>::type __last) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __first != __last; ++__first) __emplace_back(*__first); } @@ -1153,7 +1153,7 @@ typename iterator_traits<_InputIterator>::reference>::value>::type*) : __base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); for (; __first != __last; ++__first) __emplace_back(*__first); } @@ -1167,8 +1167,8 @@ typename iterator_traits<_ForwardIterator>::reference>::value, _ForwardIterator>::type __last) { - _VSTD::__debug_db_insert_c(this); - size_type __n = static_cast(_VSTD::distance(__first, __last)); + std::__debug_db_insert_c(this); + size_type __n = static_cast(std::distance(__first, __last)); if (__n > 0) { __vallocate(__n); @@ -1185,8 +1185,8 @@ typename iterator_traits<_ForwardIterator>::reference>::value>::type*) : __base(__a) { - _VSTD::__debug_db_insert_c(this); - size_type __n = static_cast(_VSTD::distance(__first, __last)); + std::__debug_db_insert_c(this); + size_type __n = static_cast(std::distance(__first, __last)); if (__n > 0) { __vallocate(__n); @@ -1198,7 +1198,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x) : __base(__alloc_traits::select_on_container_copy_construction(__x.__alloc())) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); size_type __n = __x.size(); if (__n > 0) { @@ -1211,7 +1211,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const __identity_t& __a) : __base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); size_type __n = __x.size(); if (__n > 0) { @@ -1230,11 +1230,11 @@ #else _NOEXCEPT_(is_nothrow_move_constructible::value) #endif - : __base(_VSTD::move(__x.__alloc())) + : __base(std::move(__x.__alloc())) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); #if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->swap(this, _VSTD::addressof(__x)); + __get_db()->swap(this, std::addressof(__x)); #endif this->__begin_ = __x.__begin_; this->__end_ = __x.__end_; @@ -1247,7 +1247,7 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const __identity_t& __a) : __base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__a == __x.__alloc()) { this->__begin_ = __x.__begin_; @@ -1255,7 +1255,7 @@ this->__end_cap() = __x.__end_cap(); __x.__begin_ = __x.__end_ = __x.__end_cap() = nullptr; #if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->swap(this, _VSTD::addressof(__x)); + __get_db()->swap(this, std::addressof(__x)); #endif } else @@ -1269,7 +1269,7 @@ inline _LIBCPP_INLINE_VISIBILITY vector<_Tp, _Allocator>::vector(initializer_list __il) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__il.size() > 0) { __vallocate(__il.size()); @@ -1282,7 +1282,7 @@ vector<_Tp, _Allocator>::vector(initializer_list __il, const allocator_type& __a) : __base(__a) { - _VSTD::__debug_db_insert_c(this); + std::__debug_db_insert_c(this); if (__il.size() > 0) { __vallocate(__il.size()); @@ -1327,7 +1327,7 @@ this->__end_cap() = __c.__end_cap(); __c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr; #if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->swap(this, _VSTD::addressof(__c)); + __get_db()->swap(this, std::addressof(__c)); #endif } @@ -1338,7 +1338,7 @@ vector<_Tp, _Allocator>& vector<_Tp, _Allocator>::operator=(const vector& __x) { - if (this != _VSTD::addressof(__x)) + if (this != std::addressof(__x)) { __copy_assign_alloc(__x); assign(__x.__begin_, __x.__end_); @@ -1376,7 +1376,7 @@ >::type vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last) { - size_type __new_size = static_cast(_VSTD::distance(__first, __last)); + size_type __new_size = static_cast(std::distance(__first, __last)); if (__new_size <= capacity()) { _ForwardIterator __mid = __last; @@ -1385,9 +1385,9 @@ { __growing = true; __mid = __first; - _VSTD::advance(__mid, size()); + std::advance(__mid, size()); } - pointer __m = _VSTD::copy(__first, __mid, this->__begin_); + pointer __m = std::copy(__first, __mid, this->__begin_); if (__growing) __construct_at_end(__mid, __last, __new_size - size()); else @@ -1409,7 +1409,7 @@ if (__n <= capacity()) { size_type __s = size(); - _VSTD::fill_n(this->__begin_, _VSTD::min(__n, __s), __u); + std::fill_n(this->__begin_, std::min(__n, __s), __u); if (__n > __s) __construct_at_end(__n - __s, __u); else @@ -1563,8 +1563,8 @@ { allocator_type& __a = this->__alloc(); __split_buffer __v(__recommend(size() + 1), size(), __a); - // __v.push_back(_VSTD::forward<_Up>(__x)); - __alloc_traits::construct(__a, _VSTD::__to_address(__v.__end_), _VSTD::forward<_Up>(__x)); + // __v.push_back(std::forward<_Up>(__x)); + __alloc_traits::construct(__a, std::__to_address(__v.__end_), std::forward<_Up>(__x)); __v.__end_++; __swap_out_circular_buffer(__v); } @@ -1591,10 +1591,10 @@ { if (this->__end_ < this->__end_cap()) { - __construct_one_at_end(_VSTD::move(__x)); + __construct_one_at_end(std::move(__x)); } else - __push_back_slow_path(_VSTD::move(__x)); + __push_back_slow_path(std::move(__x)); } template @@ -1604,8 +1604,8 @@ { allocator_type& __a = this->__alloc(); __split_buffer __v(__recommend(size() + 1), size(), __a); -// __v.emplace_back(_VSTD::forward<_Args>(__args)...); - __alloc_traits::construct(__a, _VSTD::__to_address(__v.__end_), _VSTD::forward<_Args>(__args)...); +// __v.emplace_back(std::forward<_Args>(__args)...); + __alloc_traits::construct(__a, std::__to_address(__v.__end_), std::forward<_Args>(__args)...); __v.__end_++; __swap_out_circular_buffer(__v); } @@ -1622,10 +1622,10 @@ { if (this->__end_ < this->__end_cap()) { - __construct_one_at_end(_VSTD::forward<_Args>(__args)...); + __construct_one_at_end(std::forward<_Args>(__args)...); } else - __emplace_back_slow_path(_VSTD::forward<_Args>(__args)...); + __emplace_back_slow_path(std::forward<_Args>(__args)...); #if _LIBCPP_STD_VER > 14 return this->back(); #endif @@ -1647,13 +1647,13 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::erase(const_iterator __position) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::erase(iterator) called with an iterator not referring to this vector"); _LIBCPP_ASSERT(__position != end(), "vector::erase(iterator) called with a non-dereferenceable iterator"); difference_type __ps = __position - cbegin(); pointer __p = this->__begin_ + __ps; - this->__destruct_at_end(_VSTD::move(__p + 1, this->__end_, __p)); + this->__destruct_at_end(std::move(__p + 1, this->__end_, __p)); this->__invalidate_iterators_past(__p-1); iterator __r = __make_iter(__p); return __r; @@ -1663,15 +1663,15 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__first)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__first)) == this, "vector::erase(iterator, iterator) called with an iterator not referring to this vector"); - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__last)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__last)) == this, "vector::erase(iterator, iterator) called with an iterator not referring to this vector"); _LIBCPP_ASSERT(__first <= __last, "vector::erase(first, last) called with invalid range"); pointer __p = this->__begin_ + (__first - begin()); if (__first != __last) { - this->__destruct_at_end(_VSTD::move(__p + (__last - __first), this->__end_, __p)); + this->__destruct_at_end(std::move(__p + (__last - __first), this->__end_, __p)); this->__invalidate_iterators_past(__p - 1); } iterator __r = __make_iter(__p); @@ -1690,18 +1690,18 @@ for (pointer __pos = __tx.__pos_; __i < __from_e; ++__i, (void) ++__pos, __tx.__pos_ = __pos) { __alloc_traits::construct(this->__alloc(), - _VSTD::__to_address(__pos), - _VSTD::move(*__i)); + std::__to_address(__pos), + std::move(*__i)); } } - _VSTD::move_backward(__from_s, __from_s + __n, __old_last); + std::move_backward(__from_s, __from_s + __n, __old_last); } template typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, x) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); if (this->__end_ < this->__end_cap()) @@ -1735,26 +1735,26 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, x) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); if (this->__end_ < this->__end_cap()) { if (__p == this->__end_) { - __construct_one_at_end(_VSTD::move(__x)); + __construct_one_at_end(std::move(__x)); } else { __move_range(__p, this->__end_, __p + 1); - *__p = _VSTD::move(__x); + *__p = std::move(__x); } } else { allocator_type& __a = this->__alloc(); __split_buffer __v(__recommend(size() + 1), __p - this->__begin_, __a); - __v.push_back(_VSTD::move(__x)); + __v.push_back(std::move(__x)); __p = __swap_out_circular_buffer(__v, __p); } return __make_iter(__p); @@ -1765,27 +1765,27 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::emplace(iterator, x) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); if (this->__end_ < this->__end_cap()) { if (__p == this->__end_) { - __construct_one_at_end(_VSTD::forward<_Args>(__args)...); + __construct_one_at_end(std::forward<_Args>(__args)...); } else { - __temp_value __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...); + __temp_value __tmp(this->__alloc(), std::forward<_Args>(__args)...); __move_range(__p, this->__end_, __p + 1); - *__p = _VSTD::move(__tmp.get()); + *__p = std::move(__tmp.get()); } } else { allocator_type& __a = this->__alloc(); __split_buffer __v(__recommend(size() + 1), __p - this->__begin_, __a); - __v.emplace_back(_VSTD::forward<_Args>(__args)...); + __v.emplace_back(std::forward<_Args>(__args)...); __p = __swap_out_circular_buffer(__v, __p); } return __make_iter(__p); @@ -1797,7 +1797,7 @@ typename vector<_Tp, _Allocator>::iterator vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, n, x) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); if (__n > 0) @@ -1818,7 +1818,7 @@ const_pointer __xr = pointer_traits::pointer_to(__x); if (__p <= __xr && __xr < this->__end_) __xr += __old_n; - _VSTD::fill_n(__p, __n, *__xr); + std::fill_n(__p, __n, *__xr); } } else @@ -1845,7 +1845,7 @@ >::type vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, range) called with an iterator not referring to this vector"); difference_type __off = __position - begin(); pointer __p = this->__begin_ + __off; @@ -1877,9 +1877,9 @@ } #endif // _LIBCPP_NO_EXCEPTIONS } - __p = _VSTD::rotate(__p, __old_last, this->__end_); - insert(__make_iter(__p), _VSTD::make_move_iterator(__v.begin()), - _VSTD::make_move_iterator(__v.end())); + __p = std::rotate(__p, __old_last, this->__end_); + insert(__make_iter(__p), std::make_move_iterator(__v.begin()), + std::make_move_iterator(__v.end())); return begin() + __off; } @@ -1895,10 +1895,10 @@ >::type vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last) { - _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this, + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__position)) == this, "vector::insert(iterator, range) called with an iterator not referring to this vector"); pointer __p = this->__begin_ + (__position - begin()); - difference_type __n = _VSTD::distance(__first, __last); + difference_type __n = std::distance(__first, __last); if (__n > 0) { if (__n <= this->__end_cap() - this->__end_) @@ -1911,14 +1911,14 @@ { __m = __first; difference_type __diff = this->__end_ - __p; - _VSTD::advance(__m, __diff); + std::advance(__m, __diff); __construct_at_end(__m, __last, __n - __diff); __n = __dx; } if (__n > 0) { __move_range(__p, __old_last, __p + __old_n); - _VSTD::copy(__first, __m, __p); + std::copy(__first, __m, __p); } } else @@ -1968,13 +1968,13 @@ this->__alloc() == __x.__alloc(), "vector::swap: Either propagate_on_container_swap must be true" " or the allocators must compare equal"); - _VSTD::swap(this->__begin_, __x.__begin_); - _VSTD::swap(this->__end_, __x.__end_); - _VSTD::swap(this->__end_cap(), __x.__end_cap()); - _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(), + std::swap(this->__begin_, __x.__begin_); + std::swap(this->__end_, __x.__end_); + std::swap(this->__end_cap(), __x.__end_cap()); + std::__swap_allocator(this->__alloc(), __x.__alloc(), integral_constant()); #if _LIBCPP_DEBUG_LEVEL == 2 - __get_db()->swap(this, _VSTD::addressof(__x)); + __get_db()->swap(this, std::addressof(__x)); #endif } @@ -2056,7 +2056,7 @@ if (__i->base() > __new_last) { (*__p)->__c_ = nullptr; if (--__c->end_ != __p) - _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); + std::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*)); } } __get_db()->unlock(); @@ -2093,8 +2093,8 @@ typedef __bit_iterator const_pointer; typedef pointer iterator; typedef const_pointer const_iterator; - typedef _VSTD::reverse_iterator reverse_iterator; - typedef _VSTD::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; private: typedef typename __rebind_alloc_helper<__alloc_traits, __storage_type>::type __storage_allocator; @@ -2287,7 +2287,7 @@ _LIBCPP_INLINE_VISIBILITY void emplace_back(_Args&&... __args) #endif { - push_back ( value_type ( _VSTD::forward<_Args>(__args)... )); + push_back ( value_type ( std::forward<_Args>(__args)... )); #if _LIBCPP_STD_VER > 14 return this->back(); #endif @@ -2299,7 +2299,7 @@ #if _LIBCPP_STD_VER > 11 template _LIBCPP_INLINE_VISIBILITY iterator emplace(const_iterator position, _Args&&... __args) - { return insert ( position, value_type ( _VSTD::forward<_Args>(__args)... )); } + { return insert ( position, value_type ( std::forward<_Args>(__args)... )); } #endif iterator insert(const_iterator __position, const value_type& __x); @@ -2340,7 +2340,7 @@ _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable::value); #endif - static void swap(reference __x, reference __y) _NOEXCEPT { _VSTD::swap(__x, __y); } + static void swap(reference __x, reference __y) _NOEXCEPT { std::swap(__x, __y); } void resize(size_type __sz, value_type __x = false); void flip() _NOEXCEPT; @@ -2410,7 +2410,7 @@ void __move_assign_alloc(vector& __c, true_type) _NOEXCEPT_(is_nothrow_move_assignable::value) { - __alloc() = _VSTD::move(__c.__alloc()); + __alloc() = std::move(__c.__alloc()); } _LIBCPP_INLINE_VISIBILITY @@ -2490,7 +2490,7 @@ const size_type __cap = capacity(); if (__cap >= __ms / 2) return __ms; - return _VSTD::max(2 * __cap, __align_it(__new_size)); + return std::max(2 * __cap, __align_it(__new_size)); } // Default constructs __n objects starting at __end_ @@ -2511,7 +2511,7 @@ else this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0); } - _VSTD::fill_n(__make_iter(__old_size), __n, __x); + std::fill_n(__make_iter(__old_size), __n, __x); } template @@ -2524,7 +2524,7 @@ vector::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last) { size_type __old_size = this->__size_; - this->__size_ += _VSTD::distance(__first, __last); + this->__size_ += std::distance(__first, __last); if (__old_size == 0 || ((__old_size - 1) / __bits_per_word) != ((this->__size_ - 1) / __bits_per_word)) { if (this->__size_ <= __bits_per_word) @@ -2532,7 +2532,7 @@ else this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0); } - _VSTD::copy(__first, __last, __make_iter(__old_size)); + std::copy(__first, __last, __make_iter(__old_size)); } template @@ -2675,7 +2675,7 @@ __size_(0), __cap_alloc_(0, __default_init_tag()) { - size_type __n = static_cast(_VSTD::distance(__first, __last)); + size_type __n = static_cast(std::distance(__first, __last)); if (__n > 0) { __vallocate(__n); @@ -2691,7 +2691,7 @@ __size_(0), __cap_alloc_(0, static_cast<__storage_allocator>(__a)) { - size_type __n = static_cast(_VSTD::distance(__first, __last)); + size_type __n = static_cast(std::distance(__first, __last)); if (__n > 0) { __vallocate(__n); @@ -2769,7 +2769,7 @@ vector& vector::operator=(const vector& __v) { - if (this != _VSTD::addressof(__v)) + if (this != std::addressof(__v)) { __copy_assign_alloc(__v); if (__v.__size_) @@ -2779,7 +2779,7 @@ __vdeallocate(); __vallocate(__v.__size_); } - _VSTD::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_); + std::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_); } __size_ = __v.__size_; } @@ -2797,7 +2797,7 @@ #endif : __begin_(__v.__begin_), __size_(__v.__size_), - __cap_alloc_(_VSTD::move(__v.__cap_alloc_)) { + __cap_alloc_(std::move(__v.__cap_alloc_)) { __v.__begin_ = nullptr; __v.__size_ = 0; __v.__cap() = 0; @@ -2878,7 +2878,7 @@ __v.__size_ = __n; swap(__v); } - _VSTD::fill_n(begin(), __n, __x); + std::fill_n(begin(), __n, __x); } __invalidate_all_iterators(); } @@ -2908,7 +2908,7 @@ vector::assign(_ForwardIterator __first, _ForwardIterator __last) { clear(); - difference_type __ns = _VSTD::distance(__first, __last); + difference_type __ns = std::distance(__first, __last); _LIBCPP_ASSERT(__ns >= 0, "invalid range specified"); const size_t __n = static_cast(__ns); if (__n) @@ -2995,7 +2995,7 @@ { const_iterator __old_end = end(); ++__size_; - _VSTD::copy_backward(__position, __old_end, end()); + std::copy_backward(__position, __old_end, end()); __r = __const_iterator_cast(__position); } else @@ -3003,8 +3003,8 @@ vector __v(get_allocator()); __v.reserve(__recommend(__size_ + 1)); __v.__size_ = __size_ + 1; - __r = _VSTD::copy(cbegin(), __position, __v.begin()); - _VSTD::copy_backward(__position, cend(), __v.end()); + __r = std::copy(cbegin(), __position, __v.begin()); + std::copy_backward(__position, cend(), __v.end()); swap(__v); } *__r = __x; @@ -3021,7 +3021,7 @@ { const_iterator __old_end = end(); __size_ += __n; - _VSTD::copy_backward(__position, __old_end, end()); + std::copy_backward(__position, __old_end, end()); __r = __const_iterator_cast(__position); } else @@ -3029,11 +3029,11 @@ vector __v(get_allocator()); __v.reserve(__recommend(__size_ + __n)); __v.__size_ = __size_ + __n; - __r = _VSTD::copy(cbegin(), __position, __v.begin()); - _VSTD::copy_backward(__position, cend(), __v.end()); + __r = std::copy(cbegin(), __position, __v.begin()); + std::copy_backward(__position, cend(), __v.end()); swap(__v); } - _VSTD::fill_n(__r, __n, __x); + std::fill_n(__r, __n, __x); return __r; } @@ -3077,7 +3077,7 @@ } #endif // _LIBCPP_NO_EXCEPTIONS } - __p = _VSTD::rotate(__p, __old_end, end()); + __p = std::rotate(__p, __old_end, end()); insert(__p, __v.begin(), __v.end()); return begin() + __off; } @@ -3091,7 +3091,7 @@ >::type vector::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last) { - const difference_type __n_signed = _VSTD::distance(__first, __last); + const difference_type __n_signed = std::distance(__first, __last); _LIBCPP_ASSERT(__n_signed >= 0, "invalid range specified"); const size_type __n = static_cast(__n_signed); iterator __r; @@ -3100,7 +3100,7 @@ { const_iterator __old_end = end(); __size_ += __n; - _VSTD::copy_backward(__position, __old_end, end()); + std::copy_backward(__position, __old_end, end()); __r = __const_iterator_cast(__position); } else @@ -3108,11 +3108,11 @@ vector __v(get_allocator()); __v.reserve(__recommend(__size_ + __n)); __v.__size_ = __size_ + __n; - __r = _VSTD::copy(cbegin(), __position, __v.begin()); - _VSTD::copy_backward(__position, cend(), __v.end()); + __r = std::copy(cbegin(), __position, __v.begin()); + std::copy_backward(__position, cend(), __v.end()); swap(__v); } - _VSTD::copy(__first, __last, __r); + std::copy(__first, __last, __r); return __r; } @@ -3122,7 +3122,7 @@ vector::erase(const_iterator __position) { iterator __r = __const_iterator_cast(__position); - _VSTD::copy(__position + 1, this->cend(), __r); + std::copy(__position + 1, this->cend(), __r); --__size_; return __r; } @@ -3133,7 +3133,7 @@ { iterator __r = __const_iterator_cast(__first); difference_type __d = __last - __first; - _VSTD::copy(__last, this->cend(), __r); + std::copy(__last, this->cend(), __r); __size_ -= __d; return __r; } @@ -3148,10 +3148,10 @@ __is_nothrow_swappable::value) #endif { - _VSTD::swap(this->__begin_, __x.__begin_); - _VSTD::swap(this->__size_, __x.__size_); - _VSTD::swap(this->__cap(), __x.__cap()); - _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(), + std::swap(this->__begin_, __x.__begin_); + std::swap(this->__size_, __x.__size_); + std::swap(this->__cap(), __x.__cap()); + std::__swap_allocator(this->__alloc(), __x.__alloc(), integral_constant()); } @@ -3175,10 +3175,10 @@ vector __v(get_allocator()); __v.reserve(__recommend(__size_ + __n)); __v.__size_ = __size_ + __n; - __r = _VSTD::copy(cbegin(), cend(), __v.begin()); + __r = std::copy(cbegin(), cend(), __v.begin()); swap(__v); } - _VSTD::fill_n(__r, __n, __x); + std::fill_n(__r, __n, __x); } else __size_ = __sz; @@ -3256,7 +3256,7 @@ operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) { const typename vector<_Tp, _Allocator>::size_type __sz = __x.size(); - return __sz == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin()); + return __sz == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template @@ -3272,7 +3272,7 @@ bool operator< (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y) { - return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); + return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template @@ -3313,7 +3313,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type erase(vector<_Tp, _Allocator>& __c, const _Up& __v) { auto __old_size = __c.size(); - __c.erase(_VSTD::remove(__c.begin(), __c.end(), __v), __c.end()); + __c.erase(std::remove(__c.begin(), __c.end(), __v), __c.end()); return __old_size - __c.size(); } @@ -3321,7 +3321,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type erase_if(vector<_Tp, _Allocator>& __c, _Predicate __pred) { auto __old_size = __c.size(); - __c.erase(_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end()); + __c.erase(std::remove_if(__c.begin(), __c.end(), __pred), __c.end()); return __old_size - __c.size(); } #endif diff --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp --- a/libcxx/src/chrono.cpp +++ b/libcxx/src/chrono.cpp @@ -94,8 +94,8 @@ static system_clock::time_point __libcpp_system_clock_now() { // FILETIME is in 100ns units using filetime_duration = - _VSTD::chrono::duration<__int64, - _VSTD::ratio_multiply<_VSTD::ratio<100, 1>, + std::chrono::duration<__int64, + std::ratio_multiply, nanoseconds::period>>; // The Windows epoch is Jan 1 1601, the Unix epoch Jan 1 1970. diff --git a/libcxx/src/experimental/memory_resource.cpp b/libcxx/src/experimental/memory_resource.cpp --- a/libcxx/src/experimental/memory_resource.cpp +++ b/libcxx/src/experimental/memory_resource.cpp @@ -33,11 +33,11 @@ if (__is_overaligned_for_new(align)) __throw_bad_alloc(); #endif - return _VSTD::__libcpp_allocate(size, align); + return std::__libcpp_allocate(size, align); } void do_deallocate(void *p, size_t n, size_t align) override { - _VSTD::__libcpp_deallocate(p, n, align); + std::__libcpp_deallocate(p, n, align); } bool do_is_equal(memory_resource const & other) const noexcept override @@ -101,11 +101,11 @@ if (set) { new_res = new_res ? new_res : new_delete_resource(); // TODO: Can a weaker ordering be used? - return _VSTD::atomic_exchange_explicit( + return std::atomic_exchange_explicit( &__res, new_res, memory_order_acq_rel); } else { - return _VSTD::atomic_load_explicit( + return std::atomic_load_explicit( &__res, memory_order_acquire); } #elif !defined(_LIBCPP_HAS_NO_THREADS) diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -505,7 +505,7 @@ file_status get_status() const { return m_status; } StatT const& get_stat() const { return m_stat; } - bool status_known() const { return _VSTD_FS::status_known(m_status); } + bool status_known() const { return std_FS::status_known(m_status); } file_status refresh_status(error_code& ec); @@ -1947,7 +1947,7 @@ return failure_ec; } - if (!_VSTD_FS::exists(st) || !_VSTD_FS::is_symlink(st)) { + if (!std_FS::exists(st) || !std_FS::is_symlink(st)) { __data_.__cache_type_ = directory_entry::_RefreshNonSymlink; __data_.__type_ = st.type(); __data_.__non_sym_perms_ = st.permissions(); @@ -1973,10 +1973,10 @@ __data_.__cache_type_ = directory_entry::_RefreshSymlink; } - if (_VSTD_FS::is_regular_file(st)) + if (std_FS::is_regular_file(st)) __data_.__size_ = static_cast(full_st.st_size); - if (_VSTD_FS::exists(st)) { + if (std_FS::exists(st)) { __data_.__nlink_ = static_cast(full_st.st_nlink); // Attempt to extract the mtime, and fail if it's not representable using diff --git a/libcxx/src/include/ryu/common.h b/libcxx/src/include/ryu/common.h --- a/libcxx/src/include/ryu/common.h +++ b/libcxx/src/include/ryu/common.h @@ -90,13 +90,13 @@ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __float_to_bits(const float __f) { uint32_t __bits = 0; - _VSTD::memcpy(&__bits, &__f, sizeof(float)); + std::memcpy(&__bits, &__f, sizeof(float)); return __bits; } [[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __double_to_bits(const double __d) { uint64_t __bits = 0; - _VSTD::memcpy(&__bits, &__d, sizeof(double)); + std::memcpy(&__bits, &__d, sizeof(double)); return __bits; } diff --git a/libcxx/src/include/to_chars_floating_point.h b/libcxx/src/include/to_chars_floating_point.h --- a/libcxx/src/include/to_chars_floating_point.h +++ b/libcxx/src/include/to_chars_floating_point.h @@ -34,7 +34,7 @@ namespace __itoa { inline constexpr char _Charconv_digits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; -static_assert(_VSTD::size(_Charconv_digits) == 36); +static_assert(std::size(_Charconv_digits) == 36); } // __itoa // vvvvvvvvvv DERIVED FROM corecrt_internal_fltintrn.h vvvvvvvvvv @@ -116,7 +116,7 @@ using _Traits = _Floating_type_traits<_Floating>; using _Uint_type = typename _Traits::_Uint_type; - const _Uint_type _Uint_value = _VSTD::bit_cast<_Uint_type>(_Value); + const _Uint_type _Uint_value = std::bit_cast<_Uint_type>(_Value); const _Uint_type _Ieee_mantissa = _Uint_value & _Traits::_Denormal_mantissa_mask; const int32_t _Ieee_exponent = static_cast(_Uint_value >> _Traits::_Exponent_shift); @@ -304,7 +304,7 @@ if (_Number_of_bits_remaining == 0) { // We've finished printing _Adjusted_mantissa, so all remaining hexits are '0'. - _VSTD::memset(_First, '0', static_cast(_Precision)); + std::memset(_First, '0', static_cast(_Precision)); _First += _Precision; break; } @@ -327,7 +327,7 @@ *_First++ = _Sign_character; // We've already printed '-' if necessary, so uint32_t _Absolute_exponent avoids testing that again. - return _VSTD::to_chars(_First, _Last, _Absolute_exponent); + return std::to_chars(_First, _Last, _Absolute_exponent); } template @@ -344,7 +344,7 @@ using _Traits = _Floating_type_traits<_Floating>; using _Uint_type = typename _Traits::_Uint_type; - const _Uint_type _Uint_value = _VSTD::bit_cast<_Uint_type>(_Value); + const _Uint_type _Uint_value = std::bit_cast<_Uint_type>(_Value); if (_Uint_value == 0) { // zero detected; write "0p+0" and return // C11 7.21.6.1 "The fprintf function"/8: "If the value is zero, the exponent is zero." @@ -356,7 +356,7 @@ return {_Last, errc::value_too_large}; } - _VSTD::memcpy(_First, _Str, _Len); + std::memcpy(_First, _Str, _Len); return {_First + _Len, errc{}}; } @@ -454,7 +454,7 @@ } // We've already printed '-' if necessary, so static_cast avoids testing that again. - return _VSTD::to_chars(_First, _Last, static_cast(_Unbiased_exponent)); + return std::to_chars(_First, _Last, static_cast(_Unbiased_exponent)); } // For general precision, we can use lookup tables to avoid performing trial formatting. @@ -836,7 +836,7 @@ using _Traits = _Floating_type_traits<_Floating>; using _Uint_type = typename _Traits::_Uint_type; - const _Uint_type _Uint_value = _VSTD::bit_cast<_Uint_type>(_Value); + const _Uint_type _Uint_value = std::bit_cast<_Uint_type>(_Value); if (_Uint_value == 0) { // zero detected; write "0" and return; _Precision is irrelevant due to zero-trimming if (_First == _Last) { @@ -887,7 +887,7 @@ _Table_end = _Table_begin + _Precision + 5; } else { _Table_begin = _Tables::_Ordinary_X_table; - _Table_end = _Table_begin + _VSTD::min(_Precision, _Tables::_Max_P) + 5; + _Table_end = _Table_begin + std::min(_Precision, _Tables::_Max_P) + 5; } // Profiling indicates that linear search is faster than binary search for small tables. @@ -895,11 +895,11 @@ const _Uint_type* const _Table_lower_bound = [=] { if constexpr (!_IsSame<_Floating, float>::value) { if (_Precision > 155) { // threshold determined via profiling - return _VSTD::lower_bound(_Table_begin, _Table_end, _Uint_value, less{}); + return std::lower_bound(_Table_begin, _Table_end, _Uint_value, less{}); } } - return _VSTD::find_if(_Table_begin, _Table_end, [=](const _Uint_type _Elem) { return _Uint_value <= _Elem; }); + return std::find_if(_Table_begin, _Table_end, [=](const _Uint_type _Elem) { return _Uint_value <= _Elem; }); }(); const ptrdiff_t _Table_index = _Table_lower_bound - _Table_begin; @@ -934,17 +934,17 @@ // Write into the local buffer. // Clamping _Effective_precision allows _Buffer to be as small as possible, and increases efficiency. if (_Use_fixed_notation) { - _Effective_precision = _VSTD::min(_Precision - (_Scientific_exponent_X + 1), _Max_fixed_precision); + _Effective_precision = std::min(_Precision - (_Scientific_exponent_X + 1), _Max_fixed_precision); const to_chars_result _Buf_result = - _Floating_to_chars_fixed_precision(_Buffer, _VSTD::end(_Buffer), _Value, _Effective_precision); + _Floating_to_chars_fixed_precision(_Buffer, std::end(_Buffer), _Value, _Effective_precision); _LIBCPP_ASSERT(_Buf_result.ec == errc{}, ""); _Significand_last = _Buf_result.ptr; } else { - _Effective_precision = _VSTD::min(_Precision - 1, _Max_scientific_precision); + _Effective_precision = std::min(_Precision - 1, _Max_scientific_precision); const to_chars_result _Buf_result = - _Floating_to_chars_scientific_precision(_Buffer, _VSTD::end(_Buffer), _Value, _Effective_precision); + _Floating_to_chars_scientific_precision(_Buffer, std::end(_Buffer), _Value, _Effective_precision); _LIBCPP_ASSERT(_Buf_result.ec == errc{}, ""); - _Significand_last = _VSTD::find(_Buffer, _Buf_result.ptr, 'e'); + _Significand_last = std::find(_Buffer, _Buf_result.ptr, 'e'); _Exponent_first = _Significand_last; _Exponent_last = _Buf_result.ptr; } @@ -965,7 +965,7 @@ if (_Last - _First < _Significand_distance) { return {_Last, errc::value_too_large}; } - _VSTD::memcpy(_First, _Significand_first, static_cast(_Significand_distance)); + std::memcpy(_First, _Significand_first, static_cast(_Significand_distance)); _First += _Significand_distance; // Copy the exponent to the output range. @@ -974,7 +974,7 @@ if (_Last - _First < _Exponent_distance) { return {_Last, errc::value_too_large}; } - _VSTD::memcpy(_First, _Exponent_first, static_cast(_Exponent_distance)); + std::memcpy(_First, _Exponent_first, static_cast(_Exponent_distance)); _First += _Exponent_distance; } @@ -999,7 +999,7 @@ using _Traits = _Floating_type_traits<_Floating>; using _Uint_type = typename _Traits::_Uint_type; - _Uint_type _Uint_value = _VSTD::bit_cast<_Uint_type>(_Value); + _Uint_type _Uint_value = std::bit_cast<_Uint_type>(_Value); const bool _Was_negative = (_Uint_value & _Traits::_Shifted_sign_mask) != 0; @@ -1011,7 +1011,7 @@ *_First++ = '-'; _Uint_value &= ~_Traits::_Shifted_sign_mask; - _Value = _VSTD::bit_cast<_Floating>(_Uint_value); + _Value = std::bit_cast<_Floating>(_Uint_value); } if ((_Uint_value & _Traits::_Shifted_exponent_mask) == _Traits::_Shifted_exponent_mask) { @@ -1041,7 +1041,7 @@ return {_Last, errc::value_too_large}; } - _VSTD::memcpy(_First, _Str, _Len); + std::memcpy(_First, _Str, _Len); return {_First + _Len, errc{}}; } diff --git a/libcxx/src/ios.cpp b/libcxx/src/ios.cpp --- a/libcxx/src/ios.cpp +++ b/libcxx/src/ios.cpp @@ -147,7 +147,7 @@ { // Precondition: __req_size > __current_cap const size_t mx = std::numeric_limits::max() / sizeof(_Tp); if (__req_size < mx/2) - return _VSTD::max(2 * __current_cap, __req_size); + return std::max(2 * __current_cap, __req_size); else return mx; } @@ -389,24 +389,24 @@ void ios_base::swap(ios_base& rhs) noexcept { - _VSTD::swap(__fmtflags_, rhs.__fmtflags_); - _VSTD::swap(__precision_, rhs.__precision_); - _VSTD::swap(__width_, rhs.__width_); - _VSTD::swap(__rdstate_, rhs.__rdstate_); - _VSTD::swap(__exceptions_, rhs.__exceptions_); + std::swap(__fmtflags_, rhs.__fmtflags_); + std::swap(__precision_, rhs.__precision_); + std::swap(__width_, rhs.__width_); + std::swap(__rdstate_, rhs.__rdstate_); + std::swap(__exceptions_, rhs.__exceptions_); locale& lhs_loc = *reinterpret_cast(&__loc_); locale& rhs_loc = *reinterpret_cast(&rhs.__loc_); - _VSTD::swap(lhs_loc, rhs_loc); - _VSTD::swap(__fn_, rhs.__fn_); - _VSTD::swap(__index_, rhs.__index_); - _VSTD::swap(__event_size_, rhs.__event_size_); - _VSTD::swap(__event_cap_, rhs.__event_cap_); - _VSTD::swap(__iarray_, rhs.__iarray_); - _VSTD::swap(__iarray_size_, rhs.__iarray_size_); - _VSTD::swap(__iarray_cap_, rhs.__iarray_cap_); - _VSTD::swap(__parray_, rhs.__parray_); - _VSTD::swap(__parray_size_, rhs.__parray_size_); - _VSTD::swap(__parray_cap_, rhs.__parray_cap_); + std::swap(lhs_loc, rhs_loc); + std::swap(__fn_, rhs.__fn_); + std::swap(__index_, rhs.__index_); + std::swap(__event_size_, rhs.__event_size_); + std::swap(__event_cap_, rhs.__event_cap_); + std::swap(__iarray_, rhs.__iarray_); + std::swap(__iarray_size_, rhs.__iarray_size_); + std::swap(__iarray_cap_, rhs.__iarray_cap_); + std::swap(__parray_, rhs.__parray_); + std::swap(__parray_size_, rhs.__parray_size_); + std::swap(__parray_cap_, rhs.__parray_cap_); } void diff --git a/libcxx/src/iostream.cpp b/libcxx/src/iostream.cpp --- a/libcxx/src/iostream.cpp +++ b/libcxx/src/iostream.cpp @@ -122,7 +122,7 @@ ostream* cerr_ptr = ::new(cerr) ostream(::new(__cerr) __stdoutbuf(stderr, &mb_cerr)); ::new(clog) ostream(cerr_ptr->rdbuf()); cin_ptr->tie(cout_ptr); - _VSTD::unitbuf(*cerr_ptr); + std::unitbuf(*cerr_ptr); cerr_ptr->tie(cout_ptr); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS @@ -132,7 +132,7 @@ ::new(wclog) wostream(wcerr_ptr->rdbuf()); wcin_ptr->tie(wcout_ptr); - _VSTD::unitbuf(*wcerr_ptr); + std::unitbuf(*wcerr_ptr); wcerr_ptr->tie(wcout_ptr); #endif } diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -121,7 +121,7 @@ throw runtime_error(msg); #else (void)msg; - _VSTD::abort(); + std::abort(); #endif } @@ -182,13 +182,13 @@ name_("C") { facets_.clear(); - install(&make<_VSTD::collate >(1u)); + install(&make >(1u)); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - install(&make<_VSTD::collate >(1u)); + install(&make >(1u)); #endif - install(&make<_VSTD::ctype >(nullptr, false, 1u)); + install(&make >(nullptr, false, 1u)); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - install(&make<_VSTD::ctype >(1u)); + install(&make >(1u)); #endif install(&make >(1u)); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS @@ -236,9 +236,9 @@ #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS install(&make >(1u)); #endif - install(&make<_VSTD::messages >(1u)); + install(&make >(1u)); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - install(&make<_VSTD::messages >(1u)); + install(&make >(1u)); #endif } @@ -426,28 +426,28 @@ #endif // _LIBCPP_NO_EXCEPTIONS if (c & locale::collate) { - install_from<_VSTD::collate >(one); + install_from >(one); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - install_from<_VSTD::collate >(one); + install_from >(one); #endif } if (c & locale::ctype) { - install_from<_VSTD::ctype >(one); + install_from >(one); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - install_from<_VSTD::ctype >(one); + install_from >(one); #endif - install_from<_VSTD::codecvt >(one); + install_from >(one); _LIBCPP_SUPPRESS_DEPRECATED_PUSH - install_from<_VSTD::codecvt >(one); - install_from<_VSTD::codecvt >(one); + install_from >(one); + install_from >(one); _LIBCPP_SUPPRESS_DEPRECATED_POP #ifndef _LIBCPP_HAS_NO_CHAR8_T - install_from<_VSTD::codecvt >(one); - install_from<_VSTD::codecvt >(one); + install_from >(one); + install_from >(one); #endif #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - install_from<_VSTD::codecvt >(one); + install_from >(one); #endif } if (c & locale::monetary) @@ -495,9 +495,9 @@ } if (c & locale::messages) { - install_from<_VSTD::messages >(one); + install_from >(one); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS - install_from<_VSTD::messages >(one); + install_from >(one); #endif } #ifndef _LIBCPP_NO_EXCEPTIONS @@ -6530,7 +6530,7 @@ throw runtime_error(msg); #else (void)msg; - _VSTD::abort(); + std::abort(); #endif } diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp --- a/libcxx/src/new.cpp +++ b/libcxx/src/new.cpp @@ -41,7 +41,7 @@ #ifndef _LIBCPP_NO_EXCEPTIONS throw bad_alloc(); #else - _VSTD::abort(); + std::abort(); #endif } diff --git a/libcxx/src/regex.cpp b/libcxx/src/regex.cpp --- a/libcxx/src/regex.cpp +++ b/libcxx/src/regex.cpp @@ -350,7 +350,7 @@ __get_collation_name(const char* s) { const collationnames* i = - _VSTD::lower_bound(begin(collatenames), end(collatenames), s, use_strcmp()); + std::lower_bound(begin(collatenames), end(collatenames), s, use_strcmp()); string r; if (i != end(collatenames) && strcmp(s, i->elem_) == 0) r = char(i->char_); @@ -361,7 +361,7 @@ __get_classname(const char* s, bool __icase) { const classnames* i = - _VSTD::lower_bound(begin(ClassNames), end(ClassNames), s, use_strcmp()); + std::lower_bound(begin(ClassNames), end(ClassNames), s, use_strcmp()); regex_traits::char_class_type r = 0; if (i != end(ClassNames) && strcmp(s, i->elem_) == 0) { diff --git a/libcxx/src/ryu/d2fixed.cpp b/libcxx/src/ryu/d2fixed.cpp --- a/libcxx/src/ryu/d2fixed.cpp +++ b/libcxx/src/ryu/d2fixed.cpp @@ -134,19 +134,19 @@ __digits /= 10000; const uint32_t __c0 = (__c % 100) << 1; const uint32_t __c1 = (__c / 100) << 1; - _VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(__result + __olength - __i - 4, __DIGIT_TABLE + __c1, 2); + std::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c0, 2); + std::memcpy(__result + __olength - __i - 4, __DIGIT_TABLE + __c1, 2); __i += 4; } if (__digits >= 100) { const uint32_t __c = (__digits % 100) << 1; __digits /= 100; - _VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c, 2); + std::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c, 2); __i += 2; } if (__digits >= 10) { const uint32_t __c = __digits << 1; - _VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c, 2); + std::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c, 2); } else { __result[0] = static_cast('0' + __digits); } @@ -163,14 +163,14 @@ __digits /= 10000; const uint32_t __c0 = (__c % 100) << 1; const uint32_t __c1 = (__c / 100) << 1; - _VSTD::memcpy(__result + __olength + 1 - __i - 2, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(__result + __olength + 1 - __i - 4, __DIGIT_TABLE + __c1, 2); + std::memcpy(__result + __olength + 1 - __i - 2, __DIGIT_TABLE + __c0, 2); + std::memcpy(__result + __olength + 1 - __i - 4, __DIGIT_TABLE + __c1, 2); __i += 4; } if (__digits >= 100) { const uint32_t __c = (__digits % 100) << 1; __digits /= 100; - _VSTD::memcpy(__result + __olength + 1 - __i - 2, __DIGIT_TABLE + __c, 2); + std::memcpy(__result + __olength + 1 - __i - 2, __DIGIT_TABLE + __c, 2); __i += 2; } if (__digits >= 10) { @@ -189,7 +189,7 @@ for (; __i < __count - 1; __i += 2) { const uint32_t __c = (__digits % 100) << 1; __digits /= 100; - _VSTD::memcpy(__result + __count - __i - 2, __DIGIT_TABLE + __c, 2); + std::memcpy(__result + __count - __i - 2, __DIGIT_TABLE + __c, 2); } if (__i < __count) { const char __c = static_cast('0' + (__digits % 10)); @@ -199,7 +199,7 @@ void __append_nine_digits(uint32_t __digits, char* const __result) { if (__digits == 0) { - _VSTD::memset(__result, '0', 9); + std::memset(__result, '0', 9); return; } @@ -212,8 +212,8 @@ __digits /= 10000; const uint32_t __c0 = (__c % 100) << 1; const uint32_t __c1 = (__c / 100) << 1; - _VSTD::memcpy(__result + 7 - __i, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(__result + 5 - __i, __DIGIT_TABLE + __c1, 2); + std::memcpy(__result + 7 - __i, __DIGIT_TABLE + __c0, 2); + std::memcpy(__result + 5 - __i, __DIGIT_TABLE + __c1, 2); } __result[0] = static_cast('0' + __digits); } @@ -250,7 +250,7 @@ *_First++ = '0'; if (__precision > 0) { *_First++ = '.'; - _VSTD::memset(_First, '0', __precision); + std::memset(_First, '0', __precision); _First += __precision; } return { _First, errc{} }; @@ -321,14 +321,14 @@ if (_Last - _First < static_cast(__precision)) { return { _Last, errc::value_too_large }; } - _VSTD::memset(_First, '0', __precision); + std::memset(_First, '0', __precision); _First += __precision; } else if (__i < __MIN_BLOCK_2[__idx]) { __i = __MIN_BLOCK_2[__idx]; if (_Last - _First < static_cast(9 * __i)) { return { _Last, errc::value_too_large }; } - _VSTD::memset(_First, '0', 9 * __i); + std::memset(_First, '0', 9 * __i); _First += 9 * __i; } for (; __i < __blocks; ++__i) { @@ -341,7 +341,7 @@ if (_Last - _First < static_cast(__fill)) { return { _Last, errc::value_too_large }; } - _VSTD::memset(_First, '0', __fill); + std::memset(_First, '0', __fill); _First += __fill; break; } @@ -415,7 +415,7 @@ if (_Last - _First < static_cast(__precision)) { return { _Last, errc::value_too_large }; } - _VSTD::memset(_First, '0', __precision); + std::memset(_First, '0', __precision); _First += __precision; } return { _First, errc{} }; @@ -439,10 +439,10 @@ *_First++ = '0'; if (__precision > 0) { *_First++ = '.'; - _VSTD::memset(_First, '0', __precision); + std::memset(_First, '0', __precision); _First += __precision; } - _VSTD::memcpy(_First, "e+00", 4); + std::memcpy(_First, "e+00", 4); _First += 4; return { _First, errc{} }; } @@ -588,7 +588,7 @@ return { _Last, errc::value_too_large }; } if (__digits == 0) { - _VSTD::memset(_First, '0', __maximum); + std::memset(_First, '0', __maximum); } else { __append_c_digits(__maximum, __digits, _First); } @@ -653,11 +653,11 @@ if (__exp >= 100) { const int32_t __c = __exp % 10; - _VSTD::memcpy(_First, __DIGIT_TABLE + 2 * (__exp / 10), 2); + std::memcpy(_First, __DIGIT_TABLE + 2 * (__exp / 10), 2); _First[2] = static_cast('0' + __c); _First += 3; } else { - _VSTD::memcpy(_First, __DIGIT_TABLE + 2 * __exp, 2); + std::memcpy(_First, __DIGIT_TABLE + 2 * __exp, 2); _First += 2; } diff --git a/libcxx/src/ryu/d2s.cpp b/libcxx/src/ryu/d2s.cpp --- a/libcxx/src/ryu/d2s.cpp +++ b/libcxx/src/ryu/d2s.cpp @@ -526,10 +526,10 @@ const uint32_t __d0 = (__d % 100) << 1; const uint32_t __d1 = (__d / 100) << 1; - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2); - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __d0, 2); - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __d1, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __d0, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __d1, 2); } uint32_t __output2 = static_cast(_Output); while (__output2 >= 10000) { @@ -541,35 +541,35 @@ __output2 /= 10000; const uint32_t __c0 = (__c % 100) << 1; const uint32_t __c1 = (__c / 100) << 1; - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2); } if (__output2 >= 100) { const uint32_t __c = (__output2 % 100) << 1; __output2 /= 100; - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2); } if (__output2 >= 10) { const uint32_t __c = __output2 << 1; - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2); } else { *--_Mid = static_cast('0' + __output2); } if (_Ryu_exponent > 0) { // case "172900" with _Can_use_ryu // Performance note: it might be more efficient to do this immediately after setting _Mid. - _VSTD::memset(_First + __olength, '0', static_cast(_Ryu_exponent)); + std::memset(_First + __olength, '0', static_cast(_Ryu_exponent)); } else if (_Ryu_exponent == 0) { // case "1729" // Done! } else if (_Whole_digits > 0) { // case "17.29" // Performance note: moving digits might not be optimal. - _VSTD::memmove(_First, _First + 1, static_cast(_Whole_digits)); + std::memmove(_First, _First + 1, static_cast(_Whole_digits)); _First[_Whole_digits] = '.'; } else { // case "0.001729" // Performance note: a larger memset() followed by overwriting '.' might be more efficient. _First[0] = '0'; _First[1] = '.'; - _VSTD::memset(_First + 2, '0', static_cast(-_Whole_digits)); + std::memset(_First + 2, '0', static_cast(-_Whole_digits)); } return { _First + _Total_fixed_length, errc{} }; @@ -601,10 +601,10 @@ const uint32_t __c1 = (__c / 100) << 1; const uint32_t __d0 = (__d % 100) << 1; const uint32_t __d1 = (__d / 100) << 1; - _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2); - _VSTD::memcpy(__result + __olength - __i - 5, __DIGIT_TABLE + __d0, 2); - _VSTD::memcpy(__result + __olength - __i - 7, __DIGIT_TABLE + __d1, 2); + std::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2); + std::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2); + std::memcpy(__result + __olength - __i - 5, __DIGIT_TABLE + __d0, 2); + std::memcpy(__result + __olength - __i - 7, __DIGIT_TABLE + __d1, 2); __i += 8; } uint32_t __output2 = static_cast(_Output); @@ -617,14 +617,14 @@ __output2 /= 10000; const uint32_t __c0 = (__c % 100) << 1; const uint32_t __c1 = (__c / 100) << 1; - _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2); + std::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2); + std::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2); __i += 4; } if (__output2 >= 100) { const uint32_t __c = (__output2 % 100) << 1; __output2 /= 100; - _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c, 2); + std::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c, 2); __i += 2; } if (__output2 >= 10) { @@ -656,11 +656,11 @@ if (_Scientific_exponent >= 100) { const int32_t __c = _Scientific_exponent % 10; - _VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * (_Scientific_exponent / 10), 2); + std::memcpy(__result + __index, __DIGIT_TABLE + 2 * (_Scientific_exponent / 10), 2); __result[__index + 2] = static_cast('0' + __c); __index += 3; } else { - _VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * _Scientific_exponent, 2); + std::memcpy(__result + __index, __DIGIT_TABLE + 2 * _Scientific_exponent, 2); __index += 2; } @@ -712,7 +712,7 @@ return { _Last, errc::value_too_large }; } - _VSTD::memcpy(_First, "0e+00", 5); + std::memcpy(_First, "0e+00", 5); return { _First + 5, errc{} }; } diff --git a/libcxx/src/ryu/f2s.cpp b/libcxx/src/ryu/f2s.cpp --- a/libcxx/src/ryu/f2s.cpp +++ b/libcxx/src/ryu/f2s.cpp @@ -564,35 +564,35 @@ _Output /= 10000; const uint32_t __c0 = (__c % 100) << 1; const uint32_t __c1 = (__c / 100) << 1; - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2); } if (_Output >= 100) { const uint32_t __c = (_Output % 100) << 1; _Output /= 100; - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2); } if (_Output >= 10) { const uint32_t __c = _Output << 1; - _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2); + std::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2); } else { *--_Mid = static_cast('0' + _Output); } if (_Ryu_exponent > 0) { // case "172900" with _Can_use_ryu // Performance note: it might be more efficient to do this immediately after setting _Mid. - _VSTD::memset(_First + __olength, '0', static_cast(_Ryu_exponent)); + std::memset(_First + __olength, '0', static_cast(_Ryu_exponent)); } else if (_Ryu_exponent == 0) { // case "1729" // Done! } else if (_Whole_digits > 0) { // case "17.29" // Performance note: moving digits might not be optimal. - _VSTD::memmove(_First, _First + 1, static_cast(_Whole_digits)); + std::memmove(_First, _First + 1, static_cast(_Whole_digits)); _First[_Whole_digits] = '.'; } else { // case "0.001729" // Performance note: a larger memset() followed by overwriting '.' might be more efficient. _First[0] = '0'; _First[1] = '.'; - _VSTD::memset(_First + 2, '0', static_cast(-_Whole_digits)); + std::memset(_First + 2, '0', static_cast(-_Whole_digits)); } return { _First + _Total_fixed_length, errc{} }; @@ -616,14 +616,14 @@ _Output /= 10000; const uint32_t __c0 = (__c % 100) << 1; const uint32_t __c1 = (__c / 100) << 1; - _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2); - _VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2); + std::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2); + std::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2); __i += 4; } if (_Output >= 100) { const uint32_t __c = (_Output % 100) << 1; _Output /= 100; - _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c, 2); + std::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c, 2); __i += 2; } if (_Output >= 10) { @@ -653,7 +653,7 @@ __result[__index++] = '+'; } - _VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * _Scientific_exponent, 2); + std::memcpy(__result + __index, __DIGIT_TABLE + 2 * _Scientific_exponent, 2); __index += 2; return { _First + _Total_scientific_length, errc{} }; @@ -672,7 +672,7 @@ return { _Last, errc::value_too_large }; } - _VSTD::memcpy(_First, "0e+00", 5); + std::memcpy(_First, "0e+00", 5); return { _First + 5, errc{} }; } diff --git a/libcxx/src/string.cpp b/libcxx/src/string.cpp --- a/libcxx/src/string.cpp +++ b/libcxx/src/string.cpp @@ -22,11 +22,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD void __basic_string_common::__throw_length_error() const { - _VSTD::__throw_length_error("basic_string"); + std::__throw_length_error("basic_string"); } void __basic_string_common::__throw_out_of_range() const { - _VSTD::__throw_out_of_range("basic_string"); + std::__throw_out_of_range("basic_string"); } #define _LIBCPP_EXTERN_TEMPLATE_DEFINE(...) template __VA_ARGS__; @@ -56,7 +56,7 @@ throw T( msg ); #else fprintf(stderr, "%s\n", msg.c_str()); - _VSTD::abort(); + std::abort(); #endif } diff --git a/libcxx/src/strstream.cpp b/libcxx/src/strstream.cpp --- a/libcxx/src/strstream.cpp +++ b/libcxx/src/strstream.cpp @@ -117,10 +117,10 @@ strstreambuf::swap(strstreambuf& __rhs) { streambuf::swap(__rhs); - _VSTD::swap(__strmode_, __rhs.__strmode_); - _VSTD::swap(__alsize_, __rhs.__alsize_); - _VSTD::swap(__palloc_, __rhs.__palloc_); - _VSTD::swap(__pfree_, __rhs.__pfree_); + std::swap(__strmode_, __rhs.__strmode_); + std::swap(__alsize_, __rhs.__alsize_); + std::swap(__palloc_, __rhs.__palloc_); + std::swap(__pfree_, __rhs.__pfree_); } void @@ -275,7 +275,7 @@ { char* newpos = eback() + newoff; if (pos_in) - setg(eback(), newpos, _VSTD::max(newpos, egptr())); + setg(eback(), newpos, std::max(newpos, egptr())); if (pos_out) { // min(pbase, newpos), newpos, epptr() @@ -305,7 +305,7 @@ { char* newpos = eback() + newoff; if (pos_in) - setg(eback(), newpos, _VSTD::max(newpos, egptr())); + setg(eback(), newpos, std::max(newpos, egptr())); if (pos_out) { // min(pbase, newpos), newpos, epptr() diff --git a/libcxx/src/support/win32/thread_win32.cpp b/libcxx/src/support/win32/thread_win32.cpp --- a/libcxx/src/support/win32/thread_win32.cpp +++ b/libcxx/src/support/win32/thread_win32.cpp @@ -113,7 +113,7 @@ int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m, __libcpp_timespec_t *__ts) { - using namespace _VSTD::chrono; + using namespace std::chrono; auto duration = seconds(__ts->tv_sec) + nanoseconds(__ts->tv_nsec); auto abstime = diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp --- a/libcxx/src/system_error.cpp +++ b/libcxx/src/system_error.cpp @@ -288,7 +288,7 @@ #else (void)ev; (void)what_arg; - _VSTD::abort(); + std::abort(); #endif } diff --git a/libcxx/src/vector.cpp b/libcxx/src/vector.cpp --- a/libcxx/src/vector.cpp +++ b/libcxx/src/vector.cpp @@ -11,11 +11,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD void __vector_base_common::__throw_length_error() const { - _VSTD::__throw_length_error("vector"); + std::__throw_length_error("vector"); } void __vector_base_common::__throw_out_of_range() const { - _VSTD::__throw_out_of_range("vector"); + std::__throw_out_of_range("vector"); } _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp --- a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -396,7 +396,7 @@ using T = NoExceptCallable; T value(true); auto ret = std::not_fn(value); - LIBCPP_STATIC_ASSERT(noexcept(!_VSTD::__invoke(value)), ""); + LIBCPP_STATIC_ASSERT(noexcept(!std::__invoke(value)), ""); #if TEST_STD_VER > 14 static_assert(noexcept(!std::invoke(value)), ""); #endif