diff options
author | mikhnenko <mikhnenko@yandex-team.com> | 2025-01-20 01:34:08 +0300 |
---|---|---|
committer | mikhnenko <mikhnenko@yandex-team.com> | 2025-01-20 01:51:09 +0300 |
commit | 2ab2ef14e493133a483a7210a0133c1d8918eee2 (patch) | |
tree | b25a613d75999386160a0ffe41a4f69282a592b3 /contrib/libs/cxxsupp/libcxx/include/__algorithm | |
parent | 11def371ff569cef09101fa40c00e6180c3885bc (diff) | |
download | ydb-2ab2ef14e493133a483a7210a0133c1d8918eee2.tar.gz |
Update libcxx to 5 Mar 2024 80f9458cf30d13eef21b09042ea590945c5e64db
commit_hash:c45aa2ed98c2a01fa86b69bac97f40a32bd68ae2
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm')
147 files changed, 1058 insertions, 78 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/clamp.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/clamp.h index 1631b2673c..003bf70dd4 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/clamp.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/clamp.h @@ -26,7 +26,7 @@ clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v, _LIBCPP_LIFETIMEBOUND const _Tp& __lo, _LIBCPP_LIFETIMEBOUND const _Tp& __hi, _Compare __comp) { - _LIBCPP_ASSERT_UNCATEGORIZED(!__comp(__hi, __lo), "Bad bounds passed to std::clamp"); + _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(!__comp(__hi, __lo), "Bad bounds passed to std::clamp"); return __comp(__v, __lo) ? __lo : __comp(__hi, __v) ? __hi : __v; } diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h index 15f4a535a3..aa9350c38c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h @@ -44,7 +44,7 @@ struct __debug_less { _LIBCPP_CONSTEXPR_SINCE_CXX14 inline _LIBCPP_HIDE_FROM_ABI decltype((void)std::declval<_Compare&>()( std::declval<_LHS&>(), std::declval<_RHS&>())) __do_compare_assert(int, _LHS& __l, _RHS& __r) { - _LIBCPP_ASSERT_UNCATEGORIZED(!__comp_(__l, __r), "Comparator does not induce a strict weak ordering"); + _LIBCPP_ASSERT_SEMANTIC_REQUIREMENT(!__comp_(__l, __r), "Comparator does not induce a strict weak ordering"); (void)__l; (void)__r; } @@ -53,8 +53,7 @@ struct __debug_less { _LIBCPP_CONSTEXPR_SINCE_CXX14 inline _LIBCPP_HIDE_FROM_ABI void __do_compare_assert(long, _LHS&, _RHS&) {} }; -// Pass the comparator by lvalue reference. Or in debug mode, using a -// debugging wrapper that stores a reference. +// Pass the comparator by lvalue reference. Or in the debug mode, using a debugging wrapper that stores a reference. #if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG template <class _Comp> using __comp_ref_type = __debug_less<_Comp>; diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_move_common.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_move_common.h index b350507e32..0fc7a5e3ce 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_move_common.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_move_common.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD // Type traits. @@ -132,4 +135,6 @@ __dispatch_copy_or_move(_InIter __first, _Sent __last, _OutIter __out_first) { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_COPY_MOVE_COMMON_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h index f03f010aa5..3c0e3060e3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h @@ -30,6 +30,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate> @@ -162,4 +165,6 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_EQUAL_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h index 7ce54965ff..a942904319 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj> @@ -77,4 +80,6 @@ equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_EQUAL_RANGE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h index 754e597130..7d7631b6e9 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find.h @@ -21,8 +21,11 @@ #include <__fwd/bit_reference.h> #include <__iterator/segmented_iterator.h> #include <__string/constexpr_c_functions.h> +#include <__type_traits/is_integral.h> #include <__type_traits/is_same.h> +#include <__type_traits/is_signed.h> #include <__utility/move.h> +#include <limits> #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS # include <cwchar> @@ -76,6 +79,22 @@ __find_impl(_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) { } #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS +// TODO: This should also be possible to get right with different signedness +// cast integral types to allow vectorization +template <class _Tp, + class _Up, + class _Proj, + __enable_if_t<__is_identity<_Proj>::value && !__libcpp_is_trivially_equality_comparable<_Tp, _Up>::value && + is_integral<_Tp>::value && is_integral<_Up>::value && + is_signed<_Tp>::value == is_signed<_Up>::value, + int> = 0> +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* +__find_impl(_Tp* __first, _Tp* __last, const _Up& __value, _Proj& __proj) { + if (__value < numeric_limits<_Tp>::min() || __value > numeric_limits<_Tp>::max()) + return __last; + return std::__find_impl(__first, __last, _Tp(__value), __proj); +} + // __bit_iterator implementation template <bool _ToFind, class _Cp, bool _IsConst> _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, _IsConst> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/fold.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/fold.h new file mode 100644 index 0000000000..1a9d76b50d --- /dev/null +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/fold.h @@ -0,0 +1,130 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___ALGORITHM_FOLD_H +#define _LIBCPP___ALGORITHM_FOLD_H + +#include <__concepts/assignable.h> +#include <__concepts/convertible_to.h> +#include <__concepts/invocable.h> +#include <__concepts/movable.h> +#include <__config> +#include <__functional/invoke.h> +#include <__functional/reference_wrapper.h> +#include <__iterator/concepts.h> +#include <__iterator/iterator_traits.h> +#include <__iterator/next.h> +#include <__ranges/access.h> +#include <__ranges/concepts.h> +#include <__ranges/dangling.h> +#include <__type_traits/decay.h> +#include <__type_traits/invoke.h> +#include <__utility/forward.h> +#include <__utility/move.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if _LIBCPP_STD_VER >= 23 + +namespace ranges { +template <class _Ip, class _Tp> +struct in_value_result { + _LIBCPP_NO_UNIQUE_ADDRESS _Ip in; + _LIBCPP_NO_UNIQUE_ADDRESS _Tp value; + + template <class _I2, class _T2> + requires convertible_to<const _Ip&, _I2> && convertible_to<const _Tp&, _T2> + _LIBCPP_HIDE_FROM_ABI constexpr operator in_value_result<_I2, _T2>() const& { + return {in, value}; + } + + template <class _I2, class _T2> + requires convertible_to<_Ip, _I2> && convertible_to<_Tp, _T2> + _LIBCPP_HIDE_FROM_ABI constexpr operator in_value_result<_I2, _T2>() && { + return {std::move(in), std::move(value)}; + } +}; + +template <class _Ip, class _Tp> +using fold_left_with_iter_result = in_value_result<_Ip, _Tp>; + +template <class _Fp, class _Tp, class _Ip, class _Rp, class _Up = decay_t<_Rp>> +concept __indirectly_binary_left_foldable_impl = + convertible_to<_Rp, _Up> && // + movable<_Tp> && // + movable<_Up> && // + convertible_to<_Tp, _Up> && // + invocable<_Fp&, _Up, iter_reference_t<_Ip>> && // + assignable_from<_Up&, invoke_result_t<_Fp&, _Up, iter_reference_t<_Ip>>>; + +template <class _Fp, class _Tp, class _Ip> +concept __indirectly_binary_left_foldable = + copy_constructible<_Fp> && // + invocable<_Fp&, _Tp, iter_reference_t<_Ip>> && // + __indirectly_binary_left_foldable_impl<_Fp, _Tp, _Ip, invoke_result_t<_Fp&, _Tp, iter_reference_t<_Ip>>>; + +struct __fold_left_with_iter { + template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Tp, __indirectly_binary_left_foldable<_Tp, _Ip> _Fp> + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI static constexpr auto + operator()(_Ip __first, _Sp __last, _Tp __init, _Fp __f) { + using _Up = decay_t<invoke_result_t<_Fp&, _Tp, iter_reference_t<_Ip>>>; + + if (__first == __last) { + return fold_left_with_iter_result<_Ip, _Up>{std::move(__first), _Up(std::move(__init))}; + } + + _Up __result = std::invoke(__f, std::move(__init), *__first); + for (++__first; __first != __last; ++__first) { + __result = std::invoke(__f, std::move(__result), *__first); + } + + return fold_left_with_iter_result<_Ip, _Up>{std::move(__first), std::move(__result)}; + } + + template <input_range _Rp, class _Tp, __indirectly_binary_left_foldable<_Tp, iterator_t<_Rp>> _Fp> + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI static constexpr auto operator()(_Rp&& __r, _Tp __init, _Fp __f) { + auto __result = operator()(ranges::begin(__r), ranges::end(__r), std::move(__init), std::ref(__f)); + + using _Up = decay_t<invoke_result_t<_Fp&, _Tp, range_reference_t<_Rp>>>; + return fold_left_with_iter_result<borrowed_iterator_t<_Rp>, _Up>{std::move(__result.in), std::move(__result.value)}; + } +}; + +inline constexpr auto fold_left_with_iter = __fold_left_with_iter(); + +struct __fold_left { + template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Tp, __indirectly_binary_left_foldable<_Tp, _Ip> _Fp> + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI static constexpr auto + operator()(_Ip __first, _Sp __last, _Tp __init, _Fp __f) { + return fold_left_with_iter(std::move(__first), std::move(__last), std::move(__init), std::ref(__f)).value; + } + + template <input_range _Rp, class _Tp, __indirectly_binary_left_foldable<_Tp, iterator_t<_Rp>> _Fp> + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI static constexpr auto operator()(_Rp&& __r, _Tp __init, _Fp __f) { + return fold_left_with_iter(ranges::begin(__r), ranges::end(__r), std::move(__init), std::ref(__f)).value; + } +}; + +inline constexpr auto fold_left = __fold_left(); +} // namespace ranges + +#endif // _LIBCPP_STD_VER >= 23 + +_LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS + +#endif // _LIBCPP___ALGORITHM_FOLD_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h index 88a0255d16..a67ae38797 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h @@ -18,6 +18,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -46,4 +49,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h index 6110c1cf86..a22069a9a8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h @@ -18,6 +18,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 @@ -46,4 +49,6 @@ struct in_fun_result { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_IN_FUN_RESULT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h index 95ce4f4fd5..ba0380b5c6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h @@ -18,6 +18,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 @@ -51,4 +54,6 @@ struct in_in_out_result { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h index d1d62dae7f..994573fc70 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h @@ -18,6 +18,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 @@ -48,4 +51,6 @@ struct in_in_result { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_IN_IN_RESULT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h index 1436423687..8ceb452841 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h @@ -18,6 +18,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 @@ -49,4 +52,6 @@ struct in_out_out_result { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h index 531752e931..05d45365eb 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Comp, class _Proj1, class _Proj2> @@ -71,4 +74,6 @@ includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fi _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_INCLUDES_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h index d66ea9b973..011ee028cc 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel> @@ -67,4 +70,6 @@ next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h index a059705125..da748d7255 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _Compare, class _RandomAccessIterator> @@ -114,12 +117,12 @@ __nth_element( while (true) { while (!__comp(*__first, *__i)) { ++__i; - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __i != __last, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); } do { - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __j != __first, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); --__j; @@ -150,13 +153,13 @@ __nth_element( // __m still guards upward moving __i while (__comp(*__i, *__m)) { ++__i; - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __i != __last, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); } // It is now known that a guard exists for downward moving __j do { - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __j != __first, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); --__j; @@ -253,4 +256,6 @@ nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomA _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_NTH_ELEMENT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h index 27511a1242..85a8fdc77a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel> @@ -83,4 +86,6 @@ partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PARTIAL_SORT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h index e7d8df4de8..ef7c9d34d9 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, @@ -98,4 +101,6 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _RandomAccessIterator _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h index e2ceb07bf1..824e49b9ec 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h @@ -19,6 +19,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _Predicate, class _AlgPolicy, class _ForwardIterator, class _Sentinel> @@ -82,4 +85,6 @@ partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PARTITION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h index a93a9875f7..798a1d0993 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h @@ -36,7 +36,8 @@ __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp, typename iterator_traits<_RandomAccessIterator>::difference_type __len) { - _LIBCPP_ASSERT_UNCATEGORIZED(__len > 0, "The heap given to pop_heap must be non-empty"); + // Calling `pop_heap` on an empty range is undefined behavior, but in practice it will be a no-op. + _LIBCPP_ASSERT_PEDANTIC(__len > 0, "The heap given to pop_heap must be non-empty"); __comp_ref_type<_Compare> __comp_ref = __comp; diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h index 3e4bbb3fbb..8d15b68064 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel> @@ -67,4 +70,6 @@ prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PREV_PERMUTATION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_any_all_none_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_any_all_none_of.h index d93fdba222..4b1e0e61b5 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_any_all_none_of.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_any_all_none_of.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -144,4 +147,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_ANY_ALL_NONE_OF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h index ab2e3172b8..14a0d76741 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -194,4 +197,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_TRANSFORM_REDUCE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_copy.h index 19f275a0d5..1069dcec0e 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_copy.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -113,4 +116,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_count.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_count.h index 28806fca06..2781f6bfd3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_count.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_count.h @@ -29,6 +29,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -113,4 +116,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_COUNT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_equal.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_equal.h index b343d26759..d235c0f4f4 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_equal.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_equal.h @@ -21,6 +21,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -167,4 +170,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_EQUAL_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_fill.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_fill.h index 3057dcc04f..488b49a0fe 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_fill.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_fill.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -108,4 +111,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_FILL_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_find.h index adc05ea1a9..5b694db68a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_find.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_find.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -133,4 +136,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_FIND_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_for_each.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_for_each.h index 819a43d685..bb7b5a61a6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_for_each.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_for_each.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -100,4 +103,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_FOR_EACH_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_generate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_generate.h index 56538392d5..7133c6f4f4 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_generate.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_generate.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -106,4 +109,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_GENERATE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_is_partitioned.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_is_partitioned.h index 39cf636933..b654302122 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_is_partitioned.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_is_partitioned.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -69,4 +72,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_IS_PARITTIONED diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_merge.h index ed80145108..3d262db6bc 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_merge.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_merge.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -84,4 +87,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_MERGE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_move.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_move.h index 52baab5759..d8441f1a6c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_move.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_move.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -76,4 +79,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_MOVE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_replace.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_replace.h index 05dee3f6a4..b1caf3fd4a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_replace.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_replace.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -239,4 +242,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_REPLACE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_rotate_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_rotate_copy.h index 33dc9a3635..346aab1d4a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_rotate_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_rotate_copy.h @@ -19,6 +19,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -77,4 +80,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_ROTATE_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_sort.h index 3e71e0aa5a..a931f76811 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_sort.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -74,4 +77,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_SORT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_stable_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_stable_sort.h index c9d375535f..8ea0bb3f9a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_stable_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_stable_sort.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -53,4 +56,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_STABLE_SORT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_transform.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_transform.h index aad59d1f30..f95938782f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_transform.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_transform.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 _LIBCPP_BEGIN_NAMESPACE_STD @@ -112,4 +115,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_PSTL_TRANSFORM_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h index 39a2ae4de0..8976541d59 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_all_of.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -66,4 +69,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_ALL_OF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h index 2ca8531102..7c775f5f64 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_any_of.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -66,4 +69,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_ANY_OF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h index 22008e0f1b..f3b7842d5c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_binary_search.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -65,4 +68,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_BINARY_SEARCH_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h index e6c8620725..f5ef5fd7f2 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_clamp.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -34,8 +37,9 @@ struct __fn { indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less> _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr const _Type& operator()( const _Type& __value, const _Type& __low, const _Type& __high, _Comp __comp = {}, _Proj __proj = {}) const { - _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), - "Bad bounds passed to std::ranges::clamp"); + _LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN( + !bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), + "Bad bounds passed to std::ranges::clamp"); auto&& __projected = std::invoke(__proj, __value); if (std::invoke(__comp, std::forward<decltype(__projected)>(__projected), std::invoke(__proj, __low))) @@ -57,4 +61,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_CLAMP_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_contains.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_contains.h new file mode 100644 index 0000000000..00d0e54019 --- /dev/null +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_contains.h @@ -0,0 +1,66 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___ALGORITHM_RANGES_CONTAINS_H +#define _LIBCPP___ALGORITHM_RANGES_CONTAINS_H + +#include <__algorithm/ranges_find.h> +#include <__config> +#include <__functional/identity.h> +#include <__functional/ranges_operations.h> +#include <__functional/reference_wrapper.h> +#include <__iterator/concepts.h> +#include <__iterator/indirectly_comparable.h> +#include <__iterator/projected.h> +#include <__ranges/access.h> +#include <__ranges/concepts.h> +#include <__utility/move.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + +#if _LIBCPP_STD_VER >= 23 + +_LIBCPP_BEGIN_NAMESPACE_STD + +namespace ranges { +namespace __contains { +struct __fn { + template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity> + requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type*> + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool static + operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) { + return ranges::find(std::move(__first), __last, __value, std::ref(__proj)) != __last; + } + + template <input_range _Range, class _Type, class _Proj = identity> + requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*> + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool static + operator()(_Range&& __range, const _Type& __value, _Proj __proj = {}) { + return ranges::find(ranges::begin(__range), ranges::end(__range), __value, std::ref(__proj)) != + ranges::end(__range); + } +}; +} // namespace __contains + +inline namespace __cpo { +inline constexpr auto contains = __contains::__fn{}; +} // namespace __cpo +} // namespace ranges + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP_STD_VER >= 23 + +_LIBCPP_POP_MACROS + +#endif // _LIBCPP___ALGORITHM_RANGES_CONTAINS_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_contains_subrange.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_contains_subrange.h new file mode 100644 index 0000000000..4cd03cbb53 --- /dev/null +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_contains_subrange.h @@ -0,0 +1,99 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___ALGORITHM_RANGES_CONTAINS_SUBRANGE_H +#define _LIBCPP___ALGORITHM_RANGES_CONTAINS_SUBRANGE_H + +#include <__algorithm/ranges_search.h> +#include <__config> +#include <__functional/identity.h> +#include <__functional/ranges_operations.h> +#include <__functional/reference_wrapper.h> +#include <__iterator/concepts.h> +#include <__iterator/distance.h> +#include <__iterator/indirectly_comparable.h> +#include <__iterator/projected.h> +#include <__ranges/access.h> +#include <__ranges/concepts.h> +#include <__ranges/subrange.h> +#include <__utility/move.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + +#if _LIBCPP_STD_VER >= 23 + +_LIBCPP_BEGIN_NAMESPACE_STD + +namespace ranges { +namespace __contains_subrange { +struct __fn { + template <forward_iterator _Iter1, + sentinel_for<_Iter1> _Sent1, + forward_iterator _Iter2, + sentinel_for<_Iter2> _Sent2, + class _Pred = ranges::equal_to, + class _Proj1 = identity, + class _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool static operator()( + _Iter1 __first1, + _Sent1 __last1, + _Iter2 __first2, + _Sent2 __last2, + _Pred __pred = {}, + _Proj1 __proj1 = {}, + _Proj2 __proj2 = {}) { + auto __n2 = ranges::distance(__first2, __last2); + if (__n2 == 0) + return true; + + auto __ret = ranges::search( + std::move(__first1), __last1, std::move(__first2), __last2, __pred, std::ref(__proj1), std::ref(__proj2)); + return __ret.empty() == false; + } + + template <forward_range _Range1, + forward_range _Range2, + class _Pred = ranges::equal_to, + class _Proj1 = identity, + class _Proj2 = identity> + requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2> + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr bool static + operator()(_Range1&& __range1, _Range2&& __range2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) { + auto __n2 = 0; + if constexpr (sized_range<_Range2>) { + __n2 = ranges::size(__range2); + } else { + __n2 = std::distance(cbegin(__range2), cend(__range2)); + } + if (__n2 == 0) + return true; + + auto __ret = ranges::search(__range1, __range2, __pred, std::ref(__proj1), std::ref(__proj2)); + return __ret.empty() == false; + } +}; +} // namespace __contains_subrange + +inline namespace __cpo { +inline constexpr auto contains_subrange = __contains_subrange::__fn{}; +} // namespace __cpo +} // namespace ranges + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP_STD_VER >= 23 + +_LIBCPP_POP_MACROS + +#endif // _LIBCPP___ALGORITHM_RANGES_CONTAINS_SUBRANGE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h index 1c87f074e7..e1d6d32f05 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -63,4 +66,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h index 865e944d43..93e3260425 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_backward.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -61,4 +64,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_COPY_BACKWARD_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h index b77dbd37fc..4b41d2154e 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_if.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -79,4 +82,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_COPY_IF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h index 99e8eee14d..4353fa9927 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_copy_n.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 @@ -73,4 +76,6 @@ inline constexpr auto copy_n = __copy_n::__fn{}; _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_COPY_N_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h index 4c8f1b2cbe..a8965c1b96 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -58,4 +61,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_COUNT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h index 92f37d049e..71b942dd53 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_count_if.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -71,4 +74,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_COUNT_IF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_ends_with.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_ends_with.h index 2afb74bff0..c2a3cae9f3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_ends_with.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_ends_with.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 23 _LIBCPP_BEGIN_NAMESPACE_STD @@ -193,4 +196,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 23 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_ENDS_WITH_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h index 4cb1f7df19..31c7ee261d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -101,4 +104,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h index 1ff8856ca0..4c1c3834ba 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_equal_range.h @@ -30,6 +30,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -72,4 +75,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h index 88a892f5c2..7a177d85e9 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill.h @@ -20,6 +20,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -54,4 +57,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FILL_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h index dbd8ec27ae..a6e988c008 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_fill_n.h @@ -17,6 +17,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -45,4 +48,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FILL_N_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h index de870e3811..7459fad717 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -72,4 +75,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FIND_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h index 2c57ad424b..0bda4f3e1c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_end.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -95,4 +98,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FIND_END_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h index ec6d52c632..63a7b8335f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_first_of.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -98,4 +101,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FIND_FIRST_OF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h index af54a5007e..52ae55ce96 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -67,4 +70,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h index a18bea4316..60c6796cbb 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -61,4 +64,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h index 7878ed2670..225dc774c8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -73,4 +76,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FOR_EACH_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h index 53ccb9a603..d1fdca34cc 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_for_each_n.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -56,4 +59,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_FOR_EACH_N_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h index 3ff1e13c42..e6467198e6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -65,4 +68,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h index c025c621a1..cd5fd7483a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_generate_n.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -57,4 +60,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h index aa35080c8c..0bc4c043bd 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_includes.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -90,4 +93,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_INCLUDES_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h index 86001b003d..d94c0ad465 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_inplace_merge.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -76,4 +79,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_INPLACE_MERGE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h index f298c347b7..122368c90d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -73,4 +76,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_IS_HEAP_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h index 73f13fb504..b2705d37a6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_heap_until.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -73,4 +76,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_IS_HEAP_UNTIL_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h index 76db870efc..c6a585c9f5 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_partitioned.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -78,4 +81,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_IS_PARTITIONED_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h index 2b99839bc6..e0423d722b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_permutation.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -99,4 +102,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_IS_PERMUTATION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h index 3eb2c768d6..d71035d5aa 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -59,4 +62,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP__ALGORITHM_RANGES_IS_SORTED_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h index 19e9875d27..dcfb6a4e18 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_is_sorted_until.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -74,4 +77,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP__ALGORITHM_RANGES_IS_SORTED_UNTIL_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h index 9a92030403..2af891d3af 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_iterator_concept.h @@ -18,6 +18,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -48,4 +51,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_ITERATOR_CONCEPT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h index 5b843dfd7b..90e96b5465 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lexicographical_compare.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -98,4 +101,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h index 58b3f815b9..ab1f80e7ab 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_lower_bound.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -65,4 +68,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_LOWER_BOUND_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h index f17eabff43..fe9c024fbf 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_make_heap.h @@ -32,6 +32,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -77,4 +80,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_MAKE_HEAP_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h index 782ce2670f..c63656de51 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max.h @@ -54,7 +54,8 @@ struct __fn { indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less> _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const { - _LIBCPP_ASSERT_UNCATEGORIZED(__il.begin() != __il.end(), "initializer_list must contain at least one element"); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( + __il.begin() != __il.end(), "initializer_list must contain at least one element"); auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) -> bool { return std::invoke(__comp, __rhs, __lhs); }; return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp_lhs_rhs_swapped, __proj); @@ -69,7 +70,7 @@ struct __fn { auto __first = ranges::begin(__r); auto __last = ranges::end(__r); - _LIBCPP_ASSERT_UNCATEGORIZED(__first != __last, "range must contain at least one element"); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__first != __last, "range must contain at least one element"); if constexpr (forward_range<_Rp> && !__is_cheap_to_copy<range_value_t<_Rp>>) { auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) -> bool { @@ -97,6 +98,6 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS -#endif // _LIBCPP_STD_VER >= 20 && +#endif // _LIBCPP_STD_VER >= 20 #endif // _LIBCPP___ALGORITHM_RANGES_MAX_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h index 2ba97042f1..83adf49b61 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -61,4 +64,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h index 7f49154ec9..bdf9a62d90 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_merge.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -130,4 +133,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_MERGE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h index be15b45367..e8f97f2754 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min.h @@ -53,7 +53,8 @@ struct __fn { indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less> _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const { - _LIBCPP_ASSERT_UNCATEGORIZED(__il.begin() != __il.end(), "initializer_list must contain at least one element"); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( + __il.begin() != __il.end(), "initializer_list must contain at least one element"); return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp, __proj); } @@ -65,7 +66,7 @@ struct __fn { operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const { auto __first = ranges::begin(__r); auto __last = ranges::end(__r); - _LIBCPP_ASSERT_UNCATEGORIZED(__first != __last, "range must contain at least one element"); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__first != __last, "range must contain at least one element"); if constexpr (forward_range<_Rp> && !__is_cheap_to_copy<range_value_t<_Rp>>) { return *ranges::__min_element_impl(__first, __last, __comp, __proj); } else { @@ -89,6 +90,6 @@ _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS -#endif // _LIBCPP_STD_VER >= 20 && +#endif // _LIBCPP_STD_VER >= 20 #endif // _LIBCPP___ALGORITHM_RANGES_MIN_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h index 07826a0e6b..4b9cb76da5 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -73,4 +76,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h index a5b5cf9bd0..22a62b620c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax.h @@ -65,7 +65,8 @@ struct __fn { indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less> _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_result<_Type> operator()(initializer_list<_Type> __il, _Comp __comp = {}, _Proj __proj = {}) const { - _LIBCPP_ASSERT_UNCATEGORIZED(__il.begin() != __il.end(), "initializer_list has to contain at least one element"); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( + __il.begin() != __il.end(), "initializer_list has to contain at least one element"); auto __iters = std::__minmax_element_impl(__il.begin(), __il.end(), __comp, __proj); return ranges::minmax_result<_Type>{*__iters.first, *__iters.second}; } @@ -80,7 +81,7 @@ struct __fn { auto __last = ranges::end(__r); using _ValueT = range_value_t<_Range>; - _LIBCPP_ASSERT_UNCATEGORIZED(__first != __last, "range has to contain at least one element"); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__first != __last, "range has to contain at least one element"); if constexpr (forward_range<_Range>) { // Special-case the one element case. Avoid repeatedly initializing objects from the result of an iterator diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h index a52319f6b5..5132856ebc 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_minmax_element.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -70,4 +73,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_MINMAX_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h index db9bfc8e87..037af39126 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 @@ -86,4 +89,6 @@ constexpr inline auto mismatch = __mismatch::__fn{}; _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_MISMATCH_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h index 8bd2409f89..be869f36c9 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -66,4 +69,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_MOVE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h index ee390a40e4..6d4071a33b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_move_backward.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -68,4 +71,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_MOVE_BACKWARD_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h index 9ebab3ea7c..18535e0a62 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_next_permutation.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -70,4 +73,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_NEXT_PERMUTATION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h index b0d363895e..59bd87997d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_none_of.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -67,4 +70,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_NONE_OF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h index 7abdbd0889..90ade9efe1 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_nth_element.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -76,4 +79,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_NTH_ELEMENT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h index 9ec8882097..c67247d2e0 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort.h @@ -33,6 +33,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -74,4 +77,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h index eba7d9ac41..b3bdeb78fb 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partial_sort_copy.h @@ -30,6 +30,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -106,4 +109,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h index 89d192b51f..a67ac4c967 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition.h @@ -32,6 +32,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -80,4 +83,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h index 6a16b02db3..d60c865dd2 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_copy.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -102,4 +105,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h index 6fc20e7d00..c5b11b5fed 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_partition_point.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -85,4 +88,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_POINT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h index 364cfe94b1..01f92c0f22 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_pop_heap.h @@ -32,6 +32,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -78,4 +81,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_POP_HEAP_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h index ae7a68cce5..225cee9b75 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_prev_permutation.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -70,4 +73,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_PREV_PERMUTATION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h index 1ed9c953f5..9d187af38c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_push_heap.h @@ -32,6 +32,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -77,4 +80,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_PUSH_HEAP_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h index e27c4bdd73..315bed8fba 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -60,4 +63,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h index 5158a78e48..84529eceac 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -73,4 +76,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h index c07b4813d7..56fe017533 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_copy_if.h @@ -29,6 +29,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -87,4 +90,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_IF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h index 4b7aa2d2be..943dbdd738 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_remove_if.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -81,4 +84,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_IF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h index b66a41aa8d..2b88dc0329 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -60,4 +63,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h index a762702481..633f993e5c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -85,4 +88,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h index 10ed1fda6c..e065c3ac0a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_copy_if.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -90,4 +93,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_IF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h index 519fa32029..6445f42aea 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_replace_if.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -73,4 +76,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_IF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h index 35b9edba0b..60043787a7 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_reverse_copy.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -62,4 +65,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_REVERSE_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h index ebed9bbd54..8d33a6f079 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -63,4 +66,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_ROTATE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h index ab76c0944c..26fe110b53 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_rotate_copy.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -60,4 +63,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_ROTATE_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h index d347d82205..e4f60a7b66 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sample.h @@ -27,6 +27,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -66,4 +69,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SAMPLE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h index 4e53f30f71..4c1d73d8e6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_search_n.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -108,4 +111,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h index a9453ed336..0841fb4ffd 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_difference.h @@ -30,6 +30,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -100,4 +103,7 @@ inline constexpr auto set_difference = __set_difference::__fn{}; _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 + +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SET_DIFFERENCE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h index 4cdcbb7505..9427379745 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_intersection.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -105,4 +108,7 @@ inline constexpr auto set_intersection = __set_intersection::__fn{}; _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 + +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h index d8710a1c47..995eb0999d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_symmetric_difference.h @@ -28,6 +28,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -105,4 +108,7 @@ inline constexpr auto set_symmetric_difference = __set_symmetric_difference::__f _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 + +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h index c627166fff..e870e390cc 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_set_union.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -107,4 +110,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SET_UNION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h index fca420058d..ab98ea22ca 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_shuffle.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -64,4 +67,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h index 2ad0e0c233..0296c146b3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -76,4 +79,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SORT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h index 365c7dba61..bab30df170 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_sort_heap.h @@ -32,6 +32,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -77,4 +80,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SORT_HEAP_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h index 44937fa589..f34027ff77 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_partition.h @@ -34,6 +34,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -84,4 +87,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_STABLE_PARTITION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h index a4eed38363..93909e253c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_stable_sort.h @@ -31,6 +31,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -74,4 +77,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_STABLE_SORT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_starts_with.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_starts_with.h index 7da78001d8..90e184aa9b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_starts_with.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_starts_with.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 23 _LIBCPP_BEGIN_NAMESPACE_STD @@ -87,4 +90,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 23 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_STARTS_WITH_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h index 1d0ebc0d52..b6d9f61839 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -62,4 +65,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h index f66a07ac02..7850ec4f84 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_transform.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -169,4 +172,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_TRANSFORM_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h index b17e01fc50..7340310eb3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique.h @@ -32,6 +32,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -74,4 +77,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_UNIQUE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h index 7e89f9d97a..61133885ae 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_unique_copy.h @@ -32,6 +32,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 20 _LIBCPP_BEGIN_NAMESPACE_STD @@ -112,4 +115,6 @@ _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP_STD_VER >= 20 +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_RANGES_UNIQUE_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h index 2b9d4ff26e..1498852c43 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h @@ -18,6 +18,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _ForwardIterator, class _Tp> @@ -38,4 +41,6 @@ remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_REMOVE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h index 6eceddce8d..c77b78023f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h @@ -17,6 +17,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _ForwardIterator, class _Predicate> @@ -37,4 +40,6 @@ remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_REMOVE_IF_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h index 6bd0aa3932..4167c9116d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h @@ -19,6 +19,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _BidirectionalIterator> @@ -54,4 +57,6 @@ reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_REVERSE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h index d8162b1a94..9a4d07883e 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _ForwardIterator> @@ -190,4 +193,6 @@ rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __l _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_ROTATE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sample.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sample.h index cc29dd686f..ebe5180b7e 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sample.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sample.h @@ -89,7 +89,7 @@ _LIBCPP_HIDE_FROM_ABI _SampleIterator __sample( _SampleIterator __output_iter, _Distance __n, _UniformRandomNumberGenerator& __g) { - _LIBCPP_ASSERT_UNCATEGORIZED(__n >= 0, "N must be a positive number."); + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n >= 0, "N must be a positive number."); using _PopIterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_PopulationIterator>; using _Difference = typename _IterOps<_AlgPolicy>::template __difference_type<_PopulationIterator>; diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h index 75f936d0f2..8557c76f80 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h @@ -117,17 +117,18 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __searc } } -template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2> +template <class _Iter1, + class _Sent1, + class _Iter2, + class _Sent2, + class _Pred, + class _Proj1, + class _Proj2, + __enable_if_t<__has_random_access_iterator_category<_Iter1>::value && + __has_random_access_iterator_category<_Iter2>::value, + int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_impl( - _Iter1 __first1, - _Sent1 __last1, - _Iter2 __first2, - _Sent2 __last2, - _Pred& __pred, - _Proj1& __proj1, - _Proj2& __proj2, - __enable_if_t<__has_random_access_iterator_category<_Iter1>::value && - __has_random_access_iterator_category<_Iter2>::value>* = nullptr) { + _Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) { auto __size2 = __last2 - __first2; if (__size2 == 0) return std::make_pair(__first1, __first1); @@ -141,18 +142,20 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __searc __first1, __last1, __first2, __last2, __pred, __proj1, __proj2, __size1, __size2); } -template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2> -_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_impl( - _Iter1 __first1, - _Sent1 __last1, - _Iter2 __first2, - _Sent2 __last2, - _Pred& __pred, - _Proj1& __proj1, - _Proj2& __proj2, +template < + class _Iter1, + class _Sent1, + class _Iter2, + class _Sent2, + class _Pred, + class _Proj1, + class _Proj2, __enable_if_t<__has_forward_iterator_category<_Iter1>::value && __has_forward_iterator_category<_Iter2>::value && - !(__has_random_access_iterator_category<_Iter1>::value && - __has_random_access_iterator_category<_Iter2>::value)>* = nullptr) { + !(__has_random_access_iterator_category<_Iter1>::value && + __has_random_access_iterator_category<_Iter2>::value), + int> = 0> +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_impl( + _Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) { return std::__search_forward_impl<_ClassicAlgPolicy>(__first1, __last1, __first2, __last2, __pred, __proj1, __proj2); } diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h index c3c01e700b..12007fa7de 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h @@ -108,29 +108,30 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 std::pair<_Iter, _Iter> __se } } -template <class _Iter, class _Sent, class _DiffT, class _Type, class _Pred, class _Proj> -_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter, _Iter> __search_n_impl( - _Iter __first, - _Sent __last, - _DiffT __count, - const _Type& __value, - _Pred& __pred, - _Proj& __proj, - __enable_if_t<__has_random_access_iterator_category<_Iter>::value>* = nullptr) { +template <class _Iter, + class _Sent, + class _DiffT, + class _Type, + class _Pred, + class _Proj, + __enable_if_t<__has_random_access_iterator_category<_Iter>::value, int> = 0> +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter, _Iter> +__search_n_impl(_Iter __first, _Sent __last, _DiffT __count, const _Type& __value, _Pred& __pred, _Proj& __proj) { return std::__search_n_random_access_impl<_ClassicAlgPolicy>( __first, __last, __count, __value, __pred, __proj, __last - __first); } -template <class _Iter1, class _Sent1, class _DiffT, class _Type, class _Pred, class _Proj> -_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_n_impl( - _Iter1 __first, - _Sent1 __last, - _DiffT __count, - const _Type& __value, - _Pred& __pred, - _Proj& __proj, - __enable_if_t<__has_forward_iterator_category<_Iter1>::value && - !__has_random_access_iterator_category<_Iter1>::value>* = nullptr) { +template <class _Iter1, + class _Sent1, + class _DiffT, + class _Type, + class _Pred, + class _Proj, + __enable_if_t<__has_forward_iterator_category<_Iter1>::value && + !__has_random_access_iterator_category<_Iter1>::value, + int> = 0> +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> +__search_n_impl(_Iter1 __first, _Sent1 __last, _DiffT __count, const _Type& __value, _Pred& __pred, _Proj& __proj) { return std::__search_n_forward_impl<_ClassicAlgPolicy>(__first, __last, __count, __value, __pred, __proj); } diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h index a924702ce5..f414bcecb5 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h @@ -25,6 +25,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _Comp, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter> @@ -71,4 +74,6 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_d _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SET_DIFFERENCE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h index f2603fe136..73d888d1b0 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h @@ -21,6 +21,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _InIter1, class _InIter2, class _OutIter> @@ -95,4 +98,6 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_i _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SET_INTERSECTION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h index 832c3979bf..db36665a61 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _InIter1, class _InIter2, class _OutIter> @@ -101,4 +104,6 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_symmetri _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h index cf48adae03..a79c50fd3c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _InIter1, class _InIter2, class _OutIter> @@ -97,4 +100,6 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator set_union( _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SET_UNION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_left.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_left.h index 645c58c291..06cd7c5f87 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_left.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_left.h @@ -17,6 +17,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 @@ -51,4 +54,6 @@ shift_left(_ForwardIterator __first, _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SHIFT_LEFT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h index 73ef98bd39..01853057fc 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h @@ -20,6 +20,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 @@ -97,4 +100,6 @@ shift_right(_ForwardIterator __first, _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SHIFT_RIGHT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h index 7f152e4dbd..42803e3063 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h @@ -85,7 +85,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator __floy _Compare&& __comp, typename iterator_traits<_RandomAccessIterator>::difference_type __len) { using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type; - _LIBCPP_ASSERT_UNCATEGORIZED(__len >= 2, "shouldn't be called unless __len >= 2"); + _LIBCPP_ASSERT_INTERNAL(__len >= 2, "shouldn't be called unless __len >= 2"); _RandomAccessIterator __hole = __first; _RandomAccessIterator __child_i = __first; diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h index 1b878c33c7..8a5e0211cd 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h @@ -39,6 +39,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD // stable, 2-3 compares, 0-2 swaps @@ -325,7 +328,7 @@ __insertion_sort_unguarded(_RandomAccessIterator const __first, _RandomAccessIte do { *__j = _Ops::__iter_move(__k); __j = __k; - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __k != __leftmost, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); } while (__comp(__t, *--__k)); // No need for bounds check due to the assumption stated above. @@ -533,7 +536,7 @@ __bitset_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, using _Ops = _IterOps<_AlgPolicy>; typedef typename std::iterator_traits<_RandomAccessIterator>::value_type value_type; typedef typename std::iterator_traits<_RandomAccessIterator>::difference_type difference_type; - _LIBCPP_ASSERT_UNCATEGORIZED(__last - __first >= difference_type(3), ""); + _LIBCPP_ASSERT_INTERNAL(__last - __first >= difference_type(3), ""); const _RandomAccessIterator __begin = __first; // used for bounds checking, those are not moved around const _RandomAccessIterator __end = __last; (void)__end; // @@ -544,7 +547,7 @@ __bitset_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, // Not guarded since we know the last element is greater than the pivot. do { ++__first; - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __first != __end, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); } while (!__comp(__pivot, *__first)); @@ -557,7 +560,7 @@ __bitset_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, // It will be always guarded because __introsort will do the median-of-three // before calling this. do { - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __last != __begin, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); --__last; @@ -625,7 +628,7 @@ __partition_with_equals_on_right(_RandomAccessIterator __first, _RandomAccessIte using _Ops = _IterOps<_AlgPolicy>; typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; typedef typename std::iterator_traits<_RandomAccessIterator>::value_type value_type; - _LIBCPP_ASSERT_UNCATEGORIZED(__last - __first >= difference_type(3), ""); + _LIBCPP_ASSERT_INTERNAL(__last - __first >= difference_type(3), ""); const _RandomAccessIterator __begin = __first; // used for bounds checking, those are not moved around const _RandomAccessIterator __end = __last; (void)__end; // @@ -635,7 +638,7 @@ __partition_with_equals_on_right(_RandomAccessIterator __first, _RandomAccessIte // this. do { ++__first; - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __first != __end, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); } while (__comp(*__first, __pivot)); @@ -647,7 +650,7 @@ __partition_with_equals_on_right(_RandomAccessIterator __first, _RandomAccessIte } else { // Guarded. do { - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __last != __begin, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); --__last; @@ -665,12 +668,12 @@ __partition_with_equals_on_right(_RandomAccessIterator __first, _RandomAccessIte _Ops::iter_swap(__first, __last); do { ++__first; - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __first != __end, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); } while (__comp(*__first, __pivot)); do { - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __last != __begin, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); --__last; @@ -702,7 +705,7 @@ __partition_with_equals_on_left(_RandomAccessIterator __first, _RandomAccessIter // Guarded. do { ++__first; - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __first != __end, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); } while (!__comp(__pivot, *__first)); @@ -715,7 +718,7 @@ __partition_with_equals_on_left(_RandomAccessIterator __first, _RandomAccessIter // It will be always guarded because __introsort will do the // median-of-three before calling this. do { - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __last != __begin, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); --__last; @@ -725,12 +728,12 @@ __partition_with_equals_on_left(_RandomAccessIterator __first, _RandomAccessIter _Ops::iter_swap(__first, __last); do { ++__first; - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __first != __end, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); } while (!__comp(__pivot, *__first)); do { - _LIBCPP_ASSERT_UNCATEGORIZED( + _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS( __last != __begin, "Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?"); --__last; @@ -1009,4 +1012,6 @@ sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SORT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h index 0a6d992d00..060fc33c3c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h @@ -24,6 +24,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _Compare, class _RandomAccessIterator> @@ -55,4 +58,6 @@ sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SORT_HEAP_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h index 8762abcf18..8bb1eaf2d2 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h @@ -26,6 +26,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _Distance, class _Pair> @@ -299,4 +302,6 @@ stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate _ _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_STABLE_PARTITION_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h index ffc6e4ce28..9be192bd65 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h @@ -29,6 +29,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD template <class _AlgPolicy, class _Compare, class _BidirectionalIterator> @@ -265,4 +268,6 @@ inline _LIBCPP_HIDE_FROM_ABI void stable_sort(_RandomAccessIterator __first, _Ra _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_STABLE_SORT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h index 7fab5c49a6..54b453b723 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h @@ -18,6 +18,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD // 2+2 iterators: the shorter size will be used. @@ -54,4 +57,6 @@ swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardItera _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_SWAP_RANGES_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/three_way_comp_ref_type.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/three_way_comp_ref_type.h index 8fd15c5d66..70c5818976 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/three_way_comp_ref_type.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/three_way_comp_ref_type.h @@ -50,14 +50,14 @@ struct __debug_three_way_comp { __expected = _Order::greater; if (__o == _Order::greater) __expected = _Order::less; - _LIBCPP_ASSERT_UNCATEGORIZED(__comp_(__l, __r) == __expected, "Comparator does not induce a strict weak ordering"); + _LIBCPP_ASSERT_SEMANTIC_REQUIREMENT( + __comp_(__l, __r) == __expected, "Comparator does not induce a strict weak ordering"); (void)__l; (void)__r; } }; -// Pass the comparator by lvalue reference. Or in debug mode, using a -// debugging wrapper that stores a reference. +// Pass the comparator by lvalue reference. Or in the debug mode, using a debugging wrapper that stores a reference. # if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG template <class _Comp> using __three_way_comp_ref_type = __debug_three_way_comp<_Comp>; diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h index 1717a00c8a..056373d06f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h @@ -21,6 +21,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD // unique @@ -56,4 +59,6 @@ unique(_ForwardIterator __first, _ForwardIterator __last) { _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_UNIQUE_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h index 81fcd50f01..16ce80cab3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h @@ -23,6 +23,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD namespace __unique_copy_tags { @@ -119,4 +122,6 @@ unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __res _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_UNIQUE_COPY_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h index a298a2b271..50d815c970 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h @@ -80,6 +80,6 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _OrigIter __rewrap_iter(_OrigIter __orig _LIBCPP_END_NAMESPACE_STD -_LIBCPP_PUSH_MACROS +_LIBCPP_POP_MACROS #endif // _LIBCPP___ALGORITHM_UNWRAP_ITER_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h index 053fd550b3..2d4b9bb554 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_range.h @@ -22,6 +22,9 @@ # pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD // __unwrap_range and __rewrap_range are used to unwrap ranges which may have different iterator and sentinel types. @@ -91,4 +94,6 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter, _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP___ALGORITHM_UNWRAP_RANGE_H |