aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2023-09-27 19:43:57 +0300
committermikhnenko <mikhnenko@yandex-team.com>2023-09-27 20:05:15 +0300
commit48a18a64bb612e73011e1c49aef96b8dad6bffba (patch)
tree88f71d26ed4c98edd9b389e3c5f1f674f34942ac /contrib
parenta78a2d51f5c2eda80188caf7a1045a5c8bdce1b3 (diff)
downloadydb-48a18a64bb612e73011e1c49aef96b8dad6bffba.tar.gz
Upd libc++ to d0af4276d62418ba9e54fec99b293d2fd7c92213 (14 Mar 2022)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_out_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_out_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h63
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h71
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h63
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h71
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h85
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h33
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__assert11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__availability9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__bit/byteswap.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/compare_partial_order_fallback.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/compare_strong_order_fallback.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/compare_weak_order_fallback.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/partial_order.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/strong_order.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/weak_order.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/arithmetic.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/boolean_testable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/common_reference_with.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/common_with.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/constructible.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/convertible_to.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/copyable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/derived_from.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/destructible.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/different_from.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/invocable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/movable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/predicate.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/regular.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/relation.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/same_as.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/semiregular.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__concepts/totally_ordered.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__config85
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_args.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_context.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_string.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter.h9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h20
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/function.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__hash_table2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h33
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/indirectly_comparable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h42
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/next.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/size.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/unreachable_sentinel.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__locale1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/uniform_random_bit_generator.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/access.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/all.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/dangling.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/data.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/enable_borrowed_range.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/size.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__string32
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__tree1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/cmp.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/pair.h10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/algorithm45
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/any5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/array3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/barrier34
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/bitset2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/charconv123
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cstdlib6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ctime18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/deque2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/format7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/fstream3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/functional1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/future1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/iomanip113
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ios1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/istream2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/iterator1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/latch5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/list2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/map2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/memory1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/optional3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ranges1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/regex9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/span120
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/sstream1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string_view29
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/tuple16
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/type_traits4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/typeindex1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/uchar.h52
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/variant11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/vector5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/version8
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h15
-rw-r--r--contrib/libs/cxxsupp/libcxx/ya.make4
173 files changed, 1047 insertions, 812 deletions
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 3e90e9adae..b893dbece0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
@@ -9,7 +9,6 @@
#ifndef _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
#define _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
-#include <__assert>
#include <__config>
#include <__debug>
#include <__utility/declval.h>
@@ -53,7 +52,7 @@ struct __debug_less
decltype((void)declval<_Compare&>()(
declval<_LHS const&>(), declval<_RHS const&>()))
__do_compare_assert(int, _LHS & __l, _RHS & __r) {
- _LIBCPP_ASSERT(!__comp_(__l, __r),
+ _LIBCPP_DEBUG_ASSERT(!__comp_(__l, __r),
"Comparator does not induce a strict weak ordering");
(void)__l;
(void)__r;
@@ -69,10 +68,10 @@ template <class _Comp>
struct __comp_ref_type {
// Pass the comparator by lvalue reference. Or in debug mode, using a
// debugging wrapper that stores a reference.
-#if _LIBCPP_DEBUG_LEVEL == 0
- typedef _Comp& type;
-#else
+#if _LIBCPP_DEBUG_LEVEL == 2
typedef __debug_less<_Comp> type;
+#else
+ typedef _Comp& type;
#endif
};
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 08ebf2fbcc..0864d7c62c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_found_result.h
@@ -18,7 +18,7 @@
# pragma GCC system_header
#endif
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -44,6 +44,6 @@ struct in_found_result {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_HAS_NO_CONCEPTS
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
#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 d5186e11b7..d502df234a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_HAS_NO_CONCEPTS
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template <class _Ip, class _Fp>
@@ -42,7 +42,7 @@ struct in_fun_result {
};
} // namespace ranges
-#endif // _LIBCPP_HAS_NO_RANGES
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
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 f7cb698472..9becf4091d 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
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
@@ -47,7 +47,7 @@ struct in_in_out_result {
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
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 159092189a..80e69a6474 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_in_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -44,7 +44,7 @@ struct in_in_result {
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
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 9788fbfa2e..2125edf2f2 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
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_HAS_NO_CONCEPTS
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template <class _I1, class _O1, class _O2>
@@ -45,7 +45,7 @@ struct in_out_out_result {
};
} // namespace ranges
-#endif // _LIBCPP_HAS_NO_CONCEPTS
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h
index fd394a3621..03e9080871 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
@@ -47,7 +47,7 @@ struct in_out_result {
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h
index 1d56a741f5..6640866c5b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_max_result.h
@@ -23,7 +23,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if!defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
@@ -47,7 +47,7 @@ struct min_max_result {
} // namespace ranges
-#endif
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h
index 2a69f6ee47..2932a5e31d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h
@@ -11,10 +11,11 @@
#include <__algorithm/comp.h>
#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/push_heap.h>
#include <__algorithm/sift_down.h>
#include <__config>
#include <__iterator/iterator_traits.h>
-#include <__utility/swap.h>
+#include <__utility/move.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -28,10 +29,21 @@ void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len)
{
+ using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
+
if (__len > 1)
{
- swap(*__first, *--__last);
- _VSTD::__sift_down<_Compare>(__first, __comp, __len - 1, __first);
+ value_type __top = std::move(*__first); // create a hole at __first
+ _RandomAccessIterator __hole = std::__floyd_sift_down<_Compare>(__first, __comp, __len);
+ --__last;
+ if (__hole == __last) {
+ *__hole = std::move(__top);
+ } else {
+ *__hole = std::move(*__last);
+ ++__hole;
+ *__last = std::move(__top);
+ std::__sift_up<_Compare>(__first, __hole, __comp, __hole - __first);
+ }
}
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h
new file mode 100644
index 0000000000..ca6d2f4382
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find.h
@@ -0,0 +1,63 @@
+//===----------------------------------------------------------------------===//
+//
+// 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_FIND_H
+#define _LIBCPP___ALGORITHM_RANGES_FIND_H
+
+#include <__algorithm/ranges_find_if.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__functional/ranges_operations.h>
+#include <__iterator/concepts.h>
+#include <__iterator/projected.h>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/forward.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+namespace __find {
+struct __fn {
+ template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Tp, class _Proj = identity>
+ requires indirect_binary_predicate<ranges::equal_to, projected<_Ip, _Proj>, const _Tp*>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ _Ip operator()(_Ip __first, _Sp __last, const _Tp& __value, _Proj __proj = {}) const {
+ auto __pred = [&](auto&& __e) { return std::forward<decltype(__e)>(__e) == __value; };
+ return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred, __proj);
+ }
+
+ template <input_range _Rp, class _Tp, class _Proj = identity>
+ requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Rp>, _Proj>, const _Tp*>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ borrowed_iterator_t<_Rp> operator()(_Rp&& __r, const _Tp& __value, _Proj __proj = {}) const {
+ auto __pred = [&](auto&& __e) { return std::forward<decltype(__e)>(__e) == __value; };
+ return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
+ }
+};
+} // namespace __find
+
+inline namespace __cpo {
+ inline constexpr auto find = __find::__fn{};
+} // namespace __cpo
+} // namespace ranges
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+#endif // _LIBCPP___ALGORITHM_RANGES_FIND_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
new file mode 100644
index 0000000000..65ac122f66
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if.h
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+// 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_FIND_IF_H
+#define _LIBCPP___ALGORITHM_RANGES_FIND_IF_H
+
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__functional/ranges_operations.h>
+#include <__iterator/concepts.h>
+#include <__iterator/projected.h>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+
+template <class _Ip, class _Sp, class _Pred, class _Proj>
+_LIBCPP_HIDE_FROM_ABI static constexpr
+_Ip __find_if_impl(_Ip __first, _Sp __last, _Pred& __pred, _Proj& __proj) {
+ for (; __first != __last; ++__first) {
+ if (std::invoke(__pred, std::invoke(__proj, *__first)))
+ break;
+ }
+ return __first;
+}
+
+namespace __find_if {
+struct __fn {
+
+ template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
+ indirect_unary_predicate<projected<_Ip, _Proj>> _Pred>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ _Ip operator()(_Ip __first, _Sp __last, _Pred __pred, _Proj __proj = {}) const {
+ return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred, __proj);
+ }
+
+ template <input_range _Rp, class _Proj = identity,
+ indirect_unary_predicate<projected<iterator_t<_Rp>, _Proj>> _Pred>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Pred __pred, _Proj __proj = {}) const {
+ return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
+ }
+};
+} // namespace __find_if
+
+inline namespace __cpo {
+ inline constexpr auto find_if = __find_if::__fn{};
+} // namespace __cpo
+} // namespace ranges
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+#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
new file mode 100644
index 0000000000..9a1adf71fc
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_find_if_not.h
@@ -0,0 +1,63 @@
+//===----------------------------------------------------------------------===//
+//
+// 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_FIND_IF_NOT_H
+#define _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H
+
+#include <__algorithm/ranges_find_if.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__functional/ranges_operations.h>
+#include <__iterator/concepts.h>
+#include <__iterator/projected.h>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/forward.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+namespace __find_if_not {
+struct __fn {
+ template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
+ indirect_unary_predicate<projected<_Ip, _Proj>> _Pred>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ _Ip operator()(_Ip __first, _Sp __last, _Pred __pred, _Proj __proj = {}) const {
+ auto __pred2 = [&](auto&& __e) { return !std::invoke(__pred, std::forward<decltype(__e)>(__e)); };
+ return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred2, __proj);
+ }
+
+ template <input_range _Rp, class _Proj = identity,
+ indirect_unary_predicate<projected<iterator_t<_Rp>, _Proj>> _Pred>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Pred __pred, _Proj __proj = {}) const {
+ auto __pred2 = [&](auto&& __e) { return !std::invoke(__pred, std::forward<decltype(__e)>(__e)); };
+ return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred2, __proj);
+ }
+};
+} // namespace __find_if_not
+
+inline namespace __cpo {
+ inline constexpr auto find_if_not = __find_if_not::__fn{};
+} // namespace __cpo
+} // namespace ranges
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+#endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_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
new file mode 100644
index 0000000000..230e513962
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_max_element.h
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+// 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_MAX_ELEMENT_H
+#define _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H
+
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__functional/ranges_operations.h>
+#include <__iterator/concepts.h>
+#include <__iterator/projected.h>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+namespace __max_element {
+struct __fn {
+ template <class _Ip, class _Sp, class _Proj, class _Comp>
+ _LIBCPP_HIDE_FROM_ABI static constexpr
+ _Ip __go(_Ip __first, _Sp __last, _Comp& __comp, _Proj& __proj) {
+ if (__first == __last)
+ return __first;
+
+ _Ip __i = __first;
+ while (++__i != __last)
+ if (std::invoke(__comp, std::invoke(__proj, *__first), std::invoke(__proj, *__i)))
+ __first = __i;
+ return __first;
+ }
+
+ template <forward_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
+ indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ _Ip operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
+ return __go(__first, __last, __comp, __proj);
+ }
+
+ template <forward_range _Rp, class _Proj = identity,
+ indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
+ return __go(ranges::begin(__r), ranges::end(__r), __comp, __proj);
+ }
+};
+} // namespace __max_element
+
+inline namespace __cpo {
+ inline constexpr auto max_element = __max_element::__fn{};
+} // namespace __cpo
+} // namespace ranges
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+#endif // _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_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 82aaeea1c8..70497f484e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h
@@ -24,7 +24,7 @@
# pragma GCC system_header
#endif
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -67,6 +67,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
#endif // _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h
new file mode 100644
index 0000000000..4775daf4f7
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_mismatch.h
@@ -0,0 +1,85 @@
+//===----------------------------------------------------------------------===//
+//
+// 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_MISMATCH_H
+#define _LIBCPP___ALGORITHM_RANGES_MISMATCH_H
+
+#include <__algorithm/in_in_result.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__functional/ranges_operations.h>
+#include <__iterator/concepts.h>
+#include <__iterator/indirectly_comparable.h>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+namespace ranges {
+
+template <class _I1, class _I2>
+using mismatch_result = in_in_result<_I1, _I2>;
+
+namespace __mismatch {
+struct __fn {
+ template <class _I1, class _S1, class _I2, class _S2,
+ class _Pred, class _Proj1, class _Proj2>
+ static _LIBCPP_HIDE_FROM_ABI constexpr
+ mismatch_result<_I1, _I2>
+ __go(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2,
+ _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
+ while (__first1 != __last1 && __first2 != __last2) {
+ if (!std::invoke(__pred, std::invoke(__proj1, *__first1), std::invoke(__proj2, *__first2)))
+ break;
+ ++__first1;
+ ++__first2;
+ }
+ return {std::move(__first1), std::move(__first2)};
+ }
+
+ template <input_iterator _I1, sentinel_for<_I1> _S1,
+ input_iterator _I2, sentinel_for<_I2> _S2,
+ class _Pred = ranges::equal_to, class _Proj1 = identity, class _Proj2 = identity>
+ requires indirectly_comparable<_I1, _I2, _Pred, _Proj1, _Proj2>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ mismatch_result<_I1, _I2> operator()(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2,
+ _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
+ return __go(std::move(__first1), __last1, std::move(__first2), __last2, __pred, __proj1, __proj2);
+ }
+
+ template <input_range _R1, input_range _R2,
+ class _Pred = ranges::equal_to, class _Proj1 = identity, class _Proj2 = identity>
+ requires indirectly_comparable<iterator_t<_R1>, iterator_t<_R2>, _Pred, _Proj1, _Proj2>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ mismatch_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>>
+ operator()(_R1&& __r1, _R2&& __r2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
+ return __go(ranges::begin(__r1), ranges::end(__r1), ranges::begin(__r2), ranges::end(__r2),
+ __pred, __proj1, __proj2);
+ }
+};
+} // namespace __mismatch
+
+inline namespace __cpo {
+ constexpr inline auto mismatch = __mismatch::__fn{};
+} // namespace __cpo
+} // namespace ranges
+
+#endif // _LIBCPP_STD_VER > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_RANGES_MISMATCH_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 59a875ae3b..18067ff3ba 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h
@@ -22,7 +22,7 @@
# pragma GCC system_header
#endif
-#ifndef _LIBCPP_HAS_NO_CONCEPTS
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -64,6 +64,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_HAS_NO_RANGES
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h
index 344c2f8cc9..ec7b999c5b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate.h
@@ -16,6 +16,7 @@
#include <__iterator/iterator_traits.h>
#include <__iterator/next.h>
#include <__iterator/prev.h>
+#include <__utility/move.h>
#include <__utility/swap.h>
#include <iterator>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h
index b636da78b0..0351a1c578 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sift_down.h
@@ -9,6 +9,7 @@
#ifndef _LIBCPP___ALGORITHM_SIFT_DOWN_H
#define _LIBCPP___ALGORITHM_SIFT_DOWN_H
+#include <__assert>
#include <__config>
#include <__iterator/iterator_traits.h>
#include <__utility/move.h>
@@ -73,6 +74,38 @@ __sift_down(_RandomAccessIterator __first, _Compare __comp,
*__start = _VSTD::move(__top);
}
+template <class _Compare, class _RandomAccessIterator>
+_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
+__floyd_sift_down(_RandomAccessIterator __first, _Compare __comp,
+ typename iterator_traits<_RandomAccessIterator>::difference_type __len)
+{
+ using difference_type = typename iterator_traits<_RandomAccessIterator>::difference_type;
+ _LIBCPP_ASSERT(__len >= 2, "shouldn't be called unless __len >= 2");
+
+ _RandomAccessIterator __hole = __first;
+ _RandomAccessIterator __child_i = __first;
+ difference_type __child = 0;
+
+ while (true) {
+ __child_i += difference_type(__child + 1);
+ __child = 2 * __child + 1;
+
+ if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) {
+ // right-child exists and is greater than left-child
+ ++__child_i;
+ ++__child;
+ }
+
+ // swap __hole with its largest child
+ *__hole = std::move(*__child_i);
+ __hole = __child_i;
+
+ // if __hole is now a leaf, we're done
+ if (__child > (__len - 2) / 2)
+ return __hole;
+ }
+}
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___ALGORITHM_SIFT_DOWN_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__assert b/contrib/libs/cxxsupp/libcxx/include/__assert
index d51512dcf3..75763d0374 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__assert
+++ b/contrib/libs/cxxsupp/libcxx/include/__assert
@@ -18,16 +18,9 @@
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1
-# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : ::std::__libcpp_debug_function(::std::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
+# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : ::std::__libcpp_debug_function(::std::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
#else
-# define _LIBCPP_ASSERT_IMPL(x, m) ((void)0)
-#endif
-
-// We do this dance because some of our tests re-define _LIBCPP_ASSERT to something else.
-// In the future, we should find other ways to test our assertions and disallow re-defining
-// _LIBCPP_ASSERT.
-#if !defined(_LIBCPP_ASSERT)
-# define _LIBCPP_ASSERT(x, m) _LIBCPP_ASSERT_IMPL(x, m)
+# define _LIBCPP_ASSERT(x, m) ((void)0)
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__availability b/contrib/libs/cxxsupp/libcxx/include/__availability
index 12eafee99b..b0f52ad1e9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__availability
+++ b/contrib/libs/cxxsupp/libcxx/include/__availability
@@ -164,11 +164,14 @@
# define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
# endif
+ // Note: bad_optional_access & friends were not introduced in the matching
+ // macOS and iOS versions, so the version mismatch between macOS and others
+ // is intended.
# define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS \
__attribute__((availability(macosx,strict,introduced=10.13))) \
- __attribute__((availability(ios,strict,introduced=11.0))) \
- __attribute__((availability(tvos,strict,introduced=11.0))) \
- __attribute__((availability(watchos,strict,introduced=4.0)))
+ __attribute__((availability(ios,strict,introduced=12.0))) \
+ __attribute__((availability(tvos,strict,introduced=12.0))) \
+ __attribute__((availability(watchos,strict,introduced=5.0)))
# define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS \
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
# define _LIBCPP_AVAILABILITY_BAD_ANY_CAST \
diff --git a/contrib/libs/cxxsupp/libcxx/include/__bit/byteswap.h b/contrib/libs/cxxsupp/libcxx/include/__bit/byteswap.h
index 970074ed98..6fa8d48baf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__bit/byteswap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__bit/byteswap.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 20
template <integral _Tp>
_LIBCPP_HIDE_FROM_ABI constexpr _Tp byteswap(_Tp __val) noexcept {
@@ -48,7 +48,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Tp byteswap(_Tp __val) noexcept {
}
}
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 20
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_partial_order_fallback.h b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_partial_order_fallback.h
index b1fd5e82bb..ba746d6c7d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_partial_order_fallback.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_partial_order_fallback.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [cmp.alg]
namespace __compare_partial_order_fallback {
@@ -66,7 +66,7 @@ inline namespace __cpo {
inline constexpr auto compare_partial_order_fallback = __compare_partial_order_fallback::__fn{};
} // namespace __cpo
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_strong_order_fallback.h b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_strong_order_fallback.h
index 9365a1ef03..312a08ef7e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_strong_order_fallback.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_strong_order_fallback.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [cmp.alg]
namespace __compare_strong_order_fallback {
@@ -63,7 +63,7 @@ inline namespace __cpo {
inline constexpr auto compare_strong_order_fallback = __compare_strong_order_fallback::__fn{};
} // namespace __cpo
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way.h b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way.h
index 25563bb7fe..fdbba04a78 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
struct _LIBCPP_TEMPLATE_VIS compare_three_way
{
@@ -34,7 +34,7 @@ struct _LIBCPP_TEMPLATE_VIS compare_three_way
using is_transparent = void;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_weak_order_fallback.h b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_weak_order_fallback.h
index 160e45ecb5..844d676087 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_weak_order_fallback.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_weak_order_fallback.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [cmp.alg]
namespace __compare_weak_order_fallback {
@@ -63,7 +63,7 @@ inline namespace __cpo {
inline constexpr auto compare_weak_order_fallback = __compare_weak_order_fallback::__fn{};
} // namespace __cpo
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/partial_order.h b/contrib/libs/cxxsupp/libcxx/include/__compare/partial_order.h
index ad29701875..970f01b3f1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/partial_order.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/partial_order.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [cmp.alg]
namespace __partial_order {
@@ -64,7 +64,7 @@ inline namespace __cpo {
inline constexpr auto partial_order = __partial_order::__fn{};
} // namespace __cpo
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/strong_order.h b/contrib/libs/cxxsupp/libcxx/include/__compare/strong_order.h
index 49a6106663..67c7b2910b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/strong_order.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/strong_order.h
@@ -29,7 +29,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [cmp.alg]
namespace __strong_order {
@@ -127,7 +127,7 @@ inline namespace __cpo {
inline constexpr auto strong_order = __strong_order::__fn{};
} // namespace __cpo
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h b/contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h
index a5ee5eb6fb..fa8cbda79b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [expos.only.func]
@@ -44,7 +44,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
template <class _Tp, class _Up = _Tp>
using __synth_three_way_result = decltype(std::__synth_three_way(declval<_Tp&>(), declval<_Up&>()));
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h b/contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h
index f17382e430..b317d75059 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/three_way_comparable.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template<class _Tp, class _Cat>
concept __compares_as =
@@ -51,7 +51,7 @@ concept three_way_comparable_with =
{ __u <=> __t } -> __compares_as<_Cat>;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__compare/weak_order.h b/contrib/libs/cxxsupp/libcxx/include/__compare/weak_order.h
index 725ac831e6..c2fae1a98d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/weak_order.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/weak_order.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [cmp.alg]
namespace __weak_order {
@@ -93,7 +93,7 @@ inline namespace __cpo {
inline constexpr auto weak_order = __weak_order::__fn{};
} // namespace __cpo
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/arithmetic.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/arithmetic.h
index e1ec8fcc1b..ed0a95d6e4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/arithmetic.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/arithmetic.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concepts.arithmetic], arithmetic concepts
@@ -43,7 +43,7 @@ concept __libcpp_not_integral = !is_integral_v<_Tp>;
template <class _Tp>
concept __libcpp_signed_integer = __libcpp_is_signed_integer<_Tp>::value;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h
index 4d8a230ff4..7f187a39f8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/assignable.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.assignable]
@@ -33,7 +33,7 @@ concept assignable_from =
{ __lhs = _VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/boolean_testable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/boolean_testable.h
index 89f66201e6..a96bde7117 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/boolean_testable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/boolean_testable.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concepts.booleantestable]
@@ -31,7 +31,7 @@ concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t)
{ !_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h
index 729e444b39..9fd62ba892 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/class_or_enum.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// Whether a type is a class type or enumeration type according to the Core wording.
@@ -30,7 +30,7 @@ concept __class_or_enum = is_class_v<_Tp> || is_union_v<_Tp> || is_enum_v<_Tp>;
template<class _Tp>
concept __workaround_52970 = is_class_v<__uncvref_t<_Tp>> || is_union_v<__uncvref_t<_Tp>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/common_reference_with.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/common_reference_with.h
index bb5801a8c1..cae2f5bccc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/common_reference_with.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/common_reference_with.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.commonref]
@@ -30,7 +30,7 @@ concept common_reference_with =
convertible_to<_Tp, common_reference_t<_Tp, _Up>> &&
convertible_to<_Up, common_reference_t<_Tp, _Up>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/common_with.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/common_with.h
index 2b7cb836d6..1b5f4da4af 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/common_with.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/common_with.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.common]
@@ -40,7 +40,7 @@ concept common_with =
add_lvalue_reference_t<const _Tp>,
add_lvalue_reference_t<const _Up>>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/constructible.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/constructible.h
index f537108623..aaf515417e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/constructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/constructible.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.constructible]
template<class _Tp, class... _Args>
@@ -49,7 +49,7 @@ concept copy_constructible =
constructible_from<_Tp, const _Tp&> && convertible_to<const _Tp&, _Tp> &&
constructible_from<_Tp, const _Tp> && convertible_to<const _Tp, _Tp>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/convertible_to.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/convertible_to.h
index 6bf19228a4..5d9d437104 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/convertible_to.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/convertible_to.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.convertible]
@@ -30,7 +30,7 @@ concept convertible_to =
static_cast<_To>(declval<_From>());
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/copyable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/copyable.h
index 8d5f28abc4..c5d8a80b9d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/copyable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/copyable.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concepts.object]
@@ -32,7 +32,7 @@ concept copyable =
assignable_from<_Tp&, const _Tp&> &&
assignable_from<_Tp&, const _Tp>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/derived_from.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/derived_from.h
index b91ce13fe4..4b29147947 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/derived_from.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/derived_from.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.derived]
@@ -27,7 +27,7 @@ concept derived_from =
is_base_of_v<_Bp, _Dp> &&
is_convertible_v<const volatile _Dp*, const volatile _Bp*>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/destructible.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/destructible.h
index 429e82ee93..90a043d314 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/destructible.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/destructible.h
@@ -18,14 +18,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.destructible]
template<class _Tp>
concept destructible = is_nothrow_destructible_v<_Tp>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/different_from.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/different_from.h
index f882205d4a..3066372e86 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/different_from.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/different_from.h
@@ -19,12 +19,12 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template<class _Tp, class _Up>
concept __different_from = !same_as<remove_cvref_t<_Tp>, remove_cvref_t<_Up>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h
index 36ac870b6b..7c750c5937 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/equality_comparable.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.equalitycomparable]
@@ -46,7 +46,7 @@ concept equality_comparable_with =
__make_const_lvalue_ref<_Up>>> &&
__weakly_equality_comparable_with<_Tp, _Up>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/invocable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/invocable.h
index 8a669f1f18..d90389e97f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/invocable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/invocable.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.invocable]
@@ -34,7 +34,7 @@ concept invocable = requires(_Fn&& __fn, _Args&&... __args) {
template<class _Fn, class... _Args>
concept regular_invocable = invocable<_Fn, _Args...>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/movable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/movable.h
index 53e36ebc3f..639219ed6b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/movable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/movable.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concepts.object]
@@ -32,7 +32,7 @@ concept movable =
assignable_from<_Tp&, _Tp> &&
swappable<_Tp>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/predicate.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/predicate.h
index 04cdd97f95..cb23975230 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/predicate.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/predicate.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.predicate]
@@ -28,7 +28,7 @@ template<class _Fn, class... _Args>
concept predicate =
regular_invocable<_Fn, _Args...> && __boolean_testable<invoke_result_t<_Fn, _Args...>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/regular.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/regular.h
index 63c9fb3ce3..d15728d298 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/regular.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/regular.h
@@ -19,14 +19,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.object]
template<class _Tp>
concept regular = semiregular<_Tp> && equality_comparable<_Tp>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/relation.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/relation.h
index 1d687559e4..7d5141cac7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/relation.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/relation.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.relation]
@@ -37,7 +37,7 @@ concept equivalence_relation = relation<_Rp, _Tp, _Up>;
template<class _Rp, class _Tp, class _Up>
concept strict_weak_order = relation<_Rp, _Tp, _Up>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/same_as.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/same_as.h
index 1337193c93..7654906611 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/same_as.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/same_as.h
@@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.same]
@@ -28,7 +28,7 @@ concept __same_as_impl = _IsSame<_Tp, _Up>::value;
template<class _Tp, class _Up>
concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/semiregular.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/semiregular.h
index eac5ec2872..d15bb3ba42 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/semiregular.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/semiregular.h
@@ -19,14 +19,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.object]
template<class _Tp>
concept semiregular = copyable<_Tp> && default_initializable<_Tp>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h
index 866e9f7dfd..fef940f21f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/swappable.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.swappable]
@@ -109,7 +109,7 @@ concept swappable_with =
ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Tp>(__t));
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__concepts/totally_ordered.h b/contrib/libs/cxxsupp/libcxx/include/__concepts/totally_ordered.h
index 5ede92ad08..25347790de 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__concepts/totally_ordered.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__concepts/totally_ordered.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [concept.totallyordered]
@@ -50,7 +50,7 @@ concept totally_ordered_with =
__make_const_lvalue_ref<_Up>>> &&
__partially_ordered_with<_Tp, _Up>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__config b/contrib/libs/cxxsupp/libcxx/include/__config
index 3cb48bcfa0..f5d9d9caa1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__config
+++ b/contrib/libs/cxxsupp/libcxx/include/__config
@@ -311,19 +311,6 @@
# define _LIBCPP_HAS_BITSCAN64
# endif
# define _LIBCPP_HAS_OPEN_WITH_WCHAR
-# if defined(_LIBCPP_MSVCRT)
-# define _LIBCPP_HAS_QUICK_EXIT
-# endif
-
-// Some CRT APIs are unavailable to store apps
-# if defined(WINAPI_FAMILY)
-# include <winapifamily.h>
-# if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && \
- (!defined(WINAPI_PARTITION_SYSTEM) || \
- !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_SYSTEM))
-# define _LIBCPP_WINDOWS_STORE_APP
-# endif
-# endif
#endif // defined(_WIN32)
#ifdef __sun__
@@ -409,74 +396,6 @@
# define _LIBCPP_NO_CFI
#endif
-// If the compiler supports using_if_exists, pretend we have those functions and they'll
-// be picked up if the C library provides them.
-//
-// TODO: Once we drop support for Clang 12, we can assume the compiler supports using_if_exists
-// for platforms that don't have a conforming C11 library, so we can drop this whole thing.
-#if __has_attribute(using_if_exists)
-# define _LIBCPP_HAS_TIMESPEC_GET
-# define _LIBCPP_HAS_QUICK_EXIT
-# ifndef _LIBCPP_MSVCRT
-# define _LIBCPP_HAS_ALIGNED_ALLOC
-# endif
-#else
-#if (defined(__ISO_C_VISIBLE) && (__ISO_C_VISIBLE >= 2011)) || __cplusplus >= 201103L
-# if defined(__FreeBSD__)
-# define _LIBCPP_HAS_ALIGNED_ALLOC
-# define _LIBCPP_HAS_QUICK_EXIT
-# if __FreeBSD_version >= 1300064 || \
- (__FreeBSD_version >= 1201504 && __FreeBSD_version < 1300000)
-# define _LIBCPP_HAS_TIMESPEC_GET
-# endif
-# elif defined(__BIONIC__)
-# if __ANDROID_API__ >= 21
-# define _LIBCPP_HAS_QUICK_EXIT
-# endif
-# if __ANDROID_API__ >= 28
-# define _LIBCPP_HAS_ALIGNED_ALLOC
-# endif
-# if __ANDROID_API__ >= 29
-# define _LIBCPP_HAS_TIMESPEC_GET
-# endif
-# elif defined(__Fuchsia__) || defined(__wasi__) || defined(__NetBSD__)
-# define _LIBCPP_HAS_ALIGNED_ALLOC
-# define _LIBCPP_HAS_QUICK_EXIT
-# define _LIBCPP_HAS_TIMESPEC_GET
-# elif defined(__OpenBSD__)
-# define _LIBCPP_HAS_ALIGNED_ALLOC
-# define _LIBCPP_HAS_TIMESPEC_GET
-# elif defined(__linux__)
-# if !defined(_LIBCPP_HAS_MUSL_LIBC)
-# if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__)
-# define _LIBCPP_HAS_QUICK_EXIT
-# endif
-# if _LIBCPP_GLIBC_PREREQ(2, 17)
-# define _LIBCPP_HAS_ALIGNED_ALLOC
-# define _LIBCPP_HAS_TIMESPEC_GET
-# endif
-# else // defined(_LIBCPP_HAS_MUSL_LIBC)
-# define _LIBCPP_HAS_ALIGNED_ALLOC
-# define _LIBCPP_HAS_QUICK_EXIT
-# define _LIBCPP_HAS_TIMESPEC_GET
-# endif
-# elif defined(_LIBCPP_MSVCRT)
- // Using Microsoft's C Runtime library, not MinGW
-# define _LIBCPP_HAS_TIMESPEC_GET
-# elif defined(__APPLE__)
- // timespec_get and aligned_alloc were introduced in macOS 10.15 and
- // aligned releases
-# if ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500) || \
- (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000) || \
- (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000) || \
- (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000))
-# define _LIBCPP_HAS_ALIGNED_ALLOC
-# define _LIBCPP_HAS_TIMESPEC_GET
-# endif
-# endif // __APPLE__
-#endif
-#endif // __has_attribute(using_if_exists)
-
#ifndef _LIBCPP_CXX03_LANG
# define _LIBCPP_ALIGNOF(_Tp) alignof(_Tp)
#elif defined(_LIBCPP_COMPILER_CLANG_BASED)
@@ -904,10 +823,6 @@ typedef unsigned int char32_t;
# define _LIBCPP_CONSTEVAL consteval
#endif
-#if _LIBCPP_STD_VER <= 17 || !defined(__cpp_concepts) || __cpp_concepts < 201907L
-#define _LIBCPP_HAS_NO_CONCEPTS
-#endif
-
#ifdef __GNUC__
# define _LIBCPP_NOALIAS __attribute__((__malloc__))
#else
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
index 3db244556c..5ba3ef96de 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
@@ -254,7 +254,7 @@ public:
private:
friend class directory_iterator;
friend class recursive_directory_iterator;
- friend class __dir_stream;
+ friend class _LIBCPP_HIDDEN __dir_stream;
enum _CacheType : unsigned char {
_Empty,
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h
index 87bbbfac71..6034fe5075 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h
@@ -137,7 +137,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <>
_LIBCPP_AVAILABILITY_FILESYSTEM
@@ -147,7 +147,7 @@ template <>
_LIBCPP_AVAILABILITY_FILESYSTEM
inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::directory_iterator> = true;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h
index 95360376fc..b20d201f58 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h
@@ -168,7 +168,7 @@ _LIBCPP_AVAILABILITY_FILESYSTEM_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <>
_LIBCPP_AVAILABILITY_FILESYSTEM
@@ -178,7 +178,7 @@ template <>
_LIBCPP_AVAILABILITY_FILESYSTEM
inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::recursive_directory_iterator> = true;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
index 443c9e359a..8bb3facfc5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
@@ -30,12 +30,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format {
/// The type stored in @ref basic_format_arg.
///
@@ -279,8 +273,6 @@ private:
}) {}
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
index 2739d1131b..40dde98400 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
@@ -23,12 +23,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
template <class _Context>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_args {
public:
@@ -57,8 +51,6 @@ private:
const basic_format_arg<_Context>* __data_{nullptr};
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
index d4bc35decd..058f7a4bee 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
@@ -31,12 +31,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
template <class _OutIt, class _CharT>
requires output_iterator<_OutIt, const _CharT&>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_context;
@@ -151,8 +145,6 @@ private:
#endif
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h
index 9421aa8788..0f2e9085f8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h
@@ -21,12 +21,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
template <class _Context>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg;
@@ -36,8 +30,6 @@ struct _LIBCPP_TEMPLATE_VIS __format_arg_store;
template <class _Tp, class _CharT = char>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h
index d16859cc65..272b615d10 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_parse_context.h
@@ -22,12 +22,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
-
template <class _CharT>
class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_parse_context {
public:
@@ -100,8 +94,6 @@ using format_parse_context = basic_format_parse_context<char>;
using wformat_parse_context = basic_format_parse_context<wchar_t>;
#endif
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_string.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_string.h
index 32af6609e7..51c3c7a1a6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_string.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_string.h
@@ -24,12 +24,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format {
template <class _CharT>
@@ -160,8 +154,6 @@ __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
} // namespace __format
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h
index b973dc5c1d..25caa1c9e9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_to_n_result.h
@@ -21,19 +21,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
template <class _OutIt>
struct _LIBCPP_TEMPLATE_VIS format_to_n_result {
_OutIt out;
iter_difference_t<_OutIt> size;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
index f9e0b6c84b..d7370b0bca 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
@@ -20,6 +20,7 @@
#include <__format/format_fwd.h>
#include <__format/format_string.h>
#include <__format/parser_std_format_spec.h>
+#include <__utility/move.h>
#include <__utility/unreachable.h>
#include <string_view>
@@ -31,12 +32,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
/// The default formatter template.
///
/// [format.formatter.spec]/5
@@ -278,8 +273,6 @@ __write_unicode(output_iterator<const _CharT&> auto __out_it,
} // namespace __formatter
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
index f428683657..e3653e6738 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
@@ -31,12 +31,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format_spec {
template <class _CharT>
@@ -134,8 +128,6 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<bool, _CharT>
}
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h
index f565135821..87521e0fad 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_char.h
@@ -26,12 +26,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format_spec {
template <class _CharT>
@@ -95,7 +89,6 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT
formatter<wchar_t, wchar_t>
: public __format_spec::__formatter_char<wchar_t> {};
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
#endif //_LIBCPP_STD_VER > 17
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h
index aa32815af2..10df1ba51b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_floating_point.h
@@ -46,12 +46,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-# if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format_spec {
template <floating_point _Tp>
@@ -707,8 +701,6 @@ template <__formatter::__char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long double, _CharT>
: public __format_spec::__formatter_floating_point<_CharT> {};
-# endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h
index e6143a4745..1c652ee54f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integer.h
@@ -30,12 +30,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format_spec {
template <class _CharT>
@@ -159,8 +153,6 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT
};
#endif
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h
index 836082671c..6cc79db1a8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h
@@ -42,12 +42,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
/**
* Integral formatting classes.
*
@@ -454,8 +448,6 @@ private:
} // namespace __format_spec
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
index 83d21e1c50..d83e2be77e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
@@ -30,12 +30,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-# if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format_spec {
template <__formatter::__char_type _CharT>
@@ -81,8 +75,6 @@ template <__formatter::__char_type _CharT>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const void*, _CharT>
: public __format_spec::__formatter_pointer<_CharT> {};
-# endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
index 54aa1215d9..e78b43b8ca 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
@@ -27,12 +27,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format_spec {
template <__formatter::__char_type _CharT>
@@ -149,8 +143,6 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string_v
}
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h b/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
index 92c8986e76..d58ad11ea0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
@@ -34,12 +34,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-# if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
namespace __format_spec {
/**
@@ -224,7 +218,7 @@ __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
template <class _Context>
_LIBCPP_HIDE_FROM_ABI constexpr uint32_t
-__substitute_arg_id(basic_format_arg<_Context> __arg) {
+__substitute_arg_id(basic_format_arg<_Context> _Arg) {
return visit_format_arg(
[](auto __arg) -> uint32_t {
using _Type = decltype(__arg);
@@ -248,7 +242,7 @@ __substitute_arg_id(basic_format_arg<_Context> __arg) {
__throw_format_error("A format-spec arg-id replacement argument "
"isn't an integral type");
},
- __arg);
+ _Arg);
}
class _LIBCPP_TYPE_VIS __parser_width {
@@ -1043,7 +1037,7 @@ concept __utf16_or_32_character = __utf16_character<_CharT> || __utf32_character
* character.
*/
_LIBCPP_HIDE_FROM_ABI inline constexpr int __column_width_3(uint32_t __c) noexcept {
- _LIBCPP_ASSERT(__c < 0x1'0000,
+ _LIBCPP_ASSERT(__c < 0x10000,
"Use __column_width_4 or __column_width for larger values");
// clang-format off
@@ -1068,7 +1062,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr int __column_width_3(uint32_t __c) noexce
* 4-byte UTF-8 character.
*/
_LIBCPP_HIDE_FROM_ABI inline constexpr int __column_width_4(uint32_t __c) noexcept {
- _LIBCPP_ASSERT(__c >= 0x1'0000,
+ _LIBCPP_ASSERT(__c >= 0x10000,
"Use __column_width_3 or __column_width for smaller values");
// clang-format off
@@ -1086,7 +1080,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr int __column_width_4(uint32_t __c) noexce
* The general case, accepting all values.
*/
_LIBCPP_HIDE_FROM_ABI inline constexpr int __column_width(uint32_t __c) noexcept {
- if (__c < 0x1'0000)
+ if (__c < 0x10000)
return __column_width_3(__c);
return __column_width_4(__c);
@@ -1246,7 +1240,7 @@ __estimate_column_width(const _CharT* __first, const _CharT* __last,
__c -= 0xd800;
__c <<= 10;
__c += (*(__first + 1) - 0xdc00);
- __c += 0x10'000;
+ __c += 0x10000;
__result += __column_width_4(__c);
if (__result > __maximum)
@@ -1389,8 +1383,6 @@ __get_string_alignment(const _CharT* __first, const _CharT* __last,
} // namespace __format_spec
-# endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/function.h b/contrib/libs/cxxsupp/libcxx/include/__functional/function.h
index b1faed9549..8ff6ff44cb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/function.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/function.h
@@ -22,6 +22,7 @@
#include <__memory/shared_ptr.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/swap.h>
#include <exception>
#include <memory> // TODO: replace with <__memory/__builtin_new_allocator.h>
#include <type_traits>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h b/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
index b89d595937..3f63a86731 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -92,7 +92,7 @@ struct greater_equal {
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__hash_table b/contrib/libs/cxxsupp/libcxx/include/__hash_table
index 9cc656f4d6..c4a1158daa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__hash_table
+++ b/contrib/libs/cxxsupp/libcxx/include/__hash_table
@@ -17,12 +17,12 @@
#include <__config>
#include <__debug>
#include <__functional/hash.h>
+#include <__utility/swap.h>
#include <cmath>
#include <initializer_list>
#include <iterator>
#include <memory>
#include <type_traits>
-#include <utility>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
index 1e49676ce7..9a74f1421c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
@@ -65,7 +65,7 @@ void advance(_InputIter& __i, _Distance __orig_n) {
_VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [range.iter.op.advance]
@@ -193,7 +193,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
index abbd8f4038..abcc0b675e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
@@ -27,7 +27,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template<class _Iter>
concept __can_use_postfix_proxy =
@@ -37,31 +37,18 @@ concept __can_use_postfix_proxy =
template<input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
requires (!same_as<_Iter, _Sent> && copyable<_Iter>)
class common_iterator {
- class __proxy {
- friend common_iterator;
-
- iter_value_t<_Iter> __value;
- // We can move __x because the only caller verifies that __x is not a reference.
- constexpr explicit __proxy(iter_reference_t<_Iter>&& __x)
- : __value(_VSTD::move(__x)) {}
-
- public:
+ struct __proxy {
constexpr const iter_value_t<_Iter>* operator->() const noexcept {
- return _VSTD::addressof(__value);
+ return _VSTD::addressof(__value_);
}
+ iter_value_t<_Iter> __value_;
};
- class __postfix_proxy {
- friend common_iterator;
-
- iter_value_t<_Iter> __value;
- constexpr explicit __postfix_proxy(iter_reference_t<_Iter>&& __x)
- : __value(_VSTD::forward<iter_reference_t<_Iter>>(__x)) {}
-
- public:
+ struct __postfix_proxy {
constexpr const iter_value_t<_Iter>& operator*() const noexcept {
- return __value;
+ return __value_;
}
+ iter_value_t<_Iter> __value_;
};
public:
@@ -133,7 +120,7 @@ public:
auto&& __tmp = *_VSTD::__unchecked_get<_Iter>(__hold_);
return _VSTD::addressof(__tmp);
} else {
- return __proxy(*_VSTD::__unchecked_get<_Iter>(__hold_));
+ return __proxy{*_VSTD::__unchecked_get<_Iter>(__hold_)};
}
}
@@ -152,7 +139,7 @@ public:
!__can_use_postfix_proxy<_Iter>) {
return _VSTD::__unchecked_get<_Iter>(__hold_)++;
} else {
- __postfix_proxy __p(**this);
+ auto __p = __postfix_proxy{**this};
++*this;
return __p;
}
@@ -276,7 +263,7 @@ struct iterator_traits<common_iterator<_Iter, _Sent>> {
using reference = iter_reference_t<_Iter>;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h
index 92ef781457..bd68889333 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/concepts.h
@@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [iterator.concept.readable]
template<class _In>
@@ -273,7 +273,7 @@ concept indirectly_copyable_storable =
// Note: indirectly_swappable is located in iter_swap.h to prevent a dependency cycle
// (both iter_swap and indirectly_swappable require indirectly_readable).
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h
index 826d5de51f..b0f5c66ecf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h
@@ -30,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template<class>
struct __counted_iterator_concept {};
@@ -296,7 +296,7 @@ struct iterator_traits<counted_iterator<_Iter>> : iterator_traits<_Iter> {
add_pointer_t<iter_reference_t<_Iter>>, void>;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h
index 78b8177fae..8819078958 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/distance.h
@@ -52,7 +52,7 @@ distance(_InputIter __first, _InputIter __last)
return _VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [range.iter.op.distance]
@@ -100,7 +100,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h
index f36b417bf8..ef5f5110a3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/incrementable_traits.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [incrementable.traits]
template<class> struct incrementable_traits {};
@@ -65,7 +65,7 @@ using iter_difference_t = typename conditional_t<__is_primary_template<iterator_
incrementable_traits<remove_cvref_t<_Ip> >,
iterator_traits<remove_cvref_t<_Ip> > >::difference_type;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/indirectly_comparable.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/indirectly_comparable.h
index 9002b21fd5..868190fc48 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/indirectly_comparable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/indirectly_comparable.h
@@ -21,13 +21,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <class _I1, class _I2, class _Rp, class _P1 = identity, class _P2 = identity>
concept indirectly_comparable =
indirect_binary_predicate<_Rp, projected<_I1, _P1>, projected<_I2, _P2>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h
index aba197ec21..8b313f2a85 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/insert_iterator.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
template <class _Container>
using __insert_iterator_iter_t = ranges::iterator_t<_Container>;
#else
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h
index 97d54c4a82..d8240ab9c2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [iterator.cust.move]
@@ -39,6 +39,23 @@ concept __unqualified_iter_move =
iter_move(std::forward<_Tp>(__t));
};
+template<class _Tp>
+concept __move_deref =
+ !__unqualified_iter_move<_Tp> &&
+ requires (_Tp&& __t) {
+ *__t;
+ requires is_lvalue_reference_v<decltype(*__t)>;
+ };
+
+template<class _Tp>
+concept __just_deref =
+ !__unqualified_iter_move<_Tp> &&
+ !__move_deref<_Tp> &&
+ requires (_Tp&& __t) {
+ *__t;
+ requires (!is_lvalue_reference_v<decltype(*__t)>);
+ };
+
// [iterator.cust.move]
struct __fn {
@@ -51,17 +68,18 @@ struct __fn {
}
template<class _Ip>
- requires (!__unqualified_iter_move<_Ip>) &&
- requires { *declval<_Ip>(); }
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
+ requires __move_deref<_Ip>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
+ noexcept(noexcept(std::move(*std::forward<_Ip>(__i))))
+ -> decltype( std::move(*std::forward<_Ip>(__i)))
+ { return std::move(*std::forward<_Ip>(__i)); }
+
+ template<class _Ip>
+ requires __just_deref<_Ip>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
noexcept(noexcept(*std::forward<_Ip>(__i)))
- {
- if constexpr (is_lvalue_reference_v<decltype(*declval<_Ip>())>) {
- return std::move(*std::forward<_Ip>(__i));
- } else {
- return *std::forward<_Ip>(__i);
- }
- }
+ -> decltype( *std::forward<_Ip>(__i))
+ { return *std::forward<_Ip>(__i); }
};
} // namespace __iter_move
@@ -74,7 +92,7 @@ template<__dereferenceable _Tp>
requires requires(_Tp& __t) { { ranges::iter_move(__t) } -> __can_reference; }
using iter_rvalue_reference_t = decltype(ranges::iter_move(declval<_Tp&>()));
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h
index 291558fadc..9e06464c36 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_swap.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [iter.cust.swap]
@@ -99,7 +99,7 @@ concept indirectly_swappable =
ranges::iter_swap(__i2, __i1);
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
index e7d25fc7df..775f227004 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <class _Tp>
using __with_reference = _Tp&;
@@ -41,7 +41,7 @@ concept __dereferenceable = requires(_Tp& __t) {
template<__dereferenceable _Tp>
using iter_reference_t = decltype(*declval<_Tp&>());
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
template <class _Iter>
struct _LIBCPP_TEMPLATE_VIS iterator_traits;
@@ -139,7 +139,7 @@ public:
static const bool value = sizeof(__test<_Tp>(nullptr)) == 1;
};
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// The `cpp17-*-iterator` exposition-only concepts are easily confused with the Cpp17*Iterator tables,
// so they've been banished to a namespace that makes it obvious they have a niche use-case.
@@ -362,7 +362,7 @@ struct iterator_traits : __iterator_traits<_Ip> {
using __primary_template = iterator_traits;
};
-#else // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#else // _LIBCPP_STD_VER > 17
template <class _Iter, bool> struct __iterator_traits {};
@@ -399,10 +399,10 @@ struct _LIBCPP_TEMPLATE_VIS iterator_traits
using __primary_template = iterator_traits;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
template<class _Tp>
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
requires is_object_v<_Tp>
#endif
struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h
index 13db6c7f0b..b9f2d081dc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <class _Input1, class _Input2, class _Output,
class _Comp = ranges::less, class _Proj1 = identity, class _Proj2 = identity>
@@ -34,7 +34,7 @@ concept mergeable =
indirectly_copyable<_Input2, _Output> &&
indirect_strict_weak_order<_Comp, projected<_Input1, _Proj1>, projected<_Input2, _Proj2>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h
index 2a37382cca..7939840b6d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h
@@ -35,7 +35,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
return __x;
}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [range.iter.op.next]
@@ -79,7 +79,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h
index 85834a23c8..28d193eaae 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <class _Iterator>
concept permutable =
@@ -28,7 +28,7 @@ concept permutable =
indirectly_movable_storable<_Iterator, _Iterator> &&
indirectly_swappable<_Iterator, _Iterator>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h
index 36bf3d906a..e68b8759b7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h
@@ -34,7 +34,7 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
return __x;
}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [range.iter.op.prev]
@@ -71,7 +71,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h
index 2edbe0da61..53526bd8e7 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/projected.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template<indirectly_readable _It, indirectly_regular_unary_invocable<_It> _Proj>
struct projected {
@@ -33,7 +33,7 @@ struct incrementable_traits<projected<_It, _Proj>> {
using difference_type = iter_difference_t<_It>;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h
index 5bc59a89f3..500b46ac14 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/readable_traits.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [readable.traits]
template<class> struct __cond_value_type {};
@@ -79,7 +79,7 @@ using iter_value_t = typename conditional_t<__is_primary_template<iterator_trait
indirectly_readable_traits<remove_cvref_t<_Ip> >,
iterator_traits<remove_cvref_t<_Ip> > >::value_type;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h
index 90bc2d752e..c77f461853 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h
@@ -184,7 +184,7 @@ operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
return __x.base() >= __y.base();
}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <class _Iter1, three_way_comparable_with<_Iter1> _Iter2>
_LIBCPP_HIDE_FROM_ABI constexpr
compare_three_way_result_t<_Iter1, _Iter2>
@@ -192,7 +192,7 @@ operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>&
{
return __y.base() <=> __x.base();
}
-#endif
+#endif // _LIBCPP_STD_VER > 17
#ifndef _LIBCPP_CXX03_LANG
template <class _Iter1, class _Iter2>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/size.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/size.h
index bf40207a86..e060134966 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/size.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/size.h
@@ -41,9 +41,14 @@ _NOEXCEPT_(noexcept(static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(
-> common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>
{ return static_cast<common_type_t<ptrdiff_t, make_signed_t<decltype(__c.size())>>>(__c.size()); }
+// GCC complains about the implicit conversion from ptrdiff_t to size_t in
+// the array bound.
+_LIBCPP_DIAGNOSTIC_PUSH
+_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wsign-conversion")
template <class _Tp, ptrdiff_t _Sz>
_LIBCPP_INLINE_VISIBILITY
constexpr ptrdiff_t ssize(const _Tp (&)[_Sz]) noexcept { return _Sz; }
+_LIBCPP_DIAGNOSTIC_POP
#endif
#endif // _LIBCPP_STD_VER > 14
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h
index 057e1549df..bcf934f87b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h
@@ -23,14 +23,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <class _Iter, class _Comp = ranges::less, class _Proj = identity>
concept sortable =
permutable<_Iter> &&
indirect_strict_weak_order<_Comp, projected<_Iter, _Proj>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/unreachable_sentinel.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/unreachable_sentinel.h
index b94ca53f40..d77cc99f02 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/unreachable_sentinel.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/unreachable_sentinel.h
@@ -19,7 +19,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
struct unreachable_sentinel_t {
template<weakly_incrementable _Iter>
@@ -31,7 +31,7 @@ struct unreachable_sentinel_t {
inline constexpr unreachable_sentinel_t unreachable_sentinel{};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__locale b/contrib/libs/cxxsupp/libcxx/include/__locale
index 38b282bf83..aba24ee064 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__locale
+++ b/contrib/libs/cxxsupp/libcxx/include/__locale
@@ -19,7 +19,6 @@
#include <memory>
#include <mutex>
#include <string>
-#include <utility>
#if defined(_LIBCPP_MSVCRT_LIKE)
# include <__support/win32/locale_win32.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h b/contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h
index 816c553e85..88372d277d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/concepts.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
@@ -61,7 +61,7 @@ concept __nothrow_forward_range =
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h
index 3064f811e9..29258023e3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_construct_at.h
@@ -29,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
// construct_at
@@ -117,7 +117,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h
index e036c1858b..8072496c24 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h
@@ -32,7 +32,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
@@ -311,7 +311,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
index 828513a295..bce2b3f9d6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
@@ -24,6 +24,7 @@
#include <__memory/unique_ptr.h>
#include <__utility/forward.h>
#include <__utility/move.h>
+#include <__utility/swap.h>
#include <cstddef>
#include <cstdlib> // abort
#include <iosfwd>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
index 2c1f0aa0d0..14e1bf0edf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
@@ -47,10 +47,8 @@ struct _LIBCPP_TEMPLATE_VIS default_delete {
0) _NOEXCEPT {}
_LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __ptr) const _NOEXCEPT {
- static_assert(sizeof(_Tp) > 0,
- "default_delete can not delete incomplete type");
- static_assert(!is_void<_Tp>::value,
- "default_delete can not delete incomplete type");
+ static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
+ static_assert(!is_void<_Tp>::value, "cannot delete an incomplete type");
delete __ptr;
}
};
@@ -78,10 +76,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
typename _EnableIfConvertible<_Up>::type
operator()(_Up* __ptr) const _NOEXCEPT {
- static_assert(sizeof(_Tp) > 0,
- "default_delete can not delete incomplete type");
- static_assert(!is_void<_Tp>::value,
- "default_delete can not delete void type");
+ static_assert(sizeof(_Up) >= 0, "cannot delete an incomplete type");
delete[] __ptr;
}
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h b/contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h
index f5aba75d57..42b40813e0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/linear_congruential_engine.h
@@ -218,8 +218,8 @@ private:
static_assert(__m == 0 || __c < __m, "linear_congruential_engine invalid parameters");
static_assert(is_unsigned<_UIntType>::value, "_UIntType must be unsigned type");
public:
- static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u: 0u;
- static _LIBCPP_CONSTEXPR const result_type _Max = __m - 1u;
+ static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u : 0u;
+ static _LIBCPP_CONSTEXPR const result_type _Max = __m - _UIntType(1u);
static_assert(_Min < _Max, "linear_congruential_engine invalid parameters");
// engine characteristics
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_random_bit_generator.h b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_random_bit_generator.h
index 99f2e6bc30..84a30b0ebe 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_random_bit_generator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_random_bit_generator.h
@@ -24,7 +24,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// [rand.req.urng]
template<class _Gen>
@@ -36,7 +36,7 @@ concept uniform_random_bit_generator =
requires bool_constant<(_Gen::min() < _Gen::max())>::value;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
index 2ebdab4eb8..ad5a874e07 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
template <class _Tp>
@@ -58,14 +58,14 @@ namespace __begin {
struct __fn {
template <class _Tp>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[]) const noexcept
- requires (sizeof(_Tp) != 0) // Disallow incomplete element types.
+ requires (sizeof(_Tp) >= 0) // Disallow incomplete element types.
{
return __t + 0;
}
template <class _Tp, size_t _Np>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept
- requires (sizeof(_Tp) != 0) // Disallow incomplete element types.
+ requires (sizeof(_Tp) >= 0) // Disallow incomplete element types.
{
return __t + 0;
}
@@ -132,7 +132,7 @@ namespace __end {
public:
template <class _Tp, size_t _Np>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept
- requires (sizeof(_Tp) != 0) // Disallow incomplete element types.
+ requires (sizeof(_Tp) >= 0) // Disallow incomplete element types.
{
return __t + _Np;
}
@@ -218,7 +218,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/all.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/all.h
index 77396222d6..5f9bf7e277 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/all.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/all.h
@@ -28,7 +28,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges::views {
@@ -75,7 +75,7 @@ using all_t = decltype(views::all(declval<_Range>()));
} // namespace ranges::views
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h
index 78911284bb..61b9b61f26 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/common_view.h
@@ -30,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
@@ -128,7 +128,7 @@ inline namespace __cpo {
} // namespace views
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h
index 709f3d80f7..241f90c0a1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/concepts.h
@@ -32,7 +32,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -139,7 +139,7 @@ namespace ranges {
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h
index e1c08a7ea1..6012497db5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/copyable_box.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// __copyable_box allows turning a type that is copy-constructible (but maybe not copy-assignable) into
// a type that is both copy-constructible and copy-assignable. It does that by introducing an empty state
@@ -171,7 +171,7 @@ namespace ranges {
};
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h
index 0a2d828578..f45f1e8900 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/counted.h
@@ -29,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges::views {
@@ -74,7 +74,7 @@ inline namespace __cpo {
} // namespace ranges::views
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/dangling.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/dangling.h
index 3a200ed965..525b5ff0aa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/dangling.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/dangling.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
struct dangling {
@@ -35,7 +35,7 @@ using borrowed_iterator_t = _If<borrowed_range<_Rp>, iterator_t<_Rp>, dangling>;
// borrowed_subrange_t defined in <__ranges/subrange.h>
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/data.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/data.h
index dbb4767e53..2f24d89b9c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/data.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/data.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [range.prim.data]
@@ -99,7 +99,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h
index 079a74d4b8..93f4b9f188 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/drop_view.h
@@ -31,7 +31,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<view _View>
@@ -120,7 +120,7 @@ public:
inline constexpr bool enable_borrowed_range<drop_view<_Tp>> = enable_borrowed_range<_Tp>;
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h
index c0b55b221a..46c97ca7e3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/empty.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [range.prim.empty]
@@ -75,7 +75,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h
index 6a08727678..c6a92e05ae 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/empty_view.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<class _Tp>
@@ -38,7 +38,7 @@ namespace ranges {
inline constexpr bool enable_borrowed_range<empty_view<_Tp>> = true;
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_borrowed_range.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_borrowed_range.h
index b8f809b6ce..833d266403 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_borrowed_range.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_borrowed_range.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -33,7 +33,7 @@ inline constexpr bool enable_borrowed_range = false;
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h
index 4b4b63a42c..a1e5721404 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/enable_view.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
namespace ranges {
@@ -40,7 +40,7 @@ inline constexpr bool enable_view = derived_from<_Tp, view_base> ||
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h
index b7c099e049..62e98d475b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/iota_view.h
@@ -39,7 +39,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<class _Int>
@@ -401,7 +401,7 @@ inline namespace __cpo {
} // namespace views
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
index 395e5c7ece..1a1dfad1d2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
@@ -30,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<class>
@@ -341,9 +341,7 @@ namespace ranges {
} // namespace ranges
-#undef _CONSTEXPR_TERNARY
-
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h
index d9589ae46c..7255705256 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/non_propagating_cache.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
// __non_propagating_cache is a helper type that allows storing an optional value in it,
@@ -107,7 +107,7 @@ namespace ranges {
struct __empty_cache { };
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h
index 7987c60751..ac1ef08fec 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/owning_view.h
@@ -28,7 +28,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<range _Rp>
@@ -74,7 +74,7 @@ public:
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h
index 9c53488ba6..b65233b563 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/range_adaptor.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// CRTP base that one can derive from in order to be considered a range adaptor closure
// by the library. When deriving from this class, a pipe operator will be provided to
@@ -66,7 +66,7 @@ struct __range_adaptor_closure {
{ return __range_adaptor_closure_t(std::__compose(std::forward<_OtherClosure>(__c2), std::forward<_Closure>(__c1))); }
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h
index 20f5489c50..9291359fdf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/rbegin.h
@@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [ranges.access.rbegin]
@@ -123,7 +123,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h
index 255a468606..e69c715fb9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/ref_view.h
@@ -31,7 +31,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<range _Range>
@@ -79,7 +79,7 @@ public:
inline constexpr bool enable_borrowed_range<ref_view<_Tp>> = true;
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h
index 4f1597e073..e507b25872 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/rend.h
@@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [range.access.rend]
@@ -127,7 +127,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
index b5de7e9e32..b1df8fbc33 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
@@ -33,7 +33,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<view _View>
@@ -183,7 +183,7 @@ namespace ranges {
} // namespace views
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h
index e0fd4849f4..e6a873058f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<copy_constructible _Tp>
@@ -74,7 +74,7 @@ namespace ranges {
single_view(_Tp) -> single_view<_Tp>;
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/size.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/size.h
index 2c5a96e63b..514c554ef4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/size.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/size.h
@@ -24,7 +24,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<class>
@@ -128,7 +128,7 @@ inline namespace __cpo {
} // namespace __cpo
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h
index c54f7710fc..24e5eff3f8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/subrange.h
@@ -36,7 +36,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<class _From, class _To>
@@ -282,7 +282,7 @@ struct tuple_element<1, const ranges::subrange<_Ip, _Sp, _Kp>> {
using type = _Sp;
};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h
index b5f194f9a0..7193206d4c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/take_view.h
@@ -34,7 +34,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
template<view _View>
@@ -176,7 +176,7 @@ public:
inline constexpr bool enable_borrowed_range<take_view<_Tp>> = enable_borrowed_range<_Tp>;
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h
index 4cc582faeb..c5a7128c36 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/transform_view.h
@@ -41,7 +41,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
@@ -433,7 +433,7 @@ inline namespace __cpo {
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h
index eecc475111..4b36e02f7d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/view_interface.h
@@ -28,7 +28,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
@@ -167,7 +167,7 @@ public:
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__string b/contrib/libs/cxxsupp/libcxx/include/__string
index 7192aaccba..290ff74a51 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__string
+++ b/contrib/libs/cxxsupp/libcxx/include/__string
@@ -565,25 +565,6 @@ char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __
}
#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
-// Disable double inline warning.
-#ifdef _LIBCPP_COMPILER_MSVC
-#pragma warning ( push )
-#pragma warning ( disable : 4141 )
-#endif
-template <class _Traits>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
-inline size_t __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
-#if _LIBCPP_DEBUG_LEVEL >= 1
- return __s ? _Traits::length(__s) : (_VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, "p == nullptr", "null pointer pass to non-null argument of char_traits<...>::length")), 0);
-#else
- return _Traits::length(__s);
-#endif
-}
-#ifdef _LIBCPP_COMPILER_MSVC
-#pragma warning ( pop )
-#endif
-
#ifndef _LIBCPP_HAS_NO_CHAR8_T
template <>
@@ -1169,19 +1150,6 @@ size_t __do_string_hash(_Ptr __p, _Ptr __e)
return __murmur2_or_cityhash<size_t>()(__p, (__e-__p)*sizeof(value_type));
}
-template <class _CharT, class _Iter, class _Traits = char_traits<_CharT> >
-struct __quoted_output_proxy
-{
- _Iter __first_;
- _Iter __last_;
- _CharT __delim_;
- _CharT __escape_;
-
- _LIBCPP_HIDE_FROM_ABI
- explicit __quoted_output_proxy(_Iter __f, _Iter __l, _CharT __d, _CharT __e)
- : __first_(__f), __last_(__l), __delim_(__d), __escape_(__e) {}
-};
-
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
diff --git a/contrib/libs/cxxsupp/libcxx/include/__tree b/contrib/libs/cxxsupp/libcxx/include/__tree
index 384d383504..f8d2226e66 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__tree
+++ b/contrib/libs/cxxsupp/libcxx/include/__tree
@@ -13,6 +13,7 @@
#include <__algorithm/min.h>
#include <__config>
#include <__utility/forward.h>
+#include <__utility/swap.h>
#include <iterator>
#include <limits>
#include <memory>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/cmp.h b/contrib/libs/cxxsupp/libcxx/include/__utility/cmp.h
index f36d53ad46..5a8121d8a6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/cmp.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/cmp.h
@@ -24,7 +24,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template<class _Tp, class... _Up>
struct _IsSameAsAny : _Or<_IsSame<_Tp, _Up>...> {};
@@ -101,7 +101,7 @@ bool in_range(_Up __u) noexcept
return _VSTD::cmp_less_equal(__u, numeric_limits<_Tp>::max()) &&
_VSTD::cmp_greater_equal(__u, numeric_limits<_Tp>::min());
}
-#endif
+#endif // _LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h b/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
index 258e65379f..8867c6deb6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
@@ -340,7 +340,7 @@ operator==(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
return __x.first == __y.first && __x.second == __y.second;
}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <class _T1, class _T2>
_LIBCPP_HIDE_FROM_ABI constexpr
@@ -355,7 +355,7 @@ operator<=>(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
return _VSTD::__synth_three_way(__x.second, __y.second);
}
-#else // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#else // _LIBCPP_STD_VER > 17
template <class _T1, class _T2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
@@ -397,9 +397,9 @@ operator<=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
return !(__y < __x);
}
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 20
template <class _T1, class _T2, class _U1, class _U2, template<class> class _TQual, template<class> class _UQual>
requires requires { typename pair<common_reference_t<_TQual<_T1>, _UQual<_U1>>,
common_reference_t<_TQual<_T2>, _UQual<_U2>>>; }
@@ -413,7 +413,7 @@ template <class _T1, class _T2, class _U1, class _U2>
struct common_type<pair<_T1, _T2>, pair<_U1, _U2>> {
using type = pair<common_type_t<_T1, _U1>, common_type_t<_T2, _U2>>;
};
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 20
template <class _T1, class _T2>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
diff --git a/contrib/libs/cxxsupp/libcxx/include/algorithm b/contrib/libs/cxxsupp/libcxx/include/algorithm
index cc37d71b24..4d922807a2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/algorithm
+++ b/contrib/libs/cxxsupp/libcxx/include/algorithm
@@ -44,6 +44,45 @@ namespace ranges {
template<forward_range R, class Proj = identity,
indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> // since C++20
constexpr borrowed_iterator_t<R> min_element(R&& r, Comp comp = {}, Proj proj = {});
+
+ template <input_iterator I1, sentinel_for<_I1> S1, input_iterator I2, sentinel_for<_I2> S2,
+ class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
+ requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2>
+ constexpr mismatch_result<_I1, _I2>
+ mismatch()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) // since C++20
+
+ template <input_range R1, input_range R2,
+ class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>
+ requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2>
+ constexpr mismatch_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>
+ mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) // since C++20
+
+ template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>
+ requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>
+ constexpr I find(I first, S last, const T& value, Proj proj = {}); // since C++20
+
+ template<input_range R, class T, class Proj = identity>
+ requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*>
+ constexpr borrowed_iterator_t<R>
+ find(R&& r, const T& value, Proj proj = {}); // since C++20
+
+ template<input_iterator I, sentinel_for<I> S, class Proj = identity,
+ indirect_unary_predicate<projected<I, Proj>> Pred>
+ constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); // since C++20
+
+ template<input_range R, class Proj = identity,
+ indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
+ constexpr borrowed_iterator_t<R>
+ find_if(R&& r, Pred pred, Proj proj = {}); // since C++20
+
+ template<input_iterator I, sentinel_for<I> S, class Proj = identity,
+ indirect_unary_predicate<projected<I, Proj>> Pred>
+ constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {}); // since C++20
+
+ template<input_range R, class Proj = identity,
+ indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred>
+ constexpr borrowed_iterator_t<R>
+ find_if_not(R&& r, Pred pred, Proj proj = {}); // since C++20
}
template <class InputIterator, class Predicate>
@@ -692,7 +731,6 @@ template <class BidirectionalIterator, class Compare>
#include <iterator>
#include <memory>
#include <type_traits>
-#include <utility>
#include <version>
#include <__algorithm/adjacent_find.h>
@@ -762,7 +800,12 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/pop_heap.h>
#include <__algorithm/prev_permutation.h>
#include <__algorithm/push_heap.h>
+#include <__algorithm/ranges_find.h>
+#include <__algorithm/ranges_find_if.h>
+#include <__algorithm/ranges_find_if_not.h>
+#include <__algorithm/ranges_max_element.h>
#include <__algorithm/ranges_min_element.h>
+#include <__algorithm/ranges_mismatch.h>
#include <__algorithm/ranges_swap_ranges.h>
#include <__algorithm/remove.h>
#include <__algorithm/remove_copy.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/any b/contrib/libs/cxxsupp/libcxx/include/any
index 2a85a66c29..fc1641f6e0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/any
+++ b/contrib/libs/cxxsupp/libcxx/include/any
@@ -83,6 +83,9 @@ namespace std {
#include <__availability>
#include <__config>
#include <__utility/forward.h>
+#include <__utility/in_place.h>
+#include <__utility/move.h>
+#include <__utility/unreachable.h>
#include <cstdlib>
#include <memory>
#include <type_traits>
@@ -364,6 +367,7 @@ namespace __any_imp
case _Action::_TypeInfo:
return __type_info();
}
+ __libcpp_unreachable();
}
template <class ..._Args>
@@ -447,6 +451,7 @@ namespace __any_imp
case _Action::_TypeInfo:
return __type_info();
}
+ __libcpp_unreachable();
}
template <class ..._Args>
diff --git a/contrib/libs/cxxsupp/libcxx/include/array b/contrib/libs/cxxsupp/libcxx/include/array
index 314d24935a..0b366080ee 100644
--- a/contrib/libs/cxxsupp/libcxx/include/array
+++ b/contrib/libs/cxxsupp/libcxx/include/array
@@ -115,11 +115,12 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
#include <__assert>
#include <__config>
#include <__tuple>
+#include <__utility/integer_sequence.h>
+#include <__utility/move.h>
#include <__utility/unreachable.h>
#include <iterator>
#include <stdexcept>
#include <type_traits>
-#include <utility>
#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/barrier b/contrib/libs/cxxsupp/libcxx/include/barrier
index 52cd129596..0382f2f827 100644
--- a/contrib/libs/cxxsupp/libcxx/include/barrier
+++ b/contrib/libs/cxxsupp/libcxx/include/barrier
@@ -108,12 +108,12 @@ void __destroy_barrier_algorithm_base(__barrier_algorithm_base* __barrier);
template<class _CompletionF>
class __barrier_base {
- ptrdiff_t __expected;
+ ptrdiff_t __expected_;
unique_ptr<__barrier_algorithm_base,
- void (*)(__barrier_algorithm_base*)> __base;
- __atomic_base<ptrdiff_t> __expected_adjustment;
- _CompletionF __completion;
- __atomic_base<__barrier_phase_t> __phase;
+ void (*)(__barrier_algorithm_base*)> __base_;
+ __atomic_base<ptrdiff_t> __expected_adjustment_;
+ _CompletionF __completion_;
+ __atomic_base<__barrier_phase_t> __phase_;
public:
using arrival_token = __barrier_phase_t;
@@ -124,22 +124,22 @@ public:
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
__barrier_base(ptrdiff_t __expected, _CompletionF __completion = _CompletionF())
- : __expected(__expected), __base(__construct_barrier_algorithm_base(this->__expected),
- &__destroy_barrier_algorithm_base),
- __expected_adjustment(0), __completion(std::move(__completion)), __phase(0)
+ : __expected_(__expected), __base_(__construct_barrier_algorithm_base(this->__expected_),
+ &__destroy_barrier_algorithm_base),
+ __expected_adjustment_(0), __completion_(std::move(__completion)), __phase_(0)
{
}
[[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
arrival_token arrive(ptrdiff_t update)
{
- auto const __old_phase = __phase.load(memory_order_relaxed);
+ auto const __old_phase = __phase_.load(memory_order_relaxed);
for(; update; --update)
- if(__arrive_barrier_algorithm_base(__base.get(), __old_phase)) {
- __completion();
- __expected += __expected_adjustment.load(memory_order_relaxed);
- __expected_adjustment.store(0, memory_order_relaxed);
- __phase.store(__old_phase + 2, memory_order_release);
- __phase.notify_all();
+ if(__arrive_barrier_algorithm_base(__base_.get(), __old_phase)) {
+ __completion_();
+ __expected_ += __expected_adjustment_.load(memory_order_relaxed);
+ __expected_adjustment_.store(0, memory_order_relaxed);
+ __phase_.store(__old_phase + 2, memory_order_release);
+ __phase_.notify_all();
}
return __old_phase;
}
@@ -147,14 +147,14 @@ public:
void wait(arrival_token&& __old_phase) const
{
auto const __test_fn = [this, __old_phase]() -> bool {
- return __phase.load(memory_order_acquire) != __old_phase;
+ return __phase_.load(memory_order_acquire) != __old_phase;
};
__libcpp_thread_poll_with_backoff(__test_fn, __libcpp_timed_backoff_policy());
}
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void arrive_and_drop()
{
- __expected_adjustment.fetch_sub(1, memory_order_relaxed);
+ __expected_adjustment_.fetch_sub(1, memory_order_relaxed);
(void)arrive(1);
}
};
diff --git a/contrib/libs/cxxsupp/libcxx/include/bitset b/contrib/libs/cxxsupp/libcxx/include/bitset
index d5c42991d9..3096231748 100644
--- a/contrib/libs/cxxsupp/libcxx/include/bitset
+++ b/contrib/libs/cxxsupp/libcxx/include/bitset
@@ -951,7 +951,7 @@ basic_string<_CharT, _Traits, _Allocator>
bitset<_Size>::to_string(_CharT __zero, _CharT __one) const
{
basic_string<_CharT, _Traits, _Allocator> __r(_Size, __zero);
- for (size_t __i = 0; __i < _Size; ++__i)
+ for (size_t __i = 0; __i != _Size; ++__i)
{
if ((*this)[__i])
__r[_Size - 1 - __i] = __one;
diff --git a/contrib/libs/cxxsupp/libcxx/include/charconv b/contrib/libs/cxxsupp/libcxx/include/charconv
index 86cbbd8c9a..3b766e6069 100644
--- a/contrib/libs/cxxsupp/libcxx/include/charconv
+++ b/contrib/libs/cxxsupp/libcxx/include/charconv
@@ -103,20 +103,20 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
+#ifndef _LIBCPP_CXX03_LANG
+
namespace __itoa {
-_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer) _NOEXCEPT;
-_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer) _NOEXCEPT;
+_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_FUNC_VIS char* __u64toa(uint64_t __value, char* __buffer) noexcept;
+_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_FUNC_VIS char* __u32toa(uint32_t __value, char* __buffer) noexcept;
} // namespace __itoa
-#ifndef _LIBCPP_CXX03_LANG
-
to_chars_result to_chars(char*, char*, bool, int = 10) = delete;
from_chars_result from_chars(const char*, const char*, bool, int = 10) = delete;
namespace __itoa
{
-static _LIBCPP_CONSTEXPR uint64_t __pow10_64[] = {
+static constexpr uint64_t __pow10_64[] = {
UINT64_C(0),
UINT64_C(10),
UINT64_C(100),
@@ -139,7 +139,7 @@ static _LIBCPP_CONSTEXPR uint64_t __pow10_64[] = {
UINT64_C(10000000000000000000),
};
-static _LIBCPP_CONSTEXPR uint32_t __pow10_32[] = {
+static constexpr uint32_t __pow10_32[] = {
UINT32_C(0), UINT32_C(10), UINT32_C(100),
UINT32_C(1000), UINT32_C(10000), UINT32_C(100000),
UINT32_C(1000000), UINT32_C(10000000), UINT32_C(100000000),
@@ -151,19 +151,19 @@ struct _LIBCPP_HIDDEN __traits_base
{
using type = uint64_t;
- static _LIBCPP_INLINE_VISIBILITY int __width(_Tp __v)
+ static _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v)
{
- auto __t = (64 - _VSTD::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
+ auto __t = (64 - std::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
return __t - (__v < __pow10_64[__t]) + 1;
}
_LIBCPP_AVAILABILITY_TO_CHARS
- static _LIBCPP_INLINE_VISIBILITY char* __convert(_Tp __v, char* __p)
+ static _LIBCPP_HIDE_FROM_ABI char* __convert(_Tp __v, char* __p)
{
return __u64toa(__v, __p);
}
- static _LIBCPP_INLINE_VISIBILITY decltype(__pow10_64)& __pow() { return __pow10_64; }
+ static _LIBCPP_HIDE_FROM_ABI decltype(__pow10_64)& __pow() { return __pow10_64; }
};
template <typename _Tp>
@@ -172,23 +172,23 @@ struct _LIBCPP_HIDDEN
{
using type = uint32_t;
- static _LIBCPP_INLINE_VISIBILITY int __width(_Tp __v)
+ static _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v)
{
- auto __t = (32 - _VSTD::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
+ auto __t = (32 - std::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
return __t - (__v < __pow10_32[__t]) + 1;
}
_LIBCPP_AVAILABILITY_TO_CHARS
- static _LIBCPP_INLINE_VISIBILITY char* __convert(_Tp __v, char* __p)
+ static _LIBCPP_HIDE_FROM_ABI char* __convert(_Tp __v, char* __p)
{
return __u32toa(__v, __p);
}
- static _LIBCPP_INLINE_VISIBILITY decltype(__pow10_32)& __pow() { return __pow10_32; }
+ static _LIBCPP_HIDE_FROM_ABI decltype(__pow10_32)& __pow() { return __pow10_32; }
};
template <typename _Tp>
-inline _LIBCPP_INLINE_VISIBILITY bool
+inline _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r)
{
auto __c = __a * __b;
@@ -197,7 +197,7 @@ __mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r)
}
template <typename _Tp>
-inline _LIBCPP_INLINE_VISIBILITY bool
+inline _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r)
{
auto __c = __a * __b;
@@ -206,7 +206,7 @@ __mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r)
}
template <typename _Tp>
-inline _LIBCPP_INLINE_VISIBILITY bool
+inline _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(_Tp __a, _Tp __b, _Tp& __r)
{
static_assert(is_unsigned<_Tp>::value, "");
@@ -220,7 +220,7 @@ __mul_overflowed(_Tp __a, _Tp __b, _Tp& __r)
}
template <typename _Tp, typename _Up>
-inline _LIBCPP_INLINE_VISIBILITY bool
+inline _LIBCPP_HIDE_FROM_ABI bool
__mul_overflowed(_Tp __a, _Up __b, _Tp& __r)
{
return __mul_overflowed(__a, static_cast<_Tp>(__b), __r);
@@ -229,12 +229,12 @@ __mul_overflowed(_Tp __a, _Up __b, _Tp& __r)
template <typename _Tp>
struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
{
- static _LIBCPP_CONSTEXPR int digits = numeric_limits<_Tp>::digits10 + 1;
+ static constexpr int digits = numeric_limits<_Tp>::digits10 + 1;
using __traits_base<_Tp>::__pow;
using typename __traits_base<_Tp>::type;
// precondition: at least one non-zero character available
- static _LIBCPP_INLINE_VISIBILITY char const*
+ static _LIBCPP_HIDE_FROM_ABI char const*
__read(char const* __p, char const* __ep, type& __a, type& __b)
{
type __cprod[digits];
@@ -255,7 +255,7 @@ struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
}
template <typename _It1, typename _It2, class _Up>
- static _LIBCPP_INLINE_VISIBILITY _Up
+ static _LIBCPP_HIDE_FROM_ABI _Up
__inner_product(_It1 __first1, _It1 __last1, _It2 __first2, _Up __init)
{
for (; __first1 < __last1; ++__first1, ++__first2)
@@ -267,7 +267,7 @@ struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
} // namespace __itoa
template <typename _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _Tp
+inline _LIBCPP_HIDE_FROM_ABI _Tp
__complement(_Tp __x)
{
static_assert(is_unsigned<_Tp>::value, "cast to unsigned first");
@@ -276,7 +276,7 @@ __complement(_Tp __x)
template <typename _Tp>
_LIBCPP_AVAILABILITY_TO_CHARS
-inline _LIBCPP_INLINE_VISIBILITY to_chars_result
+inline _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, _Tp __value, true_type)
{
auto __x = __to_unsigned_like(__value);
@@ -291,7 +291,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, true_type)
template <typename _Tp>
_LIBCPP_AVAILABILITY_TO_CHARS
-inline _LIBCPP_INLINE_VISIBILITY to_chars_result
+inline _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_itoa(char* __first, char* __last, _Tp __value, false_type)
{
using __tx = __itoa::__traits<_Tp>;
@@ -305,7 +305,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type)
template <typename _Tp>
_LIBCPP_AVAILABILITY_TO_CHARS
-inline _LIBCPP_INLINE_VISIBILITY to_chars_result
+inline _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
true_type)
{
@@ -320,7 +320,8 @@ __to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
}
template <typename _Tp>
-_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_INLINE_VISIBILITY int __to_chars_integral_width(_Tp __value, unsigned __base) {
+_LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_HIDE_FROM_ABI int
+__to_chars_integral_width(_Tp __value, unsigned __base) {
_LIBCPP_ASSERT(__value >= 0, "The function requires a non-negative value.");
unsigned __base_2 = __base * __base;
@@ -347,7 +348,7 @@ _LIBCPP_AVAILABILITY_TO_CHARS _LIBCPP_INLINE_VISIBILITY int __to_chars_integral_
template <typename _Tp>
_LIBCPP_AVAILABILITY_TO_CHARS
-inline _LIBCPP_INLINE_VISIBILITY to_chars_result
+inline _LIBCPP_HIDE_FROM_ABI to_chars_result
__to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
false_type)
{
@@ -371,7 +372,7 @@ __to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
_LIBCPP_AVAILABILITY_TO_CHARS
-inline _LIBCPP_INLINE_VISIBILITY to_chars_result
+inline _LIBCPP_HIDE_FROM_ABI to_chars_result
to_chars(char* __first, char* __last, _Tp __value)
{
return __to_chars_itoa(__first, __last, __value, is_signed<_Tp>());
@@ -379,7 +380,7 @@ to_chars(char* __first, char* __last, _Tp __value)
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
_LIBCPP_AVAILABILITY_TO_CHARS
-inline _LIBCPP_INLINE_VISIBILITY to_chars_result
+inline _LIBCPP_HIDE_FROM_ABI to_chars_result
to_chars(char* __first, char* __last, _Tp __value, int __base)
{
_LIBCPP_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]");
@@ -388,7 +389,7 @@ to_chars(char* __first, char* __last, _Tp __value, int __base)
}
template <typename _It, typename _Tp, typename _Fn, typename... _Ts>
-inline _LIBCPP_INLINE_VISIBILITY from_chars_result
+inline _LIBCPP_HIDE_FROM_ABI from_chars_result
__sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args)
{
using __tl = numeric_limits<_Tp>;
@@ -411,13 +412,13 @@ __sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args)
if (__x <= __complement(__to_unsigned_like(__tl::min())))
{
__x = __complement(__x);
- _VSTD::memcpy(&__value, &__x, sizeof(__x));
+ std::memcpy(&__value, &__x, sizeof(__x));
return __r;
}
}
else
{
- if (__x <= __tl::max())
+ if (__x <= __to_unsigned_like(__tl::max()))
{
__value = __x;
return __r;
@@ -428,7 +429,7 @@ __sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args)
}
template <typename _Tp>
-inline _LIBCPP_INLINE_VISIBILITY bool
+inline _LIBCPP_HIDE_FROM_ABI bool
__in_pattern(_Tp __c)
{
return '0' <= __c && __c <= '9';
@@ -439,11 +440,11 @@ struct _LIBCPP_HIDDEN __in_pattern_result
bool __ok;
int __val;
- explicit _LIBCPP_INLINE_VISIBILITY operator bool() const { return __ok; }
+ explicit _LIBCPP_HIDE_FROM_ABI operator bool() const { return __ok; }
};
template <typename _Tp>
-inline _LIBCPP_INLINE_VISIBILITY __in_pattern_result
+inline _LIBCPP_HIDE_FROM_ABI __in_pattern_result
__in_pattern(_Tp __c, int __base)
{
if (__base <= 10)
@@ -457,15 +458,15 @@ __in_pattern(_Tp __c, int __base)
}
template <typename _It, typename _Tp, typename _Fn, typename... _Ts>
-inline _LIBCPP_INLINE_VISIBILITY from_chars_result
+inline _LIBCPP_HIDE_FROM_ABI from_chars_result
__subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
_Ts... __args)
{
- auto __find_non_zero = [](_It __first, _It __last) {
- for (; __first != __last; ++__first)
- if (*__first != '0')
+ auto __find_non_zero = [](_It __firstit, _It __lastit) {
+ for (; __firstit != __lastit; ++__firstit)
+ if (*__firstit != '0')
break;
- return __first;
+ return __firstit;
};
auto __p = __find_non_zero(__first, __last);
@@ -494,7 +495,7 @@ __subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
}
template <typename _Tp, typename enable_if<is_unsigned<_Tp>::value, int>::type = 0>
-inline _LIBCPP_INLINE_VISIBILITY from_chars_result
+inline _LIBCPP_HIDE_FROM_ABI from_chars_result
__from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
{
using __tx = __itoa::__traits<_Tp>;
@@ -502,16 +503,16 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
return __subject_seq_combinator(
__first, __last, __value,
- [](const char* __first, const char* __last,
- _Tp& __value) -> from_chars_result {
+ [](const char* _First, const char* _Last,
+ _Tp& __val) -> from_chars_result {
__output_type __a, __b;
- auto __p = __tx::__read(__first, __last, __a, __b);
- if (__p == __last || !__in_pattern(*__p))
+ auto __p = __tx::__read(_First, _Last, __a, __b);
+ if (__p == _Last || !__in_pattern(*__p))
{
__output_type __m = numeric_limits<_Tp>::max();
if (__m >= __a && __m - __a >= __b)
{
- __value = __a + __b;
+ __val = __a + __b;
return {__p, {}};
}
}
@@ -520,7 +521,7 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
}
template <typename _Tp, typename enable_if<is_signed<_Tp>::value, int>::type = 0>
-inline _LIBCPP_INLINE_VISIBILITY from_chars_result
+inline _LIBCPP_HIDE_FROM_ABI from_chars_result
__from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
{
using __t = decltype(__to_unsigned_like(__value));
@@ -528,7 +529,7 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
}
template <typename _Tp, typename enable_if<is_unsigned<_Tp>::value, int>::type = 0>
-inline _LIBCPP_INLINE_VISIBILITY from_chars_result
+inline _LIBCPP_HIDE_FROM_ABI from_chars_result
__from_chars_integral(const char* __first, const char* __last, _Tp& __value,
int __base)
{
@@ -537,21 +538,21 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
return __subject_seq_combinator(
__first, __last, __value,
- [](const char* __p, const char* __lastx, _Tp& __value,
- int __base) -> from_chars_result {
+ [](const char* __p, const char* __lastp, _Tp& __val,
+ int _Base) -> from_chars_result {
using __tl = numeric_limits<_Tp>;
- auto __digits = __tl::digits / log2f(float(__base));
- _Tp __a = __in_pattern(*__p++, __base).__val, __b = 0;
+ auto __digits = __tl::digits / log2f(float(_Base));
+ _Tp __a = __in_pattern(*__p++, _Base).__val, __b = 0;
- for (int __i = 1; __p != __lastx; ++__i, ++__p)
+ for (int __i = 1; __p != __lastp; ++__i, ++__p)
{
- if (auto __c = __in_pattern(*__p, __base))
+ if (auto __c = __in_pattern(*__p, _Base))
{
if (__i < __digits - 1)
- __a = __a * __base + __c.__val;
+ __a = __a * _Base + __c.__val;
else
{
- if (!__itoa::__mul_overflowed(__a, __base, __a))
+ if (!__itoa::__mul_overflowed(__a, _Base, __a))
++__p;
__b = __c.__val;
break;
@@ -561,11 +562,11 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
break;
}
- if (__p == __lastx || !__in_pattern(*__p, __base))
+ if (__p == __lastp || !__in_pattern(*__p, _Base))
{
if (__tl::max() - __a >= __b)
{
- __value = __a + __b;
+ __val = __a + __b;
return {__p, {}};
}
}
@@ -575,7 +576,7 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
}
template <typename _Tp, typename enable_if<is_signed<_Tp>::value, int>::type = 0>
-inline _LIBCPP_INLINE_VISIBILITY from_chars_result
+inline _LIBCPP_HIDE_FROM_ABI from_chars_result
__from_chars_integral(const char* __first, const char* __last, _Tp& __value,
int __base)
{
@@ -585,14 +586,14 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
}
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_INLINE_VISIBILITY from_chars_result
+inline _LIBCPP_HIDE_FROM_ABI from_chars_result
from_chars(const char* __first, const char* __last, _Tp& __value)
{
return __from_chars_atoi(__first, __last, __value);
}
template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_INLINE_VISIBILITY from_chars_result
+inline _LIBCPP_HIDE_FROM_ABI from_chars_result
from_chars(const char* __first, const char* __last, _Tp& __value, int __base)
{
_LIBCPP_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]");
diff --git a/contrib/libs/cxxsupp/libcxx/include/cstdlib b/contrib/libs/cxxsupp/libcxx/include/cstdlib
index 82fe9efba8..3d83341e70 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cstdlib
+++ b/contrib/libs/cxxsupp/libcxx/include/cstdlib
@@ -115,10 +115,8 @@ using ::abort _LIBCPP_USING_IF_EXISTS;
using ::atexit _LIBCPP_USING_IF_EXISTS;
using ::exit _LIBCPP_USING_IF_EXISTS;
using ::_Exit _LIBCPP_USING_IF_EXISTS;
-#ifndef _LIBCPP_WINDOWS_STORE_APP
using ::getenv _LIBCPP_USING_IF_EXISTS;
using ::system _LIBCPP_USING_IF_EXISTS;
-#endif
using ::bsearch _LIBCPP_USING_IF_EXISTS;
using ::qsort _LIBCPP_USING_IF_EXISTS;
using ::abs _LIBCPP_USING_IF_EXISTS;
@@ -132,11 +130,11 @@ using ::mbtowc _LIBCPP_USING_IF_EXISTS;
using ::wctomb _LIBCPP_USING_IF_EXISTS;
using ::mbstowcs _LIBCPP_USING_IF_EXISTS;
using ::wcstombs _LIBCPP_USING_IF_EXISTS;
-#if !defined(_LIBCPP_CXX03_LANG) && defined(_LIBCPP_HAS_QUICK_EXIT)
+#if !defined(_LIBCPP_CXX03_LANG) && __has_attribute(using_if_exists)
using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
using ::quick_exit _LIBCPP_USING_IF_EXISTS;
#endif
-#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_ALIGNED_ALLOC)
+#if _LIBCPP_STD_VER > 14 && __has_attribute(using_if_exists) && !defined(_LIBCPP_MSVCRT)
using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/ctime b/contrib/libs/cxxsupp/libcxx/include/ctime
index d5c094f2cc..cb4ceb1fe5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ctime
+++ b/contrib/libs/cxxsupp/libcxx/include/ctime
@@ -52,27 +52,13 @@ int timespec_get( struct timespec *ts, int base); // C++17
# pragma GCC system_header
#endif
-// FIXME:
-// Apple SDKs don't define ::timespec_get unconditionally in C++ mode. This
-// should be fixed in future SDKs, but for the time being we need to avoid
-// trying to use that declaration when the SDK doesn't provide it. Note that
-// we're detecting this here instead of in <__config> because we can't include
-// system headers from <__config>, since it leads to circular module dependencies.
-// This is also meant to be a very temporary workaround until the SDKs are fixed.
-#if defined(__APPLE__) && !__has_attribute(using_if_exists)
-# include <sys/cdefs.h>
-# if defined(_LIBCPP_HAS_TIMESPEC_GET) && (__DARWIN_C_LEVEL < __DARWIN_C_FULL)
-# define _LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED
-# endif
-#endif
-
_LIBCPP_BEGIN_NAMESPACE_STD
using ::clock_t _LIBCPP_USING_IF_EXISTS;
using ::size_t _LIBCPP_USING_IF_EXISTS;
using ::time_t _LIBCPP_USING_IF_EXISTS;
using ::tm _LIBCPP_USING_IF_EXISTS;
-#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET)
+#if _LIBCPP_STD_VER > 14 && __has_attribute(using_if_exists)
using ::timespec _LIBCPP_USING_IF_EXISTS;
#endif
using ::clock _LIBCPP_USING_IF_EXISTS;
@@ -84,7 +70,7 @@ using ::ctime _LIBCPP_USING_IF_EXISTS;
using ::gmtime _LIBCPP_USING_IF_EXISTS;
using ::localtime _LIBCPP_USING_IF_EXISTS;
using ::strftime _LIBCPP_USING_IF_EXISTS;
-#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET) && !defined(_LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED)
+#if _LIBCPP_STD_VER > 14 && __has_attribute(using_if_exists)
using ::timespec_get _LIBCPP_USING_IF_EXISTS;
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/deque b/contrib/libs/cxxsupp/libcxx/include/deque
index 4b7058f1eb..a1b22eb2f6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/deque
+++ b/contrib/libs/cxxsupp/libcxx/include/deque
@@ -174,6 +174,8 @@ template <class T, class Allocator, class Predicate>
#include <__iterator/iterator_traits.h>
#include <__split_buffer>
#include <__utility/forward.h>
+#include <__utility/move.h>
+#include <__utility/swap.h>
#include <compare>
#include <initializer_list>
#include <iterator>
diff --git a/contrib/libs/cxxsupp/libcxx/include/format b/contrib/libs/cxxsupp/libcxx/include/format
index 356a3051b9..ebb84dcc83 100644
--- a/contrib/libs/cxxsupp/libcxx/include/format
+++ b/contrib/libs/cxxsupp/libcxx/include/format
@@ -160,12 +160,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// If the compiler has no concepts support, the format header will be disabled.
-// Without concepts support enable_if needs to be used and that too much effort
-// to support compilers with partial C++20 support.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-
// TODO FMT Move the implementation in this file to its own granular headers.
// TODO FMT Evaluate which templates should be external templates. This
@@ -550,7 +544,6 @@ formatted_size(locale __loc, wstring_view __fmt, const _Args&... __args) {
#endif // _LIBCPP_HAS_NO_LOCALIZATION
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/fstream b/contrib/libs/cxxsupp/libcxx/include/fstream
index 80bda63755..2f1cd32b35 100644
--- a/contrib/libs/cxxsupp/libcxx/include/fstream
+++ b/contrib/libs/cxxsupp/libcxx/include/fstream
@@ -184,9 +184,12 @@ typedef basic_fstream<wchar_t> wfstream;
#include <__availability>
#include <__config>
#include <__locale>
+#include <__utility/move.h>
+#include <__utility/swap.h>
#include <__utility/unreachable.h>
#include <cstdio>
#include <cstdlib>
+#include <cstring>
#include <istream>
#include <ostream>
#include <version>
diff --git a/contrib/libs/cxxsupp/libcxx/include/functional b/contrib/libs/cxxsupp/libcxx/include/functional
index d4889294f7..d097861a90 100644
--- a/contrib/libs/cxxsupp/libcxx/include/functional
+++ b/contrib/libs/cxxsupp/libcxx/include/functional
@@ -525,7 +525,6 @@ POLICY: For non-variadic implementations, the number of arguments is limited
#include <tuple>
#include <type_traits>
#include <typeinfo>
-#include <utility>
#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/future b/contrib/libs/cxxsupp/libcxx/include/future
index a4c8ccc6d6..162d400136 100644
--- a/contrib/libs/cxxsupp/libcxx/include/future
+++ b/contrib/libs/cxxsupp/libcxx/include/future
@@ -370,6 +370,7 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
#include <__memory/uses_allocator.h>
#include <__utility/auto_cast.h>
#include <__utility/forward.h>
+#include <__utility/move.h>
#include <exception>
#include <memory>
#include <mutex>
diff --git a/contrib/libs/cxxsupp/libcxx/include/iomanip b/contrib/libs/cxxsupp/libcxx/include/iomanip
index f34c718b09..c4d8351926 100644
--- a/contrib/libs/cxxsupp/libcxx/include/iomanip
+++ b/contrib/libs/cxxsupp/libcxx/include/iomanip
@@ -513,10 +513,12 @@ put_time(const tm* __tm, const _CharT* __fmt)
return __iom_t10<_CharT>(__tm, __fmt);
}
-template <class _CharT, class _Traits, class _ForwardIterator>
-basic_ostream<_CharT, _Traits>&
+#if _LIBCPP_STD_VER >= 11
+
+template <class _CharT, class _Traits>
+_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
__quoted_output(basic_ostream<_CharT, _Traits>& __os,
- _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape)
+ const _CharT *__first, const _CharT *__last, _CharT __delim, _CharT __escape)
{
basic_string<_CharT, _Traits> __str;
__str.push_back(__delim);
@@ -530,7 +532,7 @@ __quoted_output(basic_ostream<_CharT, _Traits>& __os,
}
template <class _CharT, class _Traits, class _String>
-basic_istream<_CharT, _Traits>&
+_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
__quoted_input(basic_istream<_CharT, _Traits>& __is, _String& __string, _CharT __delim, _CharT __escape)
{
__string.clear();
@@ -546,7 +548,7 @@ __quoted_input(basic_istream<_CharT, _Traits>& __is, _String& __string, _CharT _
return __is;
}
- __save_flags<_CharT, _Traits> sf(__is);
+ __save_flags<_CharT, _Traits> __sf(__is);
std::noskipws(__is);
while (true) {
__is >> __c;
@@ -563,16 +565,27 @@ __quoted_input(basic_istream<_CharT, _Traits>& __is, _String& __string, _CharT _
return __is;
}
-template <class _CharT, class _Traits, class _Iter>
-basic_ostream<_CharT, _Traits>& operator<<(
- basic_ostream<_CharT, _Traits>& __os,
- const __quoted_output_proxy<_CharT, _Iter, _Traits>& __proxy)
+template <class _CharT, class _Traits>
+struct _LIBCPP_HIDDEN __quoted_output_proxy
{
- return std::__quoted_output(__os, __proxy.__first_, __proxy.__last_, __proxy.__delim_, __proxy.__escape_);
-}
+ const _CharT *__first_;
+ const _CharT *__last_;
+ _CharT __delim_;
+ _CharT __escape_;
+
+ _LIBCPP_HIDE_FROM_ABI
+ explicit __quoted_output_proxy(const _CharT *__f, const _CharT *__l, _CharT __d, _CharT __e)
+ : __first_(__f), __last_(__l), __delim_(__d), __escape_(__e) {}
+
+ template<class _T2, __enable_if_t<_IsSame<_Traits, void>::value || _IsSame<_Traits, _T2>::value>* = nullptr>
+ friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _T2>&
+ operator<<(basic_ostream<_CharT, _T2>& __os, const __quoted_output_proxy& __p) {
+ return std::__quoted_output(__os, __p.__first_, __p.__last_, __p.__delim_, __p.__escape_);
+ }
+};
template <class _CharT, class _Traits, class _Allocator>
-struct __quoted_proxy
+struct _LIBCPP_HIDDEN __quoted_proxy
{
basic_string<_CharT, _Traits, _Allocator>& __string_;
_CharT __delim_;
@@ -581,76 +594,66 @@ struct __quoted_proxy
_LIBCPP_HIDE_FROM_ABI
explicit __quoted_proxy(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __d, _CharT __e)
: __string_(__s), __delim_(__d), __escape_(__e) {}
+
+ friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, const __quoted_proxy& __p) {
+ return std::__quoted_output(__os, __p.__string_.data(), __p.__string_.data() + __p.__string_.size(), __p.__delim_, __p.__escape_);
+ }
+
+ friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, const __quoted_proxy& __p) {
+ return std::__quoted_input(__is, __p.__string_, __p.__delim_, __p.__escape_);
+ }
};
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_INLINE_VISIBILITY
-basic_ostream<_CharT, _Traits>& operator<<(
- basic_ostream<_CharT, _Traits>& __os,
- const __quoted_proxy<_CharT, _Traits, _Allocator>& __proxy)
+_LIBCPP_HIDE_FROM_ABI
+__quoted_output_proxy<_CharT, _Traits>
+__quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return std::__quoted_output(__os, __proxy.__string_.cbegin(), __proxy.__string_.cend(), __proxy.__delim_, __proxy.__escape_);
+ return __quoted_output_proxy<_CharT, _Traits>(__s.data(), __s.data() + __s.size(), __delim, __escape);
}
-// extractor for non-const basic_string& proxies
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_INLINE_VISIBILITY
-basic_istream<_CharT, _Traits>& operator>>(
- basic_istream<_CharT, _Traits>& __is,
- const __quoted_proxy<_CharT, _Traits, _Allocator>& __proxy)
+_LIBCPP_HIDE_FROM_ABI
+__quoted_proxy<_CharT, _Traits, _Allocator>
+__quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return std::__quoted_input(__is, __proxy.__string_, __proxy.__delim_, __proxy.__escape_);
+ return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
}
+#endif // _LIBCPP_STD_VER >= 11
+
+#if _LIBCPP_STD_VER > 11
+
template <class _CharT>
-_LIBCPP_INLINE_VISIBILITY
-__quoted_output_proxy<_CharT, const _CharT *>
-quoted(const _CharT *__s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
+_LIBCPP_HIDE_FROM_ABI
+auto quoted(const _CharT *__s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
const _CharT *__end = __s;
while (*__end) ++__end;
- return __quoted_output_proxy<_CharT, const _CharT *>(__s, __end, __delim, __escape);
+ return __quoted_output_proxy<_CharT, void>(__s, __end, __delim, __escape);
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_INLINE_VISIBILITY
-__quoted_output_proxy<_CharT, typename basic_string <_CharT, _Traits, _Allocator>::const_iterator>
-__quoted(const basic_string <_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
+_LIBCPP_HIDE_FROM_ABI
+auto quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return __quoted_output_proxy<_CharT, typename basic_string<_CharT, _Traits, _Allocator>::const_iterator>(__s.cbegin(), __s.cend(), __delim, __escape);
+ return __quoted_output_proxy<_CharT, _Traits>(__s.data(), __s.data() + __s.size(), __delim, __escape);
}
template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_INLINE_VISIBILITY
-__quoted_proxy<_CharT, _Traits, _Allocator>
-__quoted(basic_string <_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
+_LIBCPP_HIDE_FROM_ABI
+auto quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
}
-#if _LIBCPP_STD_VER > 11
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_INLINE_VISIBILITY
-__quoted_output_proxy<_CharT, typename basic_string<_CharT, _Traits, _Allocator>::const_iterator>
-quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
-{
- return std::__quoted(__s, __delim, __escape);
-}
-
-template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_INLINE_VISIBILITY
-__quoted_proxy<_CharT, _Traits, _Allocator>
-quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
-{
- return std::__quoted(__s, __delim, __escape);
-}
-
template <class _CharT, class _Traits>
-__quoted_output_proxy<_CharT, const _CharT *, _Traits>
-quoted(basic_string_view<_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
+_LIBCPP_HIDE_FROM_ABI
+auto quoted(basic_string_view<_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return __quoted_output_proxy<_CharT, const _CharT *, _Traits>(__sv.data(), __sv.data() + __sv.size(), __delim, __escape);
+ return __quoted_output_proxy<_CharT, _Traits>(__sv.data(), __sv.data() + __sv.size(), __delim, __escape);
}
#endif // _LIBCPP_STD_VER > 11
diff --git a/contrib/libs/cxxsupp/libcxx/include/ios b/contrib/libs/cxxsupp/libcxx/include/ios
index 874227ac73..15053e5246 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ios
+++ b/contrib/libs/cxxsupp/libcxx/include/ios
@@ -213,6 +213,7 @@ storage-class-specifier const error_category& iostream_category() noexcept;
#include <__config>
#include <__ios/fpos.h>
#include <__locale>
+#include <__utility/swap.h>
#include <iosfwd>
#include <system_error>
#include <version>
diff --git a/contrib/libs/cxxsupp/libcxx/include/istream b/contrib/libs/cxxsupp/libcxx/include/istream
index 8735a79c21..8259c5252b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/istream
+++ b/contrib/libs/cxxsupp/libcxx/include/istream
@@ -1592,7 +1592,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
size_t __c = 0;
_CharT __zero = __ct.widen('0');
_CharT __one = __ct.widen('1');
- while (__c < _Size)
+ while (__c != _Size)
{
typename _Traits::int_type __i = __is.rdbuf()->sgetc();
if (_Traits::eq_int_type(__i, _Traits::eof()))
diff --git a/contrib/libs/cxxsupp/libcxx/include/iterator b/contrib/libs/cxxsupp/libcxx/include/iterator
index 6e2eb4a78c..852fa353a9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/iterator
+++ b/contrib/libs/cxxsupp/libcxx/include/iterator
@@ -654,7 +654,6 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <cstddef>
#include <initializer_list>
#include <type_traits>
-#include <utility>
#include <version>
// TODO: remove these headers
diff --git a/contrib/libs/cxxsupp/libcxx/include/latch b/contrib/libs/cxxsupp/libcxx/include/latch
index e1e15190ae..7df7fdaa85 100644
--- a/contrib/libs/cxxsupp/libcxx/include/latch
+++ b/contrib/libs/cxxsupp/libcxx/include/latch
@@ -91,10 +91,9 @@ public:
inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void wait() const
{
- auto const __test_fn = [=]() -> bool {
+ __cxx_atomic_wait(&__a.__a_, [&]() -> bool {
return try_wait();
- };
- __cxx_atomic_wait(&__a.__a_, __test_fn);
+ });
}
inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void arrive_and_wait(ptrdiff_t __update = 1)
diff --git a/contrib/libs/cxxsupp/libcxx/include/list b/contrib/libs/cxxsupp/libcxx/include/list
index b1f6c57007..cb0653d03a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/list
+++ b/contrib/libs/cxxsupp/libcxx/include/list
@@ -188,6 +188,8 @@ template <class T, class Allocator, class Predicate>
#include <__config>
#include <__debug>
#include <__utility/forward.h>
+#include <__utility/move.h>
+#include <__utility/swap.h>
#include <initializer_list>
#include <iterator>
#include <limits>
diff --git a/contrib/libs/cxxsupp/libcxx/include/map b/contrib/libs/cxxsupp/libcxx/include/map
index 9a9826f472..fa7b877966 100644
--- a/contrib/libs/cxxsupp/libcxx/include/map
+++ b/contrib/libs/cxxsupp/libcxx/include/map
@@ -537,13 +537,13 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
#include <__node_handle>
#include <__tree>
#include <__utility/forward.h>
+#include <__utility/swap.h>
#include <compare>
#include <functional>
#include <initializer_list>
#include <iterator> // __libcpp_erase_if_container
#include <memory>
#include <type_traits>
-#include <utility>
#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/memory b/contrib/libs/cxxsupp/libcxx/include/memory
index 72fa9cf342..68119edf15 100644
--- a/contrib/libs/cxxsupp/libcxx/include/memory
+++ b/contrib/libs/cxxsupp/libcxx/include/memory
@@ -834,7 +834,6 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
#include <tuple>
#include <type_traits>
#include <typeinfo>
-#include <utility>
#include <version>
// TODO: remove these headers
diff --git a/contrib/libs/cxxsupp/libcxx/include/optional b/contrib/libs/cxxsupp/libcxx/include/optional
index fd17b0821a..35bfdd8bf1 100644
--- a/contrib/libs/cxxsupp/libcxx/include/optional
+++ b/contrib/libs/cxxsupp/libcxx/include/optional
@@ -162,13 +162,14 @@ template<class T>
#include <__availability>
#include <__concepts/invocable.h>
#include <__config>
+#include <__utility/in_place.h>
+#include <__utility/swap.h>
#include <compare>
#include <functional>
#include <initializer_list>
#include <new>
#include <stdexcept>
#include <type_traits>
-#include <utility>
#include <version>
// TODO: remove these headers
diff --git a/contrib/libs/cxxsupp/libcxx/include/ranges b/contrib/libs/cxxsupp/libcxx/include/ranges
index 25ed65ba1e..b6c028d221 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ranges
+++ b/contrib/libs/cxxsupp/libcxx/include/ranges
@@ -256,6 +256,7 @@ namespace std {
#include <__ranges/transform_view.h>
#include <__ranges/view_interface.h>
#include <__ranges/views.h>
+#include <__tuple> // TODO: <ranges> has to export std::tuple_size. Replace this, once <tuple> is granularized.
#include <compare> // Required by the standard.
#include <initializer_list> // Required by the standard.
#include <iterator> // Required by the standard.
diff --git a/contrib/libs/cxxsupp/libcxx/include/regex b/contrib/libs/cxxsupp/libcxx/include/regex
index 68922f66e4..661a08b7c3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/regex
+++ b/contrib/libs/cxxsupp/libcxx/include/regex
@@ -767,6 +767,8 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
#include <__config>
#include <__iterator/wrap_iter.h>
#include <__locale>
+#include <__utility/move.h>
+#include <__utility/swap.h>
#include <compare>
#include <deque>
#include <initializer_list>
@@ -774,7 +776,6 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
#include <memory>
#include <stdexcept>
#include <string>
-#include <utility>
#include <vector>
#include <version>
@@ -2094,14 +2095,14 @@ class __r_anchor_multiline
{
typedef __owns_one_state<_CharT> base;
- bool __multiline;
+ bool __multiline_;
public:
typedef _VSTD::__state<_CharT> __state;
_LIBCPP_INLINE_VISIBILITY
__r_anchor_multiline(bool __multiline, __node<_CharT>* __s)
- : base(__s), __multiline(__multiline) {}
+ : base(__s), __multiline_(__multiline) {}
virtual void __exec(__state&) const;
};
@@ -2116,7 +2117,7 @@ __r_anchor_multiline<_CharT>::__exec(__state& __s) const
__s.__do_ = __state::__accept_but_not_consume;
__s.__node_ = this->first();
}
- else if (__multiline && __is_eol(*__s.__current_))
+ else if (__multiline_ && __is_eol(*__s.__current_))
{
__s.__do_ = __state::__accept_but_not_consume;
__s.__node_ = this->first();
diff --git a/contrib/libs/cxxsupp/libcxx/include/span b/contrib/libs/cxxsupp/libcxx/include/span
index 0101dcb822..c65e6d261e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/span
+++ b/contrib/libs/cxxsupp/libcxx/include/span
@@ -158,7 +158,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max();
template <typename _Tp, size_t _Extent = dynamic_extent> class span;
-
template <class _Tp>
struct __is_std_array : false_type {};
@@ -171,7 +170,23 @@ struct __is_std_span : false_type {};
template <class _Tp, size_t _Sz>
struct __is_std_span<span<_Tp, _Sz>> : true_type {};
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+// This is a temporary workaround until we ship <ranges> -- we've unfortunately been
+// shipping <span> before its API was finalized, and we used to provide a constructor
+// from container types that had the requirements below. To avoid breaking code that
+// has started relying on the range-based constructor until we ship all of <ranges>,
+// we emulate the constructor requirements like this.
+template <class _Range, class _ElementType>
+concept __span_compatible_range =
+ !__is_std_span<remove_cvref_t<_Range>>::value &&
+ !__is_std_array<remove_cvref_t<_Range>>::value &&
+ !is_array_v<remove_cvref_t<_Range>> &&
+ requires (_Range&& __r) {
+ data(std::forward<_Range>(__r));
+ size(std::forward<_Range>(__r));
+ } &&
+ is_convertible_v<remove_reference_t<ranges::range_reference_t<_Range>>(*)[], _ElementType(*)[]>;
+#else
template <class _Range, class _ElementType>
concept __span_compatible_range =
ranges::contiguous_range<_Range> &&
@@ -181,30 +196,7 @@ concept __span_compatible_range =
!__is_std_array<remove_cvref_t<_Range>>::value &&
!is_array_v<remove_cvref_t<_Range>> &&
is_convertible_v<remove_reference_t<ranges::range_reference_t<_Range>>(*)[], _ElementType(*)[]>;
-#else
-template <class _Tp, class _ElementType, class = void>
-struct __is_span_compatible_container : public false_type {};
-
-template <class _Tp, class _ElementType>
-struct __is_span_compatible_container<_Tp, _ElementType,
- void_t<
- // is not a specialization of span
- enable_if_t<!__is_std_span<_Tp>::value, nullptr_t>,
- // is not a specialization of array
- enable_if_t<!__is_std_array<_Tp>::value, nullptr_t>,
- // is_array_v<Container> is false,
- enable_if_t<!is_array_v<_Tp>, nullptr_t>,
- // data(cont) and size(cont) are well formed
- decltype(data(declval<_Tp>())),
- decltype(size(declval<_Tp>())),
- // remove_pointer_t<decltype(data(cont))>(*)[] is convertible to ElementType(*)[]
- enable_if_t<
- is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
- _ElementType(*)[]>,
- nullptr_t>
- >>
- : public true_type {};
-#endif
+#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
template <typename _Tp, size_t _Extent>
class _LIBCPP_TEMPLATE_VIS span {
@@ -234,7 +226,6 @@ public:
constexpr span (const span&) noexcept = default;
constexpr span& operator=(const span&) noexcept = default;
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
template <class _It,
enable_if_t<contiguous_iterator<_It> &&
is_convertible_v<remove_reference_t<iter_reference_t<_It>>(*)[], element_type (*)[]>,
@@ -258,12 +249,6 @@ public:
_LIBCPP_ASSERT(__last - __first == _Extent,
"invalid range in span's constructor (iterator, sentinel): last - first != extent");
}
-#else
- _LIBCPP_INLINE_VISIBILITY constexpr explicit span(pointer __ptr, size_type __count) : __data{__ptr}
- { (void)__count; _LIBCPP_ASSERT(_Extent == __count, "size mismatch in span's constructor (ptr, len)"); }
- _LIBCPP_INLINE_VISIBILITY constexpr explicit span(pointer __f, pointer __l) : __data{__f}
- { (void)__l; _LIBCPP_ASSERT(_Extent == distance(__f, __l), "size mismatch in span's constructor (ptr, ptr)"); }
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
_LIBCPP_INLINE_VISIBILITY constexpr span(type_identity_t<element_type> (&__arr)[_Extent]) noexcept : __data{__arr} {}
@@ -277,29 +262,26 @@ public:
_LIBCPP_INLINE_VISIBILITY
constexpr span(const array<_OtherElementType, _Extent>& __arr) noexcept : __data{__arr.data()} {}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
- template <__span_compatible_range<element_type> _Range>
+#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+ template <class _Container>
+ requires __span_compatible_range<_Container, element_type>
_LIBCPP_INLINE_VISIBILITY
- constexpr explicit span(_Range&& __r) : __data{ranges::data(__r)} {
- _LIBCPP_ASSERT(ranges::size(__r) == _Extent, "size mismatch in span's constructor (range)");
+ constexpr explicit span(_Container& __c) : __data{std::data(__c)} {
+ _LIBCPP_ASSERT(std::size(__c) == _Extent, "size mismatch in span's constructor (range)");
}
-#else
template <class _Container>
+ requires __span_compatible_range<const _Container, element_type>
_LIBCPP_INLINE_VISIBILITY
- constexpr explicit span( _Container& __c,
- enable_if_t<__is_span_compatible_container<_Container, _Tp>::value, nullptr_t> = nullptr)
- : __data{_VSTD::data(__c)} {
- _LIBCPP_ASSERT(_Extent == _VSTD::size(__c), "size mismatch in span's constructor (range)");
- }
-
- template <class _Container>
+ constexpr explicit span(const _Container& __c) : __data{std::data(__c)} {
+ _LIBCPP_ASSERT(std::size(__c) == _Extent, "size mismatch in span's constructor (range)");
+ }
+#else
+ template <__span_compatible_range<element_type> _Range>
_LIBCPP_INLINE_VISIBILITY
- constexpr explicit span(const _Container& __c,
- enable_if_t<__is_span_compatible_container<const _Container, _Tp>::value, nullptr_t> = nullptr)
- : __data{_VSTD::data(__c)} {
- _LIBCPP_ASSERT(_Extent == _VSTD::size(__c), "size mismatch in span's constructor (range)");
- }
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+ constexpr explicit span(_Range&& __r) : __data{ranges::data(__r)} {
+ _LIBCPP_ASSERT(ranges::size(__r) == _Extent, "size mismatch in span's constructor (range)");
+ }
+#endif
template <class _OtherElementType>
_LIBCPP_INLINE_VISIBILITY
@@ -446,7 +428,6 @@ public:
constexpr span (const span&) noexcept = default;
constexpr span& operator=(const span&) noexcept = default;
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
template <class _It,
enable_if_t<contiguous_iterator<_It> &&
is_convertible_v<remove_reference_t<iter_reference_t<_It> > (*)[], element_type (*)[]>,
@@ -463,10 +444,6 @@ public:
_LIBCPP_INLINE_VISIBILITY
constexpr span(_It __first, _End __last)
: __data(_VSTD::to_address(__first)), __size(__last - __first) {}
-#else
- _LIBCPP_INLINE_VISIBILITY constexpr span(pointer __ptr, size_type __count) : __data{__ptr}, __size{__count} {}
- _LIBCPP_INLINE_VISIBILITY constexpr span(pointer __f, pointer __l) : __data{__f}, __size{static_cast<size_t>(distance(__f, __l))} {}
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
template <size_t _Sz>
_LIBCPP_INLINE_VISIBILITY
@@ -482,23 +459,20 @@ public:
_LIBCPP_INLINE_VISIBILITY
constexpr span(const array<_OtherElementType, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
- template <__span_compatible_range<element_type> _Range>
- _LIBCPP_INLINE_VISIBILITY
- constexpr span(_Range&& __r) : __data(ranges::data(__r)), __size{ranges::size(__r)} {}
-#else
+#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
template <class _Container>
+ requires __span_compatible_range<_Container, element_type>
_LIBCPP_INLINE_VISIBILITY
- constexpr span( _Container& __c,
- enable_if_t<__is_span_compatible_container<_Container, _Tp>::value, nullptr_t> = nullptr)
- : __data{_VSTD::data(__c)}, __size{(size_type) _VSTD::size(__c)} {}
-
+ constexpr span(_Container& __c) : __data(std::data(__c)), __size{std::size(__c)} {}
template <class _Container>
+ requires __span_compatible_range<const _Container, element_type>
+ _LIBCPP_INLINE_VISIBILITY
+ constexpr span(const _Container& __c) : __data(std::data(__c)), __size{std::size(__c)} {}
+#else
+ template <__span_compatible_range<element_type> _Range>
_LIBCPP_INLINE_VISIBILITY
- constexpr span(const _Container& __c,
- enable_if_t<__is_span_compatible_container<const _Container, _Tp>::value, nullptr_t> = nullptr)
- : __data{_VSTD::data(__c)}, __size{(size_type) _VSTD::size(__c)} {}
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+ constexpr span(_Range&& __r) : __data(ranges::data(__r)), __size{ranges::size(__r)} {}
+#endif
template <class _OtherElementType, size_t _OtherExtent>
_LIBCPP_INLINE_VISIBILITY
@@ -609,13 +583,11 @@ template<typename _Tp>
inline _LIBCPP_INLINE_VISIBILITY span<byte, dynamic_extent> span<_Tp, dynamic_extent>::__as_writable_bytes() const noexcept
{ return {reinterpret_cast<byte *>(data()), size_bytes()}; }
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
template <class _Tp, size_t _Extent>
inline constexpr bool ranges::enable_borrowed_range<span<_Tp, _Extent> > = true;
template <class _ElementType, size_t _Extent>
inline constexpr bool ranges::enable_view<span<_ElementType, _Extent>> = true;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
// as_bytes & as_writable_bytes
template <class _Tp, size_t _Extent>
@@ -630,10 +602,10 @@ auto as_writable_bytes(span<_Tp, _Extent> __s) noexcept
-> enable_if_t<!is_const_v<_Tp>, decltype(__s.__as_writable_bytes())>
{ return __s.__as_writable_bytes(); }
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template<contiguous_iterator _It, class _EndOrSize>
span(_It, _EndOrSize) -> span<remove_reference_t<iter_reference_t<_It>>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
template<class _Tp, size_t _Sz>
span(_Tp (&)[_Sz]) -> span<_Tp, _Sz>;
@@ -644,7 +616,7 @@ template<class _Tp, size_t _Sz>
template<class _Tp, size_t _Sz>
span(const array<_Tp, _Sz>&) -> span<const _Tp, _Sz>;
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
template<ranges::contiguous_range _Range>
span(_Range&&) -> span<remove_reference_t<ranges::range_reference_t<_Range>>>;
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/sstream b/contrib/libs/cxxsupp/libcxx/include/sstream
index dd1d9c3d0c..ba6148be8b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/sstream
+++ b/contrib/libs/cxxsupp/libcxx/include/sstream
@@ -181,6 +181,7 @@ typedef basic_stringstream<wchar_t> wstringstream;
*/
#include <__config>
+#include <__utility/swap.h>
#include <istream>
#include <ostream>
#include <string>
diff --git a/contrib/libs/cxxsupp/libcxx/include/string b/contrib/libs/cxxsupp/libcxx/include/string
index 3fbb874e26..50c943e6f3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string
+++ b/contrib/libs/cxxsupp/libcxx/include/string
@@ -527,6 +527,9 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1
#include <__debug>
#include <__ios/fpos.h>
#include <__iterator/wrap_iter.h>
+#include <__utility/auto_cast.h>
+#include <__utility/move.h>
+#include <__utility/swap.h>
#include <compare>
#include <cstdio> // EOF
#include <cstdlib>
@@ -538,7 +541,6 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1
#include <stdexcept>
#include <string_view>
#include <type_traits>
-#include <utility>
#include <version>
// TODO: remove these headers
@@ -2329,7 +2331,7 @@ template <bool __is_short>
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(
const value_type* __s, size_type __n) {
- size_type __cap = __is_short ? __min_cap : __get_long_cap();
+ size_type __cap = __is_short ? static_cast<size_type>(__min_cap) : __get_long_cap();
if (__n < __cap) {
pointer __p = __is_short ? __get_short_pointer() : __get_long_pointer();
__is_short ? __set_short_size(__n) : __set_long_size(__n);
diff --git a/contrib/libs/cxxsupp/libcxx/include/string_view b/contrib/libs/cxxsupp/libcxx/include/string_view
index 81d8c8a2b7..c52391fe7b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string_view
+++ b/contrib/libs/cxxsupp/libcxx/include/string_view
@@ -240,6 +240,15 @@ typedef basic_string_view<char32_t> u32string_view;
typedef basic_string_view<wchar_t> wstring_view;
#endif
+// TODO: This is a workaround for some vendors to carry a downstream diff to accept `nullptr` in
+// string_view constructors. This can be refactored when this exact form isn't needed anymore.
+template <class _Traits>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+inline size_t __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
+ // This needs to be a single statement for C++11 constexpr
+ return _LIBCPP_ASSERT(__s != nullptr, "null pointer passed to non-null argument of char_traits<...>::length"), _Traits::length(__s);
+}
+
template<class _CharT, class _Traits>
class
_LIBCPP_PREFERRED_NAME(string_view)
@@ -294,7 +303,7 @@ public:
#endif
}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
requires (is_same_v<iter_value_t<_It>, _CharT> && !is_convertible_v<_End, size_type>)
constexpr _LIBCPP_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end)
@@ -302,9 +311,9 @@ public:
{
_LIBCPP_ASSERT((__end - __begin) >= 0, "std::string_view::string_view(iterator, sentinel) received invalid range");
}
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
template <class _Range>
requires (
!is_same_v<remove_cvref_t<_Range>, basic_string_view> &&
@@ -321,7 +330,7 @@ public:
)
constexpr _LIBCPP_HIDE_FROM_ABI
basic_string_view(_Range&& __r) : __data(ranges::data(__r)), __size(ranges::size(__r)) {}
-#endif
+#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
basic_string_view(const _CharT* __s)
@@ -716,26 +725,26 @@ private:
size_type __size;
};
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <class _CharT, class _Traits>
inline constexpr bool ranges::enable_view<basic_string_view<_CharT, _Traits>> = true;
template <class _CharT, class _Traits>
inline constexpr bool ranges::enable_borrowed_range<basic_string_view<_CharT, _Traits> > = true;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
// [string.view.deduct]
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
basic_string_view(_It, _End) -> basic_string_view<iter_value_t<_It>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
template <ranges::contiguous_range _Range>
basic_string_view(_Range) -> basic_string_view<ranges::range_value_t<_Range>>;
-#endif
+#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
// [string.view.comparison]
// operator ==
diff --git a/contrib/libs/cxxsupp/libcxx/include/tuple b/contrib/libs/cxxsupp/libcxx/include/tuple
index 868b66d254..e0a0c56c90 100644
--- a/contrib/libs/cxxsupp/libcxx/include/tuple
+++ b/contrib/libs/cxxsupp/libcxx/include/tuple
@@ -175,10 +175,12 @@ template <class... Types>
#include <__utility/forward.h>
#include <__utility/integer_sequence.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
+#include <__utility/piecewise_construct.h>
+#include <__utility/swap.h>
#include <compare>
#include <cstddef>
#include <type_traits>
-#include <utility>
#include <version>
// TODO: remove these headers
@@ -1143,7 +1145,7 @@ public:
void swap(tuple&) _NOEXCEPT {}
};
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 20
template <class... _TTypes, class... _UTypes, template<class> class _TQual, template<class> class _UQual>
requires requires { typename tuple<common_reference_t<_TQual<_TTypes>, _UQual<_UTypes>>...>; }
struct basic_common_reference<tuple<_TTypes...>, tuple<_UTypes...>, _TQual, _UQual> {
@@ -1155,7 +1157,7 @@ template <class... _TTypes, class... _UTypes>
struct common_type<tuple<_TTypes...>, tuple<_UTypes...>> {
using type = tuple<common_type_t<_TTypes, _UTypes>...>;
};
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 20
#if _LIBCPP_STD_VER > 14
template <class ..._Tp>
@@ -1360,7 +1362,7 @@ operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
return __tuple_equal<sizeof...(_Tp)>()(__x, __y);
}
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// operator<=>
@@ -1382,7 +1384,7 @@ operator<=>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
return _VSTD::__tuple_compare_three_way(__x, __y, index_sequence_for<_Tp...>{});
}
-#else // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#else // _LIBCPP_STD_VER > 17
template <class ..._Tp, class ..._Up>
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
@@ -1452,7 +1454,7 @@ operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
return !(__y < __x);
}
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
// tuple_cat
@@ -1557,6 +1559,7 @@ struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J
typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
operator()(tuple<_Types...> __t, _Tuple0&& __t0)
{
+ (void)__t; // avoid unused parameter warning on GCC when _I0 is empty
return _VSTD::forward_as_tuple(
_VSTD::forward<_Types>(_VSTD::get<_I0>(__t))...,
_VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...);
@@ -1567,6 +1570,7 @@ struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J
typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type
operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&& ...__tpls)
{
+ (void)__t; // avoid unused parameter warning on GCC when _I0 is empty
typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0;
typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple1>::type _T1;
return __tuple_cat<
diff --git a/contrib/libs/cxxsupp/libcxx/include/type_traits b/contrib/libs/cxxsupp/libcxx/include/type_traits
index df31e7654e..6906ffa1bd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/type_traits
+++ b/contrib/libs/cxxsupp/libcxx/include/type_traits
@@ -2450,7 +2450,7 @@ using __copy_cvref_t = typename __copy_cvref<_From, _To>::type;
#endif // _LIBCPP_STD_VER > 11
// common_reference
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#if _LIBCPP_STD_VER > 17
// Let COND_RES(X, Y) be:
template <class _Xp, class _Yp>
using __cond_res =
@@ -2604,7 +2604,7 @@ struct common_reference<_Tp, _Up, _Vp, _Rest...>
// bullet 5 - Otherwise, there shall be no member `type`.
template <class...> struct common_reference {};
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+#endif // _LIBCPP_STD_VER > 17
// is_assignable
diff --git a/contrib/libs/cxxsupp/libcxx/include/typeindex b/contrib/libs/cxxsupp/libcxx/include/typeindex
index b5dcd8496a..f0680398e9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/typeindex
+++ b/contrib/libs/cxxsupp/libcxx/include/typeindex
@@ -59,7 +59,6 @@ struct hash<type_index>
#include <__memory/allocator_arg_t.h>
#include <__memory/uses_allocator.h>
#include <new>
-#include <utility>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/uchar.h b/contrib/libs/cxxsupp/libcxx/include/uchar.h
new file mode 100644
index 0000000000..bb152c72cb
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/uchar.h
@@ -0,0 +1,52 @@
+// -*- 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_UCHAR_H
+#define _LIBCPP_UCHAR_H
+
+/*
+ uchar.h synopsis // since C++11
+
+Macros:
+
+ __STDC_UTF_16__
+ __STDC_UTF_32__
+
+Types:
+
+ mbstate_t
+ size_t
+
+size_t mbrtoc16(char16_t* pc16, const char* s, size_t n, mbstate_t* ps);
+size_t c16rtomb(char* s, char16_t c16, mbstate_t* ps);
+size_t mbrtoc32(char32_t* pc32, const char* s, size_t n, mbstate_t* ps);
+size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps);
+
+*/
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if !defined(_LIBCPP_CXX03_LANG)
+
+// Some platforms don't implement <uchar.h> and we don't want to give a hard
+// error on those platforms. When the platform doesn't provide <uchar.h>, at
+// least include <stddef.h> so we get the declaration for size_t.
+#if __has_include_next(<uchar.h>)
+# include_next <uchar.h>
+#else
+# include <stddef.h>
+#endif
+
+#endif // _LIBCPP_CXX03_LANG
+
+#endif // _LIBCPP_UCHAR_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/variant b/contrib/libs/cxxsupp/libcxx/include/variant
index be8e44bf3d..a0bde11d5b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/variant
+++ b/contrib/libs/cxxsupp/libcxx/include/variant
@@ -206,6 +206,9 @@ namespace std {
#include <__functional/unary_function.h>
#include <__tuple>
#include <__utility/forward.h>
+#include <__utility/in_place.h>
+#include <__utility/move.h>
+#include <__utility/swap.h>
#include <__variant/monostate.h>
#include <compare>
#include <exception>
@@ -214,7 +217,6 @@ namespace std {
#include <new>
#include <tuple>
#include <type_traits>
-#include <utility>
#include <version>
// TODO: remove these headers
@@ -1132,8 +1134,11 @@ class _LIBCPP_TEMPLATE_VIS __impl
using __base_type = __copy_assignment<__traits<_Types...>>;
public:
- using __base_type::__base_type;
- using __base_type::operator=;
+ using __base_type::__base_type; // get in_place_index_t constructor & friends
+ __impl(__impl const&) = default;
+ __impl(__impl&&) = default;
+ __impl& operator=(__impl const&) = default;
+ __impl& operator=(__impl&&) = default;
template <size_t _Ip, class _Arg>
inline _LIBCPP_INLINE_VISIBILITY
diff --git a/contrib/libs/cxxsupp/libcxx/include/vector b/contrib/libs/cxxsupp/libcxx/include/vector
index 9810ac710d..a99c84582b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/vector
+++ b/contrib/libs/cxxsupp/libcxx/include/vector
@@ -288,6 +288,8 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20
#include <__iterator/wrap_iter.h>
#include <__split_buffer>
#include <__utility/forward.h>
+#include <__utility/move.h>
+#include <__utility/swap.h>
#include <climits>
#include <compare>
#include <cstdlib>
@@ -308,7 +310,6 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20
#include <__functional/unary_function.h>
#include <__functional/weak_result_type.h>
#include <typeinfo>
-#include <utility>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -2385,7 +2386,7 @@ private:
void __vdeallocate() _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY
static size_type __align_it(size_type __new_size) _NOEXCEPT
- {return __new_size + (__bits_per_word-1) & ~((size_type)__bits_per_word-1);}
+ {return (__new_size + (__bits_per_word-1)) & ~((size_type)__bits_per_word-1);}
_LIBCPP_INLINE_VISIBILITY size_type __recommend(size_type __new_size) const;
_LIBCPP_INLINE_VISIBILITY void __construct_at_end(size_type __n, bool __x);
template <class _ForwardIterator>
diff --git a/contrib/libs/cxxsupp/libcxx/include/version b/contrib/libs/cxxsupp/libcxx/include/version
index 25d112af18..67a135ecdb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/version
+++ b/contrib/libs/cxxsupp/libcxx/include/version
@@ -340,9 +340,7 @@ __cpp_lib_void_t 201411L <type_traits>
# endif
# define __cpp_lib_generic_unordered_lookup 201811L
# define __cpp_lib_int_pow2 202002L
-# if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-# define __cpp_lib_integer_comparison_functions 202002L
-# endif
+# define __cpp_lib_integer_comparison_functions 202002L
# define __cpp_lib_interpolate 201902L
# define __cpp_lib_is_constant_evaluated 201811L
// # define __cpp_lib_is_layout_compatible 201907L
@@ -355,9 +353,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_latch 201907L
# endif
# define __cpp_lib_list_remove_return_type 201806L
-# if !defined(_LIBCPP_HAS_NO_CONCEPTS)
-# define __cpp_lib_math_constants 201907L
-# endif
+# define __cpp_lib_math_constants 201907L
// # define __cpp_lib_polymorphic_allocator 201902L
// # define __cpp_lib_ranges 201811L
# define __cpp_lib_remove_cvref 201711L
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
index f6ba686b41..13f9e0f4c9 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h
@@ -25,16 +25,14 @@
# define WIN32_LEAN_AND_MEAN
# define NOMINMAX
# include <windows.h>
-#endif
-
-#if !defined(_LIBCPP_WIN32API)
+#else
# include <dirent.h> // for DIR & friends
# include <fcntl.h> /* values for fchmodat */
# include <sys/stat.h>
# include <sys/statvfs.h>
# include <sys/time.h> // for ::utimes as used in __last_write_time
# include <unistd.h>
-#endif
+#endif // defined(_LIBCPP_WIN32API)
#include "../include/apple_availability.h"
@@ -46,10 +44,9 @@
#endif
#endif
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-function"
-#endif
+_LIBCPP_DIAGNOSTIC_PUSH
+_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wunused-function")
+_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-function")
#if defined(_LIBCPP_WIN32API)
#define PS(x) (L##x)
@@ -621,4 +618,6 @@ static file_time_type get_write_time(const WIN32_FIND_DATAW& data) {
_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCPP_DIAGNOSTIC_POP
+
#endif // FILESYSTEM_COMMON_H
diff --git a/contrib/libs/cxxsupp/libcxx/ya.make b/contrib/libs/cxxsupp/libcxx/ya.make
index ab16ba3f49..335049d0e8 100644
--- a/contrib/libs/cxxsupp/libcxx/ya.make
+++ b/contrib/libs/cxxsupp/libcxx/ya.make
@@ -13,9 +13,9 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(2022-03-06)
+VERSION(2022-03-14)
-ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/9b03c08e8517ed2d95a91202744d07f7376848a9.tar.gz)
+ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/d0af4276d62418ba9e54fec99b293d2fd7c92213.tar.gz)
ADDINCL(
GLOBAL contrib/libs/cxxsupp/libcxx/include