Browse Source

Upd libc++ to 12 July 2022 81c48436bbd29736f77a111fc207e28854939907

hiddenpath 1 year ago
parent
commit
525f68b21b

+ 34 - 0
build/sysincl/stl-to-libcxx.yml

@@ -267,6 +267,7 @@
   - __algorithm/ranges_count.h:                            contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h
   - __algorithm/ranges_count_if.h:                         contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h
   - __algorithm/ranges_equal.h:                            contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h
+  - __algorithm/ranges_equal_range.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h
   - __algorithm/ranges_fill.h:                             contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h
   - __algorithm/ranges_fill_n.h:                           contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h
   - __algorithm/ranges_find.h:                             contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h
@@ -275,13 +276,21 @@
   - __algorithm/ranges_find_if_not.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h
   - __algorithm/ranges_for_each.h:                         contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h
   - __algorithm/ranges_for_each_n.h:                       contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h
+  - __algorithm/ranges_generate.h:                         contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h
+  - __algorithm/ranges_generate_n.h:                       contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h
+  - __algorithm/ranges_includes.h:                         contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h
+  - __algorithm/ranges_inplace_merge.h:                    contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h
+  - __algorithm/ranges_is_heap.h:                          contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h
+  - __algorithm/ranges_is_heap_until.h:                    contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h
   - __algorithm/ranges_is_partitioned.h:                   contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h
   - __algorithm/ranges_is_sorted.h:                        contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h
   - __algorithm/ranges_is_sorted_until.h:                  contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h
   - __algorithm/ranges_lexicographical_compare.h:          contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h
   - __algorithm/ranges_lower_bound.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h
+  - __algorithm/ranges_make_heap.h:                        contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h
   - __algorithm/ranges_max.h:                              contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h
   - __algorithm/ranges_max_element.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h
+  - __algorithm/ranges_merge.h:                            contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h
   - __algorithm/ranges_min.h:                              contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h
   - __algorithm/ranges_min_element.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h
   - __algorithm/ranges_minmax.h:                           contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h
@@ -290,12 +299,36 @@
   - __algorithm/ranges_move.h:                             contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h
   - __algorithm/ranges_move_backward.h:                    contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h
   - __algorithm/ranges_none_of.h:                          contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h
+  - __algorithm/ranges_nth_element.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h
+  - __algorithm/ranges_partial_sort_copy.h:                contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h
+  - __algorithm/ranges_partition.h:                        contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h
+  - __algorithm/ranges_partition_copy.h:                   contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h
+  - __algorithm/ranges_partition_point.h:                  contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h
+  - __algorithm/ranges_pop_heap.h:                         contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h
+  - __algorithm/ranges_push_heap.h:                        contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h
+  - __algorithm/ranges_remove.h:                           contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h
+  - __algorithm/ranges_remove_copy.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h
+  - __algorithm/ranges_remove_copy_if.h:                   contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h
+  - __algorithm/ranges_remove_if.h:                        contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h
   - __algorithm/ranges_replace.h:                          contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h
+  - __algorithm/ranges_replace_copy.h:                     contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h
+  - __algorithm/ranges_replace_copy_if.h:                  contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h
   - __algorithm/ranges_replace_if.h:                       contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h
   - __algorithm/ranges_reverse.h:                          contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse.h
+  - __algorithm/ranges_reverse_copy.h:                     contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h
+  - __algorithm/ranges_rotate_copy.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h
+  - __algorithm/ranges_set_difference.h:                   contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h
+  - __algorithm/ranges_set_intersection.h:                 contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h
+  - __algorithm/ranges_set_union.h:                        contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h
+  - __algorithm/ranges_shuffle.h:                          contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h
   - __algorithm/ranges_sort.h:                             contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h
+  - __algorithm/ranges_sort_heap.h:                        contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h
+  - __algorithm/ranges_stable_partition.h:                 contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h
+  - __algorithm/ranges_stable_sort.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h
   - __algorithm/ranges_swap_ranges.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h
   - __algorithm/ranges_transform.h:                        contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h
+  - __algorithm/ranges_unique.h:                           contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h
+  - __algorithm/ranges_unique_copy.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h
   - __algorithm/ranges_upper_bound.h:                      contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_upper_bound.h
   - __algorithm/remove.h:                                  contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h
   - __algorithm/remove_copy.h:                             contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_copy.h
@@ -395,6 +428,7 @@
   - __coroutine/coroutine_traits.h:                        contrib/libs/cxxsupp/libcxx/include/__coroutine/coroutine_traits.h
   - __coroutine/noop_coroutine_handle.h:                   contrib/libs/cxxsupp/libcxx/include/__coroutine/noop_coroutine_handle.h
   - __coroutine/trivial_awaitables.h:                      contrib/libs/cxxsupp/libcxx/include/__coroutine/trivial_awaitables.h
+  - __debug_utils/randomize_range.h:                       contrib/libs/cxxsupp/libcxx/include/__debug_utils/randomize_range.h
   - __filesystem/copy_options.h:                           contrib/libs/cxxsupp/libcxx/include/__filesystem/copy_options.h
   - __filesystem/directory_entry.h:                        contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
   - __filesystem/directory_iterator.h:                     contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h

+ 1 - 1
build/ymake.core.conf

@@ -9,7 +9,7 @@
 FAKEID=628318530716
 
 SANDBOX_FAKEID=${FAKEID}.7600000
-CPP_FAKEID=2023-11-07
+CPP_FAKEID=2023-12-05
 GO_FAKEID=11100371
 ANDROID_FAKEID=2023-05-17
 CLANG_TIDY_FAKEID=2023-06-06

+ 5 - 5
contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h

@@ -25,20 +25,20 @@ template <class _ForwardIterator, class _Tp, class _Compare>
 _LIBCPP_NODISCARD_EXT inline
 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 bool
-binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
+binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
 {
     using _Comp_ref = typename __comp_ref_type<_Compare>::type;
-    __first = std::lower_bound<_ForwardIterator, _Tp, _Comp_ref>(__first, __last, __value_, __comp);
-    return __first != __last && !__comp(__value_, *__first);
+    __first = std::lower_bound<_ForwardIterator, _Tp, _Comp_ref>(__first, __last, __value, __comp);
+    return __first != __last && !__comp(__value, *__first);
 }
 
 template <class _ForwardIterator, class _Tp>
 _LIBCPP_NODISCARD_EXT inline
 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 bool
-binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_)
+binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
-    return std::binary_search(__first, __last, __value_,
+    return std::binary_search(__first, __last, __value,
                               __less<typename iterator_traits<_ForwardIterator>::value_type, _Tp>());
 }
 

+ 2 - 2
contrib/libs/cxxsupp/libcxx/include/__algorithm/count.h

@@ -22,10 +22,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 template <class _InputIterator, class _Tp>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
     typename iterator_traits<_InputIterator>::difference_type
-    count(_InputIterator __first, _InputIterator __last, const _Tp& __value_) {
+    count(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
   typename iterator_traits<_InputIterator>::difference_type __r(0);
   for (; __first != __last; ++__first)
-    if (*__first == __value_)
+    if (*__first == __value)
       ++__r;
   return __r;
 }

+ 9 - 9
contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h

@@ -30,7 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Compare, class _ForwardIterator, class _Tp>
 _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
-__equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
+__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);
@@ -39,12 +39,12 @@ __equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va
         difference_type __l2 = _VSTD::__half_positive(__len);
         _ForwardIterator __m = __first;
         _VSTD::advance(__m, __l2);
-        if (__comp(*__m, __value_))
+        if (__comp(*__m, __value))
         {
             __first = ++__m;
             __len -= __l2 + 1;
         }
-        else if (__comp(__value_, *__m))
+        else if (__comp(__value, *__m))
         {
             __last = __m;
             __len = __l2;
@@ -55,8 +55,8 @@ __equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va
             _ForwardIterator __mp1 = __m;
             return pair<_ForwardIterator, _ForwardIterator>
                    (
-                      _VSTD::__lower_bound_impl<_StdIterOps>(__first, __m, __value_, __comp, __proj),
-                      _VSTD::__upper_bound<_Compare>(++__mp1, __last, __value_, __comp)
+                      _VSTD::__lower_bound_impl<_StdIterOps>(__first, __m, __value, __comp, __proj),
+                      _VSTD::__upper_bound<_Compare>(++__mp1, __last, __value, __comp)
                    );
         }
     }
@@ -67,19 +67,19 @@ template <class _ForwardIterator, class _Tp, class _Compare>
 _LIBCPP_NODISCARD_EXT inline
 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 pair<_ForwardIterator, _ForwardIterator>
-equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp)
+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 _VSTD::__equal_range<_Comp_ref>(__first, __last, __value, __comp);
 }
 
 template <class _ForwardIterator, class _Tp>
 _LIBCPP_NODISCARD_EXT inline
 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 pair<_ForwardIterator, _ForwardIterator>
-equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_)
+equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
-    return _VSTD::equal_range(__first, __last, __value_,
+    return _VSTD::equal_range(__first, __last, __value,
                              __less<typename iterator_traits<_ForwardIterator>::value_type, _Tp>());
 }
 

+ 6 - 6
contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h

@@ -23,26 +23,26 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 template <class _ForwardIterator, class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 void
-__fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, forward_iterator_tag)
+__fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, forward_iterator_tag)
 {
     for (; __first != __last; ++__first)
-        *__first = __value_;
+        *__first = __value;
 }
 
 template <class _RandomAccessIterator, class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 void
-__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value_, random_access_iterator_tag)
+__fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag)
 {
-    _VSTD::fill_n(__first, __last - __first, __value_);
+    _VSTD::fill_n(__first, __last - __first, __value);
 }
 
 template <class _ForwardIterator, class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 void
-fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_)
+fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
-    _VSTD::__fill(__first, __last, __value_, typename iterator_traits<_ForwardIterator>::iterator_category());
+    _VSTD::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
 }
 
 _LIBCPP_END_NAMESPACE_STD

+ 4 - 4
contrib/libs/cxxsupp/libcxx/include/__algorithm/fill_n.h

@@ -22,19 +22,19 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 template <class _OutputIterator, class _Size, class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 _OutputIterator
-__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value_)
+__fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
 {
     for (; __n > 0; ++__first, (void) --__n)
-        *__first = __value_;
+        *__first = __value;
     return __first;
 }
 
 template <class _OutputIterator, class _Size, class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
 _OutputIterator
-fill_n(_OutputIterator __first, _Size __n, const _Tp& __value_)
+fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
 {
-   return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value_);
+   return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value);
 }
 
 _LIBCPP_END_NAMESPACE_STD

+ 2 - 2
contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h

@@ -20,9 +20,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Tp>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
-find(_InputIterator __first, _InputIterator __last, const _Tp& __value_) {
+find(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
   for (; __first != __last; ++__first)
-    if (*__first == __value_)
+    if (*__first == __value)
       break;
   return __first;
 }

+ 8 - 0
contrib/libs/cxxsupp/libcxx/include/__algorithm/iterator_operations.h

@@ -13,6 +13,7 @@
 #include <__iterator/advance.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
+#include <__iterator/next.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
@@ -24,6 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 struct _RangesIterOps {
   static constexpr auto advance = ranges::advance;
   static constexpr auto distance = ranges::distance;
+  static constexpr auto next = ranges::next;
 };
 #endif
 
@@ -40,6 +42,12 @@ struct _StdIterOps {
     return std::distance(__first, __last);
   }
 
+  template <class _Iterator>
+  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _Iterator next(_Iterator, _Iterator __last) {
+    return __last;
+  }
+
 };
 
 _LIBCPP_END_NAMESPACE_STD

+ 4 - 4
contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h

@@ -48,17 +48,17 @@ _Iter __lower_bound_impl(_Iter __first, _Sent __last, const _Type& __value, _Com
 
 template <class _ForwardIterator, class _Tp, class _Compare>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
-_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_, _Compare __comp) {
+_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
   static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
                 "The comparator has to be callable");
   auto __proj = std::__identity();
-  return std::__lower_bound_impl<_StdIterOps>(__first, __last, __value_, __comp, __proj);
+  return std::__lower_bound_impl<_StdIterOps>(__first, __last, __value, __comp, __proj);
 }
 
 template <class _ForwardIterator, class _Tp>
 _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
-_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value_) {
-  return std::lower_bound(__first, __last, __value_,
+_ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
+  return std::lower_bound(__first, __last, __value,
                           __less<typename iterator_traits<_ForwardIterator>::value_type, _Tp>());
 }
 

Some files were not shown because too many files changed in this diff