[libcxx-commits] [libcxx] [libc++] Replace uses of _VSTD:: by std:: (PR #74331)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 4 07:39:01 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

<details>
<summary>Changes</summary>

As part of the upcoming clang-formatting of libc++, this patch performs the long desired removal of the _VSTD macro.

See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all for the clang-format proposal.

---

Patch is 736.55 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/74331.diff


210 Files Affected:

- (modified) libcxx/docs/Contributing.rst (-1) 
- (modified) libcxx/include/__algorithm/clamp.h (+1-1) 
- (modified) libcxx/include/__algorithm/copy_n.h (+3-3) 
- (modified) libcxx/include/__algorithm/equal.h (+2-2) 
- (modified) libcxx/include/__algorithm/fill.h (+2-2) 
- (modified) libcxx/include/__algorithm/fill_n.h (+1-1) 
- (modified) libcxx/include/__algorithm/find_first_of.h (+1-1) 
- (modified) libcxx/include/__algorithm/for_each_n.h (+1-1) 
- (modified) libcxx/include/__algorithm/generate_n.h (+1-1) 
- (modified) libcxx/include/__algorithm/inplace_merge.h (+2-2) 
- (modified) libcxx/include/__algorithm/is_heap.h (+1-1) 
- (modified) libcxx/include/__algorithm/is_heap_until.h (+1-1) 
- (modified) libcxx/include/__algorithm/is_sorted.h (+2-2) 
- (modified) libcxx/include/__algorithm/is_sorted_until.h (+2-2) 
- (modified) libcxx/include/__algorithm/lexicographical_compare.h (+2-2) 
- (modified) libcxx/include/__algorithm/max.h (+3-3) 
- (modified) libcxx/include/__algorithm/max_element.h (+2-2) 
- (modified) libcxx/include/__algorithm/merge.h (+4-4) 
- (modified) libcxx/include/__algorithm/min.h (+3-3) 
- (modified) libcxx/include/__algorithm/min_element.h (+1-1) 
- (modified) libcxx/include/__algorithm/next_permutation.h (+1-1) 
- (modified) libcxx/include/__algorithm/nth_element.h (+4-4) 
- (modified) libcxx/include/__algorithm/partial_sort.h (+1-1) 
- (modified) libcxx/include/__algorithm/partial_sort_copy.h (+1-1) 
- (modified) libcxx/include/__algorithm/partition_point.h (+3-3) 
- (modified) libcxx/include/__algorithm/prev_permutation.h (+1-1) 
- (modified) libcxx/include/__algorithm/remove.h (+2-2) 
- (modified) libcxx/include/__algorithm/remove_if.h (+2-2) 
- (modified) libcxx/include/__algorithm/rotate.h (+5-5) 
- (modified) libcxx/include/__algorithm/rotate_copy.h (+1-1) 
- (modified) libcxx/include/__algorithm/sample.h (+2-2) 
- (modified) libcxx/include/__algorithm/shift_left.h (+1-1) 
- (modified) libcxx/include/__algorithm/shift_right.h (+5-5) 
- (modified) libcxx/include/__algorithm/sift_down.h (+1-1) 
- (modified) libcxx/include/__algorithm/stable_partition.h (+2-2) 
- (modified) libcxx/include/__algorithm/stable_sort.h (+1-1) 
- (modified) libcxx/include/__compare/compare_partial_order_fallback.h (+15-15) 
- (modified) libcxx/include/__compare/compare_strong_order_fallback.h (+12-12) 
- (modified) libcxx/include/__compare/compare_three_way.h (+2-2) 
- (modified) libcxx/include/__compare/compare_weak_order_fallback.h (+12-12) 
- (modified) libcxx/include/__compare/partial_order.h (+12-12) 
- (modified) libcxx/include/__compare/strong_order.h (+23-23) 
- (modified) libcxx/include/__compare/weak_order.h (+16-16) 
- (modified) libcxx/include/__concepts/assignable.h (+1-1) 
- (modified) libcxx/include/__concepts/boolean_testable.h (+1-1) 
- (modified) libcxx/include/__concepts/invocable.h (+1-1) 
- (modified) libcxx/include/__concepts/swappable.h (+8-8) 
- (modified) libcxx/include/__config (+3-3) 
- (modified) libcxx/include/__coroutine/coroutine_handle.h (+1-1) 
- (modified) libcxx/include/__filesystem/directory_entry.h (+3-3) 
- (modified) libcxx/include/__filesystem/directory_iterator.h (+3-3) 
- (modified) libcxx/include/__filesystem/filesystem_error.h (+1-1) 
- (modified) libcxx/include/__filesystem/path.h (+33-33) 
- (modified) libcxx/include/__filesystem/recursive_directory_iterator.h (+3-3) 
- (modified) libcxx/include/__filesystem/u8path.h (+3-3) 
- (modified) libcxx/include/__format/buffer.h (+21-21) 
- (modified) libcxx/include/__format/format_arg.h (+20-20) 
- (modified) libcxx/include/__format/format_context.h (+12-12) 
- (modified) libcxx/include/__format/format_functions.h (+62-62) 
- (modified) libcxx/include/__format/formatter_floating_point.h (+31-31) 
- (modified) libcxx/include/__format/formatter_integral.h (+11-11) 
- (modified) libcxx/include/__format/formatter_output.h (+25-25) 
- (modified) libcxx/include/__format/parser_std_format_spec.h (+2-2) 
- (modified) libcxx/include/__format/write_escaped.h (+4-4) 
- (modified) libcxx/include/__functional/bind.h (+16-16) 
- (modified) libcxx/include/__functional/bind_back.h (+6-6) 
- (modified) libcxx/include/__functional/bind_front.h (+4-4) 
- (modified) libcxx/include/__functional/compose.h (+6-6) 
- (modified) libcxx/include/__functional/function.h (+40-40) 
- (modified) libcxx/include/__functional/hash.h (+2-2) 
- (modified) libcxx/include/__functional/identity.h (+1-1) 
- (modified) libcxx/include/__functional/invoke.h (+1-1) 
- (modified) libcxx/include/__functional/not_fn.h (+4-4) 
- (modified) libcxx/include/__functional/operations.h (+57-57) 
- (modified) libcxx/include/__functional/perfect_forward.h (+13-13) 
- (modified) libcxx/include/__functional/ranges_operations.h (+12-12) 
- (modified) libcxx/include/__functional/reference_wrapper.h (+1-1) 
- (modified) libcxx/include/__functional/weak_result_type.h (+1-1) 
- (modified) libcxx/include/__hash_table (+48-48) 
- (modified) libcxx/include/__iterator/advance.h (+4-4) 
- (modified) libcxx/include/__iterator/back_insert_iterator.h (+2-2) 
- (modified) libcxx/include/__iterator/common_iterator.h (+27-27) 
- (modified) libcxx/include/__iterator/concepts.h (+6-6) 
- (modified) libcxx/include/__iterator/counted_iterator.h (+3-3) 
- (modified) libcxx/include/__iterator/distance.h (+1-1) 
- (modified) libcxx/include/__iterator/front_insert_iterator.h (+2-2) 
- (modified) libcxx/include/__iterator/insert_iterator.h (+2-2) 
- (modified) libcxx/include/__iterator/istream_iterator.h (+2-2) 
- (modified) libcxx/include/__iterator/iter_swap.h (+7-7) 
- (modified) libcxx/include/__iterator/next.h (+1-1) 
- (modified) libcxx/include/__iterator/ostream_iterator.h (+2-2) 
- (modified) libcxx/include/__iterator/prev.h (+1-1) 
- (modified) libcxx/include/__iterator/reverse_access.h (+4-4) 
- (modified) libcxx/include/__iterator/wrap_iter.h (+2-2) 
- (modified) libcxx/include/__locale (+3-3) 
- (modified) libcxx/include/__locale_dir/locale_base_api/locale_guard.h (+1-1) 
- (modified) libcxx/include/__memory/allocation_guard.h (+1-1) 
- (modified) libcxx/include/__memory/allocator.h (+9-9) 
- (modified) libcxx/include/__memory/allocator_arg_t.h (+3-3) 
- (modified) libcxx/include/__memory/allocator_traits.h (+1-1) 
- (modified) libcxx/include/__memory/builtin_new_allocator.h (+3-3) 
- (modified) libcxx/include/__memory/pointer_traits.h (+5-5) 
- (modified) libcxx/include/__memory/ranges_construct_at.h (+4-4) 
- (modified) libcxx/include/__memory/ranges_uninitialized_algorithms.h (+12-12) 
- (modified) libcxx/include/__memory/raw_storage_iterator.h (+2-2) 
- (modified) libcxx/include/__memory/shared_ptr.h (+30-30) 
- (modified) libcxx/include/__memory/swap_allocator.h (+2-2) 
- (modified) libcxx/include/__memory/temporary_buffer.h (+2-2) 
- (modified) libcxx/include/__memory/uninitialized_algorithms.h (+37-37) 
- (modified) libcxx/include/__memory/unique_ptr.h (+12-12) 
- (modified) libcxx/include/__memory/voidify.h (+1-1) 
- (modified) libcxx/include/__mutex/once_flag.h (+2-2) 
- (modified) libcxx/include/__node_handle (+9-9) 
- (modified) libcxx/include/__numeric/accumulate.h (+2-2) 
- (modified) libcxx/include/__numeric/adjacent_difference.h (+4-4) 
- (modified) libcxx/include/__numeric/exclusive_scan.h (+3-3) 
- (modified) libcxx/include/__numeric/gcd_lcm.h (+3-3) 
- (modified) libcxx/include/__numeric/inclusive_scan.h (+2-2) 
- (modified) libcxx/include/__numeric/inner_product.h (+2-2) 
- (modified) libcxx/include/__numeric/midpoint.h (+1-1) 
- (modified) libcxx/include/__numeric/partial_sum.h (+2-2) 
- (modified) libcxx/include/__numeric/reduce.h (+2-2) 
- (modified) libcxx/include/__numeric/transform_inclusive_scan.h (+1-1) 
- (modified) libcxx/include/__numeric/transform_reduce.h (+2-2) 
- (modified) libcxx/include/__random/binomial_distribution.h (+3-3) 
- (modified) libcxx/include/__random/cauchy_distribution.h (+1-1) 
- (modified) libcxx/include/__random/discard_block_engine.h (+1-1) 
- (modified) libcxx/include/__random/discrete_distribution.h (+4-4) 
- (modified) libcxx/include/__random/exponential_distribution.h (+2-2) 
- (modified) libcxx/include/__random/extreme_value_distribution.h (+1-1) 
- (modified) libcxx/include/__random/gamma_distribution.h (+5-5) 
- (modified) libcxx/include/__random/independent_bits_engine.h (+1-1) 
- (modified) libcxx/include/__random/lognormal_distribution.h (+2-2) 
- (modified) libcxx/include/__random/mersenne_twister_engine.h (+11-11) 
- (modified) libcxx/include/__random/normal_distribution.h (+1-1) 
- (modified) libcxx/include/__random/piecewise_constant_distribution.h (+3-3) 
- (modified) libcxx/include/__random/piecewise_linear_distribution.h (+2-2) 
- (modified) libcxx/include/__random/poisson_distribution.h (+15-15) 
- (modified) libcxx/include/__random/seed_seq.h (+3-3) 
- (modified) libcxx/include/__random/shuffle_order_engine.h (+2-2) 
- (modified) libcxx/include/__random/student_t_distribution.h (+1-1) 
- (modified) libcxx/include/__random/subtract_with_carry_engine.h (+11-11) 
- (modified) libcxx/include/__random/uniform_real_distribution.h (+1-1) 
- (modified) libcxx/include/__random/weibull_distribution.h (+1-1) 
- (modified) libcxx/include/__split_buffer (+59-59) 
- (modified) libcxx/include/__string/char_traits.h (+2-2) 
- (modified) libcxx/include/__thread/thread.h (+9-9) 
- (modified) libcxx/include/__threading_support (+2-2) 
- (modified) libcxx/include/__tree (+94-94) 
- (modified) libcxx/include/__type_traits/invoke.h (+2-2) 
- (modified) libcxx/include/__type_traits/is_nothrow_constructible.h (+1-1) 
- (modified) libcxx/include/__type_traits/is_nothrow_convertible.h (+1-1) 
- (modified) libcxx/include/__utility/cmp.h (+6-6) 
- (modified) libcxx/include/__utility/exchange.h (+2-2) 
- (modified) libcxx/include/__utility/swap.h (+3-3) 
- (modified) libcxx/include/__utility/to_underlying.h (+1-1) 
- (modified) libcxx/include/any (+18-18) 
- (modified) libcxx/include/array (+13-13) 
- (modified) libcxx/include/barrier (+2-2) 
- (modified) libcxx/include/bitset (+15-15) 
- (modified) libcxx/include/complex (+3-3) 
- (modified) libcxx/include/condition_variable (+1-1) 
- (modified) libcxx/include/deque (+106-106) 
- (modified) libcxx/include/experimental/__config (-3) 
- (modified) libcxx/include/experimental/__memory (+4-4) 
- (modified) libcxx/include/experimental/iterator (+3-3) 
- (modified) libcxx/include/experimental/propagate_const (+77-77) 
- (modified) libcxx/include/ext/hash_map (+7-7) 
- (modified) libcxx/include/ext/hash_set (+3-3) 
- (modified) libcxx/include/forward_list (+20-20) 
- (modified) libcxx/include/fstream (+27-27) 
- (modified) libcxx/include/future (+77-77) 
- (modified) libcxx/include/iomanip (+1-1) 
- (modified) libcxx/include/ios (+4-4) 
- (modified) libcxx/include/istream (+21-21) 
- (modified) libcxx/include/limits (+1-1) 
- (modified) libcxx/include/list (+32-32) 
- (modified) libcxx/include/locale (+16-16) 
- (modified) libcxx/include/map (+76-76) 
- (modified) libcxx/include/mutex (+3-3) 
- (modified) libcxx/include/new (+1-1) 
- (modified) libcxx/include/optional (+55-55) 
- (modified) libcxx/include/ostream (+11-11) 
- (modified) libcxx/include/queue (+35-35) 
- (modified) libcxx/include/regex (+106-106) 
- (modified) libcxx/include/scoped_allocator (+24-24) 
- (modified) libcxx/include/set (+30-30) 
- (modified) libcxx/include/shared_mutex (+8-8) 
- (modified) libcxx/include/span (+6-6) 
- (modified) libcxx/include/sstream (+16-16) 
- (modified) libcxx/include/stack (+9-9) 
- (modified) libcxx/include/stdexcept (+4-4) 
- (modified) libcxx/include/streambuf (+10-10) 
- (modified) libcxx/include/string_view (+7-7) 
- (modified) libcxx/include/strstream (+14-14) 
- (modified) libcxx/include/tuple (+69-69) 
- (modified) libcxx/include/unordered_map (+58-58) 
- (modified) libcxx/include/unordered_set (+23-23) 
- (modified) libcxx/include/valarray (+10-10) 
- (modified) libcxx/include/variant (+97-97) 
- (modified) libcxx/src/chrono.cpp (+2-2) 
- (modified) libcxx/src/include/to_chars_floating_point.h (+21-21) 
- (modified) libcxx/src/ios.cpp (+17-17) 
- (modified) libcxx/src/iostream.cpp (+2-2) 
- (modified) libcxx/src/locale.cpp (+18-18) 
- (modified) libcxx/src/regex.cpp (+2-2) 
- (modified) libcxx/src/std_stream.h (+6-6) 
- (modified) libcxx/src/strstream.cpp (+6-6) 
- (modified) libcxx/src/support/win32/thread_win32.cpp (+1-1) 
- (modified) libcxx/src/vector.cpp (+2-2) 


``````````diff
diff --git a/libcxx/docs/Contributing.rst b/libcxx/docs/Contributing.rst
index 4cd0568989f85..3ff8c15a969b0 100644
--- a/libcxx/docs/Contributing.rst
+++ b/libcxx/docs/Contributing.rst
@@ -67,7 +67,6 @@ avoid invoking a user-defined ``operator,``, make sure to cast the result to
 In general, try to follow the style of existing code. There are a few
 exceptions:
 
-- ``_VSTD::foo`` is no longer used in new code. Use ``std::foo`` instead.
 - Prefer ``using foo = int`` over ``typedef int foo``. The compilers supported
   by libc++ accept alias declarations in all standard modes.
 
diff --git a/libcxx/include/__algorithm/clamp.h b/libcxx/include/__algorithm/clamp.h
index fc08827919403..1631b2673c3fa 100644
--- a/libcxx/include/__algorithm/clamp.h
+++ b/libcxx/include/__algorithm/clamp.h
@@ -35,7 +35,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI constexpr const _Tp&
 clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
       _LIBCPP_LIFETIMEBOUND const _Tp& __lo,
       _LIBCPP_LIFETIMEBOUND const _Tp& __hi) {
-  return _VSTD::clamp(__v, __lo, __hi, __less<>());
+  return std::clamp(__v, __lo, __hi, __less<>());
 }
 #endif
 
diff --git a/libcxx/include/__algorithm/copy_n.h b/libcxx/include/__algorithm/copy_n.h
index 19f3f729c3d08..1707e26688c65 100644
--- a/libcxx/include/__algorithm/copy_n.h
+++ b/libcxx/include/__algorithm/copy_n.h
@@ -28,7 +28,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _OutputIterator
 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)
     {
@@ -51,9 +51,9 @@ _OutputIterator
 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
index ca2e49ca5679a..fb358613e2101 100644
--- a/libcxx/include/__algorithm/equal.h
+++ b/libcxx/include/__algorithm/equal.h
@@ -107,7 +107,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
 __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;
   __identity __proj;
   return std::__equal_impl(
@@ -124,7 +124,7 @@ template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 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());
 }
diff --git a/libcxx/include/__algorithm/fill.h b/libcxx/include/__algorithm/fill.h
index e59c4963851d3..360e2c3c3c858 100644
--- a/libcxx/include/__algorithm/fill.h
+++ b/libcxx/include/__algorithm/fill.h
@@ -35,7 +35,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 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 <class _ForwardIterator, class _Tp>
@@ -43,7 +43,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 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
index c2dfbf1197589..89681a342ea78 100644
--- a/libcxx/include/__algorithm/fill_n.h
+++ b/libcxx/include/__algorithm/fill_n.h
@@ -36,7 +36,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _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_first_of.h b/libcxx/include/__algorithm/find_first_of.h
index c386687d46ffe..15a147242b0e5 100644
--- a/libcxx/include/__algorithm/find_first_of.h
+++ b/libcxx/include/__algorithm/find_first_of.h
@@ -38,7 +38,7 @@ template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredica
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _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 <class _ForwardIterator1, class _ForwardIterator2>
diff --git a/libcxx/include/__algorithm/for_each_n.h b/libcxx/include/__algorithm/for_each_n.h
index 7006bafe73046..a72a0912cfa52 100644
--- a/libcxx/include/__algorithm/for_each_n.h
+++ b/libcxx/include/__algorithm/for_each_n.h
@@ -25,7 +25,7 @@ template <class _InputIterator, class _Size, class _Function>
 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _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
index 1c8194c3c071b..5719826e93edf 100644
--- a/libcxx/include/__algorithm/generate_n.h
+++ b/libcxx/include/__algorithm/generate_n.h
@@ -23,7 +23,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _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/inplace_merge.h b/libcxx/include/__algorithm/inplace_merge.h
index a3dad4668cbd9..d49c2e5cedda2 100644
--- a/libcxx/include/__algorithm/inplace_merge.h
+++ b/libcxx/include/__algorithm/inplace_merge.h
@@ -224,10 +224,10 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle,
     typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type;
     difference_type __len1 = _IterOps<_AlgPolicy>::distance(__first, __middle);
     difference_type __len2 = _IterOps<_AlgPolicy>::distance(__middle, __last);
-    difference_type __buf_size = _VSTD::min(__len1, __len2);
+    difference_type __buf_size = std::min(__len1, __len2);
 // TODO: Remove the use of std::get_temporary_buffer
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
-    pair<value_type*, ptrdiff_t> __buf = _VSTD::get_temporary_buffer<value_type>(__buf_size);
+    pair<value_type*, ptrdiff_t> __buf = std::get_temporary_buffer<value_type>(__buf_size);
 _LIBCPP_SUPPRESS_DEPRECATED_POP
     unique_ptr<value_type, __return_temporary_buffer> __h(__buf.first);
     return std::__inplace_merge<_AlgPolicy>(
diff --git a/libcxx/include/__algorithm/is_heap.h b/libcxx/include/__algorithm/is_heap.h
index 77cbe019ec0ba..dd78031579ec9 100644
--- a/libcxx/include/__algorithm/is_heap.h
+++ b/libcxx/include/__algorithm/is_heap.h
@@ -36,7 +36,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
-    return _VSTD::is_heap(__first, __last, __less<>());
+    return std::is_heap(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_heap_until.h b/libcxx/include/__algorithm/is_heap_until.h
index d7131114bd60d..85f70e649f568 100644
--- a/libcxx/include/__algorithm/is_heap_until.h
+++ b/libcxx/include/__algorithm/is_heap_until.h
@@ -58,7 +58,7 @@ template<class _RandomAccessIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator
 is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
-    return _VSTD::__is_heap_until(__first, __last, __less<>());
+    return std::__is_heap_until(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_sorted.h b/libcxx/include/__algorithm/is_sorted.h
index 69374962c105a..0003097b362c5 100644
--- a/libcxx/include/__algorithm/is_sorted.h
+++ b/libcxx/include/__algorithm/is_sorted.h
@@ -27,7 +27,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
+    return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp) == __last;
 }
 
 template<class _ForwardIterator>
@@ -36,7 +36,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 is_sorted(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::is_sorted(__first, __last, __less<>());
+    return std::is_sorted(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/is_sorted_until.h b/libcxx/include/__algorithm/is_sorted_until.h
index 890b93631c46e..aeb3f1c8be989 100644
--- a/libcxx/include/__algorithm/is_sorted_until.h
+++ b/libcxx/include/__algorithm/is_sorted_until.h
@@ -41,14 +41,14 @@ template <class _ForwardIterator, class _Compare>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
 is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return _VSTD::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
+    return std::__is_sorted_until<__comp_ref_type<_Compare> >(__first, __last, __comp);
 }
 
 template<class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _ForwardIterator
 is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::is_sorted_until(__first, __last, __less<>());
+    return std::is_sorted_until(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h
index 9a5b657b7f91b..1ee189a259025 100644
--- a/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__algorithm/lexicographical_compare.h
@@ -42,7 +42,7 @@ bool
 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                         _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
 {
-    return _VSTD::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
+    return std::__lexicographical_compare<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __comp);
 }
 
 template <class _InputIterator1, class _InputIterator2>
@@ -52,7 +52,7 @@ bool
 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                         _InputIterator2 __first2, _InputIterator2 __last2)
 {
-    return _VSTD::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
+    return std::lexicographical_compare(__first1, __last1, __first2, __last2, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/max.h b/libcxx/include/__algorithm/max.h
index 38ef792f0cf20..183a4e9cac062 100644
--- a/libcxx/include/__algorithm/max.h
+++ b/libcxx/include/__algorithm/max.h
@@ -39,7 +39,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 const _Tp&
 max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
 {
-    return _VSTD::max(__a, __b, __less<>());
+    return std::max(__a, __b, __less<>());
 }
 
 #ifndef _LIBCPP_CXX03_LANG
@@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 max(initializer_list<_Tp> __t, _Compare __comp)
 {
-    return *_VSTD::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
+    return *std::__max_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
@@ -59,7 +59,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 max(initializer_list<_Tp> __t)
 {
-    return *_VSTD::max_element(__t.begin(), __t.end(), __less<>());
+    return *std::max_element(__t.begin(), __t.end(), __less<>());
 }
 
 #endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__algorithm/max_element.h b/libcxx/include/__algorithm/max_element.h
index 8fd52c77723c0..a2dc9707c00b8 100644
--- a/libcxx/include/__algorithm/max_element.h
+++ b/libcxx/include/__algorithm/max_element.h
@@ -40,7 +40,7 @@ template <class _ForwardIterator, class _Compare>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
-    return _VSTD::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
+    return std::__max_element<__comp_ref_type<_Compare> >(__first, __last, __comp);
 }
 
 
@@ -48,7 +48,7 @@ template <class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::max_element(__first, __last, __less<>());
+    return std::max_element(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/merge.h b/libcxx/include/__algorithm/merge.h
index ff02e562c3ddb..8a6021f1880b2 100644
--- a/libcxx/include/__algorithm/merge.h
+++ b/libcxx/include/__algorithm/merge.h
@@ -30,7 +30,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
     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 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
             ++__first1;
         }
     }
-    return _VSTD::copy(__first2, __last2, __result);
+    return std::copy(__first2, __last2, __result);
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
@@ -51,7 +51,7 @@ _OutputIterator
 merge(_InputIterator1 __first1, _InputIterator1 __last1,
       _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
 {
-    return _VSTD::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
+    return std::__merge<__comp_ref_type<_Compare> >(__first1, __last1, __first2, __last2, __result, __comp);
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
@@ -60,7 +60,7 @@ _OutputIterator
 merge(_InputIterator1 __first1, _InputIterator1 __last1,
       _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
 {
-    return _VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<>());
+    return std::merge(__first1, __last1, __first2, __last2, __result, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/min.h b/libcxx/include/__algorithm/min.h
index 542c90a6decc5..58574517132f2 100644
--- a/libcxx/include/__algorithm/min.h
+++ b/libcxx/include/__algorithm/min.h
@@ -39,7 +39,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 const _Tp&
 min(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND const _Tp& __b)
 {
-    return _VSTD::min(__a, __b, __less<>());
+    return std::min(__a, __b, __less<>());
 }
 
 #ifndef _LIBCPP_CXX03_LANG
@@ -50,7 +50,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 min(initializer_list<_Tp> __t, _Compare __comp)
 {
-    return *_VSTD::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
+    return *std::__min_element<__comp_ref_type<_Compare> >(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
@@ -59,7 +59,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
 _Tp
 min(initializer_list<_Tp> __t)
 {
-    return *_VSTD::min_element(__t.begin(), __t.end(), __less<>());
+    return *std::min_element(__t.begin(), __t.end(), __less<>());
 }
 
 #endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/__algorithm/min_element.h b/libcxx/include/__algorithm/min_element.h
index 45f3e85ef92d9..0ce7af69333ff 100644
--- a/libcxx/include/__algorithm/min_element.h
+++ b/libcxx/include/__algorithm/min_element.h
@@ -64,7 +64,7 @@ template <class _ForwardIterator>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
 min_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::min_element(__first, __last, __less<>());
+    return std::min_element(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/next_permutation.h b/libcxx/include/__algorithm/next_permutation.h
index bfa63ef169706..ebaed15ae2ad0 100644
--- a/libcxx/include/__algorithm/next_permutation.h
+++ b/libcxx/include/__algorithm/next_permutation.h
@@ -69,7 +69,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 bool
 next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
 {
-    return _VSTD::next_permutation(__first, __last, __less<>());
+    return std::next_permutation(__first, __last, __less<>());
 }
 
 _LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/__algorithm/nth_element.h b/libcxx/include/__algorithm/nth_element.h
index ebd1cbf76143d..6b3b2bb434d5f 100644
--- a/libcxx/include/__algorithm/nth_element.h
+++ b/libcxx/include/__algorithm/nth_element.h
@@ -92,7 +92,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
         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)) {
                 _Ops::iter_swap(__i, __j);
                 ++__n_swaps;
             } else {
@@ -142,7 +142,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
                     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;
             }
@@ -228,12 +228,12 @@ __nth_element(_RandomAccessIterator __first, ...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/74331


More information about the libcxx-commits mailing list