diff --git a/libcxx/include/__ranges/all.h b/libcxx/include/__ranges/all.h index 238ebdeaa47e5..54916fd476fe4 100644 --- a/libcxx/include/__ranges/all.h +++ b/libcxx/include/__ranges/all.h @@ -38,30 +38,30 @@ namespace __all { 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)}; } }; } // namespace __all diff --git a/libcxx/include/__ranges/common_view.h b/libcxx/include/__ranges/common_view.h index b8a32eb31f434..3f58dafeb0eff 100644 --- a/libcxx/include/__ranges/common_view.h +++ b/libcxx/include/__ranges/common_view.h @@ -44,13 +44,13 @@ class common_view : public view_interface> { 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 @@ namespace __common { 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)}; } }; } // namespace __common diff --git a/libcxx/include/__ranges/copyable_box.h b/libcxx/include/__ranges/copyable_box.h index d092b7f9ba295..8b7f227925cb5 100644 --- a/libcxx/include/__ranges/copyable_box.h +++ b/libcxx/include/__ranges/copyable_box.h @@ -49,7 +49,7 @@ namespace ranges { _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 @@ namespace ranges { 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 @@ namespace ranges { 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 @@ namespace ranges { _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 @@ namespace ranges { _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 @@ namespace ranges { _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 @@ namespace ranges { _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 index a2d839fc4d901..400284c48e68e 100644 --- a/libcxx/include/__ranges/counted.h +++ b/libcxx/include/__ranges/counted.h @@ -39,9 +39,9 @@ namespace __counted { 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 @@ namespace __counted { 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 index 994a604a9fefb..4f0496d6e4182 100644 --- a/libcxx/include/__ranges/data.h +++ b/libcxx/include/__ranges/data.h @@ -60,8 +60,8 @@ namespace __data { 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)); } }; } // namespace __data diff --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h index 64c567416453c..0e5b68b11d06d 100644 --- a/libcxx/include/__ranges/drop_view.h +++ b/libcxx/include/__ranges/drop_view.h @@ -55,13 +55,13 @@ namespace ranges { _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 index 77f02b63d5c21..2fbc607789589 100644 --- a/libcxx/include/__ranges/iota_view.h +++ b/libcxx/include/__ranges/iota_view.h @@ -111,7 +111,7 @@ namespace ranges { __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 @@ namespace ranges { 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 @@ namespace ranges { 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 @@ namespace ranges { _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 @@ namespace ranges { 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 @@ namespace __iota { 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 index 4bab8dfeec432..18180984d1935 100644 --- a/libcxx/include/__ranges/join_view.h +++ b/libcxx/include/__ranges/join_view.h @@ -76,13 +76,13 @@ namespace ranges { _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 @@ namespace ranges { _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 @@ namespace ranges { _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 @@ namespace ranges { 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 index 89b5ef0746234..30fcd9f11ed7f 100644 --- a/libcxx/include/__ranges/non_propagating_cache.h +++ b/libcxx/include/__ranges/non_propagating_cache.h @@ -45,7 +45,7 @@ namespace ranges { // 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 @@ namespace ranges { _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 @@ namespace ranges { 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 index c0c6a32e12990..322152d7caa15 100644 --- a/libcxx/include/__ranges/owning_view.h +++ b/libcxx/include/__ranges/owning_view.h @@ -38,15 +38,15 @@ namespace ranges { 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 index 04a050528811b..9b456b18f04d3 100644 --- a/libcxx/include/__ranges/range_adaptor.h +++ b/libcxx/include/__ranges/range_adaptor.h @@ -39,7 +39,7 @@ struct __range_adaptor_closure; // 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 @@ struct __range_adaptor_closure { [[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 @@ struct __range_adaptor_closure { 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_CONCEPTS) diff --git a/libcxx/include/__ranges/ref_view.h b/libcxx/include/__ranges/ref_view.h index b97de36e79899..90fb5c1832644 100644 --- a/libcxx/include/__ranges/ref_view.h +++ b/libcxx/include/__ranges/ref_view.h @@ -48,7 +48,7 @@ namespace ranges { 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 index c7f1ab8f943b6..59b8289a23fec 100644 --- a/libcxx/include/__ranges/reverse_view.h +++ b/libcxx/include/__ranges/reverse_view.h @@ -51,13 +51,13 @@ namespace ranges { 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 @@ namespace ranges { 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 @@ namespace ranges { _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 @@ namespace ranges { 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 @@ namespace ranges { !__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)}; } }; } // namespace __reverse diff --git a/libcxx/include/__ranges/single_view.h b/libcxx/include/__ranges/single_view.h index 49e1aad520f8b..5347b78da9106 100644 --- a/libcxx/include/__ranges/single_view.h +++ b/libcxx/include/__ranges/single_view.h @@ -40,13 +40,13 @@ namespace ranges { 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 index a96103db9ec32..50bcca6874e9d 100644 --- a/libcxx/include/__ranges/size.h +++ b/libcxx/include/__ranges/size.h @@ -94,7 +94,7 @@ namespace __size { 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)); } }; } // namespace __size diff --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h index 2450e230f281b..4593205aefe3e 100644 --- a/libcxx/include/__ranges/subrange.h +++ b/libcxx/include/__ranges/subrange.h @@ -56,8 +56,8 @@ namespace ranges { 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 @@ -93,14 +93,14 @@ namespace ranges { _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), @@ -149,7 +149,7 @@ namespace ranges { } [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Iter begin() requires (!copyable<_Iter>) { - return _VSTD::move(__begin_); + return std::move(__begin_); } _LIBCPP_HIDE_FROM_ABI @@ -168,7 +168,7 @@ namespace ranges { 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& @@ -181,7 +181,7 @@ namespace ranges { [[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 @@ -198,14 +198,14 @@ namespace ranges { 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 index de44fc1fae724..0b0f9c3744f4e 100644 --- a/libcxx/include/__ranges/take_view.h +++ b/libcxx/include/__ranges/take_view.h @@ -50,13 +50,13 @@ namespace ranges { _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 @@ namespace ranges { 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 @@ namespace ranges { __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 index dad46536c75fb..42ea1b82c7412 100644 --- a/libcxx/include/__ranges/transform_view.h +++ b/libcxx/include/__ranges/transform_view.h @@ -71,12 +71,12 @@ class transform_view : public view_interface> { _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() { @@ -183,7 +183,7 @@ class transform_view<_View, _Fn>::__iterator _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 @@ -191,7 +191,7 @@ class transform_view<_View, _Fn>::__iterator _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 const iterator_t<_Base>& base() const& noexcept { @@ -200,14 +200,14 @@ class transform_view<_View, _Fn>::__iterator _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 @@ -263,10 +263,10 @@ class transform_view<_View, _Fn>::__iterator _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 @@ -344,7 +344,7 @@ class transform_view<_View, _Fn>::__iterator noexcept(noexcept(*__i)) { if constexpr (is_lvalue_reference_v) - return _VSTD::move(*__i); + return std::move(*__i); else return *__i; } @@ -378,7 +378,7 @@ class transform_view<_View, _Fn>::__sentinel { _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_; } @@ -413,16 +413,16 @@ namespace __transform { 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))); } }; } // namespace __transform diff --git a/libcxx/include/__ranges/view_interface.h b/libcxx/include/__ranges/view_interface.h index eca563fe3ffb4..91ae4bde7d1b2 100644 --- a/libcxx/include/__ranges/view_interface.h +++ b/libcxx/include/__ranges/view_interface.h @@ -90,19 +90,19 @@ class view_interface { 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