diff options
author | Andrey Khalyavin <halyavin@gmail.com> | 2022-04-07 08:28:36 +0300 |
---|---|---|
committer | Andrey Khalyavin <halyavin@gmail.com> | 2022-04-07 08:28:36 +0300 |
commit | 3bd25da701a5b6de40acbea240354462348803d6 (patch) | |
tree | 0687f8765d3b10e90a89ccc46536591807553e5c | |
parent | 93e82f85e8f923ac94b49a5e520ada8783c45e6a (diff) | |
download | ydb-3bd25da701a5b6de40acbea240354462348803d6.tar.gz |
Update libc++ to 8d23b742 (11 Jan 2022).
Notable changes:
* implement in_out_result in ranges
* implement uninitialized_copy{,_n} and uninitialized_move{,_n} in ranges
* use _LIBCPP_DEBUG_ASSERT in list
* alphabetize header includes.
* use Fuchsia-native monotonic clock for std::chrono::steady_clock
* properly handle specializations of std::is_placeholder
* add __cpo namespace to ranges::{advance, next, prev} for ADL reasons
* add template lerp function
ref:1cc313d57e8757bed1d0950624d0c3a2b7da8a4f
128 files changed, 741 insertions, 383 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf index fbc54aa3ca..5e666ef182 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -9,7 +9,7 @@ FAKEID=3141592653 SANDBOX_FAKEID=${FAKEID}.7600000 -CPP_FAKEID=9290837 +CPP_FAKEID=9306403 GO_FAKEID=9300436 ANDROID_FAKEID=8821472 CLANG_TIDY_FAKEID=8625699 diff --git a/contrib/libs/cxxsupp/libcxx/import b/contrib/libs/cxxsupp/libcxx/import index f13363e7a4..d6b186ba7f 100755 --- a/contrib/libs/cxxsupp/libcxx/import +++ b/contrib/libs/cxxsupp/libcxx/import @@ -1,6 +1,6 @@ #!/bin/sh -e -rev=bec50db2 +rev=8d23b742 output_dir="libcxx-r$rev" if [ -z $1 ] ; then git clone https://github.com/llvm/llvm-project.git --no-checkout "$output_dir/tmp" diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h index 621ef5f20f..29ad83f968 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/adjacent_find.h @@ -10,8 +10,8 @@ #ifndef _LIBCPP___ALGORITHM_ADJACENT_FIND_H #define _LIBCPP___ALGORITHM_ADJACENT_FIND_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h index 8fc55b9bec..2558dd0b27 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/binary_search.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_BINARY_SEARCH_H #define _LIBCPP___ALGORITHM_BINARY_SEARCH_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/lower_bound.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/clamp.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/clamp.h index db28735e97..a51c1015be 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/clamp.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/clamp.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_CLAMP_H #define _LIBCPP___ALGORITHM_CLAMP_H +#include <__algorithm/comp.h> #include <__config> #include <__debug> -#include <__algorithm/comp.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h index e7e8b9e51a..65f0e0b0ef 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_COPY_H #define _LIBCPP___ALGORITHM_COPY_H -#include <__config> #include <__algorithm/unwrap_iter.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <cstring> #include <type_traits> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h index 4a2f8c0c49..ac733290ab 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_backward.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_COPY_BACKWARD_H #define _LIBCPP___ALGORITHM_COPY_BACKWARD_H -#include <__config> #include <__algorithm/unwrap_iter.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <cstring> #include <type_traits> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h index 230826f63a..d32514d999 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_if.h @@ -10,10 +10,6 @@ #define _LIBCPP___ALGORITHM_COPY_IF_H #include <__config> -#include <__algorithm/unwrap_iter.h> -#include <__iterator/iterator_traits.h> -#include <cstring> -#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h index 38a84a4105..cdcc0d50db 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/copy_n.h @@ -9,11 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_COPY_N_H #define _LIBCPP___ALGORITHM_COPY_N_H -#include <__config> #include <__algorithm/copy.h> -#include <__algorithm/unwrap_iter.h> +#include <__config> #include <__iterator/iterator_traits.h> -#include <cstring> #include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h index 0fe1a21fe5..4c9ad05ad6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal.h @@ -10,8 +10,8 @@ #ifndef _LIBCPP___ALGORITHM_EQUAL_H #define _LIBCPP___ALGORITHM_EQUAL_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <__iterator/distance.h> #include <__iterator/iterator_traits.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h index 679456e27b..e13f0bdd96 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/equal_range.h @@ -9,12 +9,12 @@ #ifndef _LIBCPP___ALGORITHM_EQUAL_RANGE_H #define _LIBCPP___ALGORITHM_EQUAL_RANGE_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/half_positive.h> #include <__algorithm/lower_bound.h> #include <__algorithm/upper_bound.h> +#include <__config> #include <iterator> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h index 1fad1de993..0cb36b02c8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/fill.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_FILL_H #define _LIBCPP___ALGORITHM_FILL_H -#include <__config> #include <__algorithm/fill_n.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <type_traits> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h index 5d971c57a4..dd0f7d7ac0 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_end.h @@ -10,8 +10,8 @@ #ifndef _LIBCPP___ALGORITHM_FIND_END_OF_H #define _LIBCPP___ALGORITHM_FIND_END_OF_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h index 79a00acb9e..69354f6176 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/find_first_of.h @@ -10,8 +10,8 @@ #ifndef _LIBCPP___ALGORITHM_FIND_FIRST_OF_H #define _LIBCPP___ALGORITHM_FIND_FIRST_OF_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.h new file mode 100644 index 0000000000..9d97115720 --- /dev/null +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_out_result.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___ALGORITHM_IN_OUT_RESULT_H +#define _LIBCPP___ALGORITHM_IN_OUT_RESULT_H + +#include <__concepts/convertible_to.h> +#include <__config> +#include <__utility/move.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +#if !defined(_LIBCPP_HAS_NO_RANGES) +namespace ranges { + +template<class _InputIterator, class _OutputIterator> +struct in_out_result { + [[no_unique_address]] _InputIterator in; + [[no_unique_address]] _OutputIterator out; + + template <class _InputIterator2, class _OutputIterator2> + requires convertible_to<const _InputIterator&, _InputIterator2> && convertible_to<const _OutputIterator&, + _OutputIterator2> + _LIBCPP_HIDE_FROM_ABI + constexpr operator in_out_result<_InputIterator2, _OutputIterator2>() const & { + return {in, out}; + } + + template <class _InputIterator2, class _OutputIterator2> + requires convertible_to<_InputIterator, _InputIterator2> && convertible_to<_OutputIterator, _OutputIterator2> + _LIBCPP_HIDE_FROM_ABI + constexpr operator in_out_result<_InputIterator2, _OutputIterator2>() && { + return {_VSTD::move(in), _VSTD::move(out)}; + } +}; + +} // namespace ranges +#endif // !defined(_LIBCPP_HAS_NO_RANGES) + +_LIBCPP_END_NAMESPACE_STD + +#endif // _LIBCPP___ALGORITHM_IN_OUT_RESULT_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h index 9cc54d938d..9d0bc694c0 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/includes.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_INCLUDES_H #define _LIBCPP___ALGORITHM_INCLUDES_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h index c74633a74c..e6f1efc011 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/inplace_merge.h @@ -9,14 +9,14 @@ #ifndef _LIBCPP___ALGORITHM_INPLACE_MERGE_H #define _LIBCPP___ALGORITHM_INPLACE_MERGE_H -#include <__config> -#include <__algorithm/comp_ref_type.h> #include <__algorithm/comp.h> +#include <__algorithm/comp_ref_type.h> #include <__algorithm/lower_bound.h> #include <__algorithm/min.h> #include <__algorithm/move.h> #include <__algorithm/rotate.h> #include <__algorithm/upper_bound.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> #include <memory> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h index 22c27a66d1..925ba8bfb8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_IS_HEAP_H #define _LIBCPP___ALGORITHM_IS_HEAP_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/is_heap_until.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h index dd8a62f07f..aa23b6d039 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_heap_until.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H #define _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h index 9a7f275c54..57cad47761 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/is_sorted_until.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H #define _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h index a110a58c01..55a1da6201 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/lexicographical_compare.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H #define _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h index ddaecb045b..663a0b1622 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/lower_bound.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_LOWER_BOUND_H #define _LIBCPP___ALGORITHM_LOWER_BOUND_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/half_positive.h> +#include <__config> #include <iterator> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h index a67c798ee7..f489addaf5 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/make_heap.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_MAKE_HEAP_H #define _LIBCPP___ALGORITHM_MAKE_HEAP_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/sift_down.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h index 79cbd2be86..0bbc971e0a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/max.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_MAX_H #define _LIBCPP___ALGORITHM_MAX_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/max_element.h> +#include <__config> #include <initializer_list> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h index f932ca7049..db29372605 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/max_element.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_MAX_ELEMENT_H #define _LIBCPP___ALGORITHM_MAX_ELEMENT_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h index 480380db6c..9182649377 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/merge.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_MERGE_H #define _LIBCPP___ALGORITHM_MERGE_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/copy.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h index 5cacb2f28e..ed2d3b8782 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_MIN_H #define _LIBCPP___ALGORITHM_MIN_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/min_element.h> +#include <__config> #include <initializer_list> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h index 3aebebca91..407c7f9333 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/min_element.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_MIN_ELEMENT_H #define _LIBCPP___ALGORITHM_MIN_ELEMENT_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h index a96a5b252c..0bf88a70b8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax.h @@ -9,12 +9,11 @@ #ifndef _LIBCPP___ALGORITHM_MINMAX_H #define _LIBCPP___ALGORITHM_MINMAX_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <initializer_list> #include <utility> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h index d21ff6f8dc..5d76860384 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/minmax_element.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_MINMAX_ELEMENT_H #define _LIBCPP___ALGORITHM_MINMAX_ELEMENT_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <utility> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h index 7a01a98593..230ade03df 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/mismatch.h @@ -10,8 +10,8 @@ #ifndef _LIBCPP___ALGORITHM_MISMATCH_H #define _LIBCPP___ALGORITHM_MISMATCH_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <utility> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h index 7430bf0874..fa118f4716 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/move.h @@ -9,12 +9,12 @@ #ifndef _LIBCPP___ALGORITHM_MOVE_H #define _LIBCPP___ALGORITHM_MOVE_H -#include <__config> #include <__algorithm/unwrap_iter.h> +#include <__config> #include <__utility/move.h> #include <cstring> -#include <utility> #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/__algorithm/move_backward.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/move_backward.h index ee72d39764..a4e3828b60 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/move_backward.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/move_backward.h @@ -9,11 +9,11 @@ #ifndef _LIBCPP___ALGORITHM_MOVE_BACKWARD_H #define _LIBCPP___ALGORITHM_MOVE_BACKWARD_H -#include <__config> #include <__algorithm/unwrap_iter.h> +#include <__config> #include <cstring> -#include <utility> #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/__algorithm/next_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h index 1d71354eb3..eb81cceb7b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/next_permutation.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H #define _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/reverse.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h index 63feba1ea6..3afbd6c618 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_NTH_ELEMENT_H #define _LIBCPP___ALGORITHM_NTH_ELEMENT_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/sort.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h index 39d1a29dd9..a92a7e5661 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort.h @@ -9,12 +9,12 @@ #ifndef _LIBCPP___ALGORITHM_PARTIAL_SORT_H #define _LIBCPP___ALGORITHM_PARTIAL_SORT_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/make_heap.h> #include <__algorithm/sift_down.h> #include <__algorithm/sort_heap.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h index a81c621c75..67a62bae1f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partial_sort_copy.h @@ -9,14 +9,13 @@ #ifndef _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H #define _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/make_heap.h> #include <__algorithm/sift_down.h> #include <__algorithm/sort_heap.h> +#include <__config> #include <__iterator/iterator_traits.h> -#include <type_traits> // swap #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h index 2614520ccb..131c5d3735 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition.h @@ -12,7 +12,6 @@ #include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> -#include <utility> // pair #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h index 33aaf33d93..18e6e6f681 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/partition_point.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_PARTITION_POINT_H #define _LIBCPP___ALGORITHM_PARTITION_POINT_H -#include <__config> #include <__algorithm/half_positive.h> +#include <__config> #include <iterator> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h index 1d57de24ff..c1cc8016ac 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pop_heap.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_POP_HEAP_H #define _LIBCPP___ALGORITHM_POP_HEAP_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/sift_down.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h index 12c1816da3..457c2695b3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/prev_permutation.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_PREV_PERMUTATION_H #define _LIBCPP___ALGORITHM_PREV_PERMUTATION_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/reverse.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h index 9327fe05b5..864d419fa2 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/push_heap.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_PUSH_HEAP_H #define _LIBCPP___ALGORITHM_PUSH_HEAP_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/move.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h index 171d83284a..681b9cc768 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_REMOVE_H #define _LIBCPP___ALGORITHM_REMOVE_H -#include <__config> #include <__algorithm/find.h> #include <__algorithm/find_if.h> +#include <__config> #include <__utility/move.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h index 4df36896af..36f817cfa6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/remove_if.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_REMOVE_IF_H #define _LIBCPP___ALGORITHM_REMOVE_IF_H -#include <__config> #include <__algorithm/find_if.h> +#include <__config> #include <utility> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h index 28bd2e84c8..1198aeaf41 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/reverse.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_REVERSE_H #define _LIBCPP___ALGORITHM_REVERSE_H -#include <__config> #include <__algorithm/iter_swap.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h index 4c682ef93d..f9e644c88d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/rotate_copy.h @@ -9,10 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_ROTATE_COPY_H #define _LIBCPP___ALGORITHM_ROTATE_COPY_H -#include <__config> #include <__algorithm/copy.h> -#include <iterator> -#include <type_traits> +#include <__config> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h index 67d066aa43..e4576cc76a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search_n.h @@ -10,8 +10,8 @@ #ifndef _LIBCPP___ALGORITHM_SEARCH_N_H #define _LIBCPP___ALGORITHM_SEARCH_N_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <type_traits> // __convert_to_integral diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h index d4a9750d6d..00f61e070b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_difference.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_SET_DIFFERENCE_H #define _LIBCPP___ALGORITHM_SET_DIFFERENCE_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/copy.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h index 518e5e68b3..f6aa38217d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_intersection.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_SET_INTERSECTION_H #define _LIBCPP___ALGORITHM_SET_INTERSECTION_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h index efdf627257..5b5c2acff7 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_symmetric_difference.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H #define _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/copy.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h index 388f037a73..5b3e3af79b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/set_union.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_SET_UNION_H #define _LIBCPP___ALGORITHM_SET_UNION_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/copy.h> +#include <__config> #include <__iterator/iterator_traits.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_left.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_left.h index 8d9bc07d2e..0466a3188a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_left.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_left.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_SHIFT_LEFT_H #define _LIBCPP___ALGORITHM_SHIFT_LEFT_H -#include <__config> #include <__algorithm/move.h> +#include <__config> #include <__iterator/iterator_traits.h> -#include <type_traits> // swap +#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h index cee17733a6..121712e855 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/shift_right.h @@ -9,12 +9,13 @@ #ifndef _LIBCPP___ALGORITHM_SHIFT_RIGHT_H #define _LIBCPP___ALGORITHM_SHIFT_RIGHT_H -#include <__config> #include <__algorithm/move.h> #include <__algorithm/move_backward.h> #include <__algorithm/swap_ranges.h> +#include <__config> #include <__iterator/iterator_traits.h> -#include <type_traits> // swap +#include <__utility/swap.h> +#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h index bc127689a6..5e09b28008 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort.h @@ -9,12 +9,12 @@ #ifndef _LIBCPP___ALGORITHM_SORT_H #define _LIBCPP___ALGORITHM_SORT_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/min_element.h> #include <__algorithm/partial_sort.h> #include <__algorithm/unwrap_iter.h> +#include <__config> #include <__utility/swap.h> #include <memory> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h index bf6200c2a0..64291ff2e8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/sort_heap.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___ALGORITHM_SORT_HEAP_H #define _LIBCPP___ALGORITHM_SORT_HEAP_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/pop_heap.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <type_traits> // swap diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h index 323b323c53..331f0fde77 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_partition.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_STABLE_PARTITION_H #define _LIBCPP___ALGORITHM_STABLE_PARTITION_H -#include <__config> #include <__algorithm/rotate.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> #include <memory> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h index 41e17bde99..4ae17e0e4d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/stable_sort.h @@ -9,15 +9,15 @@ #ifndef _LIBCPP___ALGORITHM_STABLE_SORT_H #define _LIBCPP___ALGORITHM_STABLE_SORT_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/comp_ref_type.h> #include <__algorithm/inplace_merge.h> #include <__algorithm/sort.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> #include <memory> -#include <type_traits> // swap +#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h index 62f0490b6d..e17ff1567f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_UNIQUE_H #define _LIBCPP___ALGORITHM_UNIQUE_H -#include <__config> -#include <__algorithm/comp.h> #include <__algorithm/adjacent_find.h> +#include <__algorithm/comp.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <__utility/move.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h index 4c916dc3ad..4833ae9b59 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unique_copy.h @@ -9,8 +9,8 @@ #ifndef _LIBCPP___ALGORITHM_UNIQUE_COPY_H #define _LIBCPP___ALGORITHM_UNIQUE_COPY_H -#include <__config> #include <__algorithm/comp.h> +#include <__config> #include <__iterator/iterator_traits.h> #include <utility> diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h index f77ecca6ee..35765330bb 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/unwrap_iter.h @@ -10,8 +10,8 @@ #define _LIBCPP___ALGORITHM_UNWRAP_ITER_H #include <__config> -#include <iterator> #include <__memory/pointer_traits.h> +#include <iterator> #include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h index 4ae7b8f9be..c064f1e35b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/upper_bound.h @@ -9,9 +9,9 @@ #ifndef _LIBCPP___ALGORITHM_UPPER_BOUND_H #define _LIBCPP___ALGORITHM_UPPER_BOUND_H -#include <__config> #include <__algorithm/comp.h> #include <__algorithm/half_positive.h> +#include <__config> #include <iterator> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__bit_reference b/contrib/libs/cxxsupp/libcxx/include/__bit_reference index 489ce886c8..bb80d4a53d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__bit_reference +++ b/contrib/libs/cxxsupp/libcxx/include/__bit_reference @@ -10,8 +10,8 @@ #ifndef _LIBCPP___BIT_REFERENCE #define _LIBCPP___BIT_REFERENCE -#include <__config> #include <__bits> +#include <__config> #include <algorithm> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 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 3edddf1a1c..d7f339eda9 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way.h +++ b/contrib/libs/cxxsupp/libcxx/include/__compare/compare_three_way.h @@ -10,8 +10,8 @@ #ifndef _LIBCPP___COMPARE_COMPARE_THREE_WAY_H #define _LIBCPP___COMPARE_COMPARE_THREE_WAY_H -#include <__config> #include <__compare/three_way_comparable.h> +#include <__config> #include <__utility/forward.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 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 3d8e738816..0f302c0fa1 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h +++ b/contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h @@ -9,10 +9,10 @@ #ifndef _LIBCPP___COMPARE_SYNTH_THREE_WAY_H #define _LIBCPP___COMPARE_SYNTH_THREE_WAY_H -#include <__config> #include <__compare/ordering.h> #include <__compare/three_way_comparable.h> #include <__concepts/boolean_testable.h> +#include <__config> #include <__utility/declval.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h index 9efe194654..ba3ecfe78f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h +++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h @@ -12,14 +12,14 @@ #include <__availability> #include <__config> -#include <__filesystem/path.h> -#include <__filesystem/file_time_type.h> -#include <__filesystem/filesystem_error.h> +#include <__errc> #include <__filesystem/file_status.h> +#include <__filesystem/file_time_type.h> #include <__filesystem/file_type.h> +#include <__filesystem/filesystem_error.h> #include <__filesystem/operations.h> +#include <__filesystem/path.h> #include <__filesystem/perms.h> -#include <__errc> #include <chrono> #include <cstdint> #include <cstdlib> diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h index be958e0eb8..7ea66bbc7f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h +++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h @@ -12,12 +12,12 @@ #include <__availability> #include <__config> +#include <__debug> #include <__filesystem/directory_entry.h> #include <__filesystem/directory_options.h> #include <__filesystem/path.h> #include <__iterator/iterator_traits.h> #include <__memory/shared_ptr.h> -#include <__debug> #include <__ranges/enable_borrowed_range.h> #include <__ranges/enable_view.h> #include <cstddef> diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h index a8c6977b48..0b1874b0e5 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h +++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h @@ -14,9 +14,9 @@ #include <__config> #include <__filesystem/path.h> #include <__memory/shared_ptr.h> -#include <system_error> #include <iosfwd> #include <new> +#include <system_error> #include <type_traits> #ifndef _LIBCPP_CXX03_LANG diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h index a6d1ee997d..77547cbacb 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h +++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h @@ -12,16 +12,16 @@ #include <__availability> #include <__config> -#include <string> -#include <type_traits> #include <__iterator/back_insert_iterator.h> #include <__iterator/iterator_traits.h> #include <cstddef> +#include <string> #include <string_view> +#include <type_traits> #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) -# include <locale> # include <iomanip> // for quoted +# include <locale> #endif #ifndef _LIBCPP_CXX03_LANG diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h index 62f8dc6fd3..55e97b1454 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h +++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h @@ -12,9 +12,9 @@ #include <__availability> #include <__config> +#include <__debug> #include <__filesystem/path.h> #include <__iterator/iterator_traits.h> -#include <__debug> #include <cstddef> #include <string> #include <string_view> diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h index 5f1353effd..73e2fed8c0 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h +++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_integral.h @@ -10,15 +10,15 @@ #ifndef _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H #define _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H +#include <__algorithm/copy.h> +#include <__algorithm/copy_n.h> +#include <__algorithm/fill_n.h> +#include <__algorithm/transform.h> #include <__config> #include <__format/format_error.h> #include <__format/format_fwd.h> #include <__format/formatter.h> #include <__format/parser_std_format_spec.h> -#include <__algorithm/copy.h> -#include <__algorithm/copy_n.h> -#include <__algorithm/fill_n.h> -#include <__algorithm/transform.h> #include <array> #include <charconv> #include <concepts> diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h b/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h index 141d6bac8f..4ab9184ca1 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h @@ -11,8 +11,8 @@ #define _LIBCPP___FUNCTIONAL_BIND_H #include <__config> -#include <__functional/weak_result_type.h> #include <__functional/invoke.h> +#include <__functional/weak_result_type.h> #include <cstddef> #include <tuple> #include <type_traits> @@ -23,18 +23,24 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template<class _Tp> struct __is_bind_expression : public false_type {}; -template<class _Tp> struct _LIBCPP_TEMPLATE_VIS is_bind_expression - : public __is_bind_expression<typename remove_cv<_Tp>::type> {}; +template<class _Tp> +struct is_bind_expression : _If< + _IsSame<_Tp, typename __uncvref<_Tp>::type>::value, + false_type, + is_bind_expression<typename __uncvref<_Tp>::type> +> {}; #if _LIBCPP_STD_VER > 14 template <class _Tp> inline constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; #endif -template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {}; -template<class _Tp> struct _LIBCPP_TEMPLATE_VIS is_placeholder - : public __is_placeholder<typename remove_cv<_Tp>::type> {}; +template<class _Tp> +struct is_placeholder : _If< + _IsSame<_Tp, typename __uncvref<_Tp>::type>::value, + integral_constant<int, 0>, + is_placeholder<typename __uncvref<_Tp>::type> +> {}; #if _LIBCPP_STD_VER > 14 template <class _Tp> @@ -73,7 +79,7 @@ _LIBCPP_FUNC_VIS extern const __ph<10> _10; } // namespace placeholders template<int _Np> -struct __is_placeholder<placeholders::__ph<_Np> > +struct is_placeholder<placeholders::__ph<_Np> > : public integral_constant<int, _Np> {}; @@ -326,7 +332,7 @@ public: #endif template<class _Fp, class ..._BoundArgs> -struct __is_bind_expression<__bind<_Fp, _BoundArgs...> > : public true_type {}; +struct is_bind_expression<__bind<_Fp, _BoundArgs...> > : public true_type {}; template<class _Rp, class _Fp, class ..._BoundArgs> class __bind_r @@ -385,7 +391,7 @@ public: }; template<class _Rp, class _Fp, class ..._BoundArgs> -struct __is_bind_expression<__bind_r<_Rp, _Fp, _BoundArgs...> > : public true_type {}; +struct is_bind_expression<__bind_r<_Rp, _Fp, _BoundArgs...> > : public true_type {}; template<class _Fp, class ..._BoundArgs> inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/bind_front.h b/contrib/libs/cxxsupp/libcxx/include/__functional/bind_front.h index 86d4594b65..31397ec540 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/bind_front.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/bind_front.h @@ -11,8 +11,8 @@ #define _LIBCPP___FUNCTIONAL_BIND_FRONT_H #include <__config> -#include <__functional/perfect_forward.h> #include <__functional/invoke.h> +#include <__functional/perfect_forward.h> #include <type_traits> #include <utility> diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h b/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h index 728f487161..b5595db85f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h @@ -16,9 +16,9 @@ #include <__utility/move.h> #include <__utility/pair.h> #include <__utility/swap.h> +#include <cstddef> #include <cstdint> #include <cstring> -#include <cstddef> #include <limits> #include <type_traits> diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h b/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h index 1fa070a42c..0ec8423343 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fn.h @@ -11,9 +11,9 @@ #define _LIBCPP___FUNCTIONAL_MEM_FN_H #include <__config> -#include <__functional/weak_result_type.h> #include <__functional/binary_function.h> #include <__functional/invoke.h> +#include <__functional/weak_result_type.h> #include <utility> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fun_ref.h b/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fun_ref.h index 4616da0b07..830936c1b0 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fun_ref.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/mem_fun_ref.h @@ -11,8 +11,8 @@ #define _LIBCPP___FUNCTIONAL_MEM_FUN_REF_H #include <__config> -#include <__functional/unary_function.h> #include <__functional/binary_function.h> +#include <__functional/unary_function.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h b/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h index 5e250c1253..6996a8f85b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h @@ -11,8 +11,8 @@ #define _LIBCPP___FUNCTIONAL_NOT_FN_H #include <__config> -#include <__functional/perfect_forward.h> #include <__functional/invoke.h> +#include <__functional/perfect_forward.h> #include <utility> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h index 43ec8684fc..828bb71d5a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h +++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h @@ -17,8 +17,8 @@ #include <__iterator/incrementable_traits.h> #include <__iterator/iterator_traits.h> #include <__utility/move.h> -#include <cstdlib> #include <concepts> +#include <cstdlib> #include <limits> #include <type_traits> @@ -67,10 +67,12 @@ void advance(_InputIter& __i, _Distance __orig_n) { #if !defined(_LIBCPP_HAS_NO_RANGES) -namespace ranges { // [range.iter.op.advance] -// TODO(varconst): rename `__advance_fn` to `__fn`. -struct __advance_fn final : private __function_like { + +namespace ranges { +namespace __advance { + +struct __fn final : private __function_like { private: template <class _Tp> _LIBCPP_HIDE_FROM_ABI @@ -97,7 +99,7 @@ private: } public: - constexpr explicit __advance_fn(__tag __x) noexcept : __function_like(__x) {} + constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {} // Preconditions: If `I` does not model `bidirectional_iterator`, `n` is not negative. template <input_or_output_iterator _Ip> @@ -186,7 +188,11 @@ public: } }; -inline constexpr auto advance = __advance_fn(__function_like::__tag()); +} // namespace __advance + +inline namespace __cpo { + inline constexpr auto advance = __advance::__fn(__function_like::__tag()); +} // namespace __cpo } // namespace ranges #endif // !defined(_LIBCPP_HAS_NO_RANGES) diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h index 55979fe557..3ce88fadbe 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h +++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/counted_iterator.h @@ -13,9 +13,9 @@ #include <__debug> #include <__iterator/concepts.h> #include <__iterator/default_sentinel.h> +#include <__iterator/incrementable_traits.h> #include <__iterator/iter_move.h> #include <__iterator/iter_swap.h> -#include <__iterator/incrementable_traits.h> #include <__iterator/iterator_traits.h> #include <__iterator/readable_traits.h> #include <__memory/pointer_traits.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h index 97db48733e..9af8f5f45d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h +++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/next.h @@ -38,11 +38,14 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 #if !defined(_LIBCPP_HAS_NO_RANGES) +// [range.iter.op.next] + namespace ranges { -// TODO(varconst): rename `__next_fn` to `__fn`. -struct __next_fn final : private __function_like { +namespace __next { + +struct __fn final : private __function_like { _LIBCPP_HIDE_FROM_ABI - constexpr explicit __next_fn(__tag __x) noexcept : __function_like(__x) {} + constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {} template <input_or_output_iterator _Ip> _LIBCPP_HIDE_FROM_ABI @@ -73,7 +76,11 @@ struct __next_fn final : private __function_like { } }; -inline constexpr auto next = __next_fn(__function_like::__tag()); +} // namespace __next + +inline namespace __cpo { + inline constexpr auto next = __next::__fn(__function_like::__tag()); +} // namespace __cpo } // namespace ranges #endif // !defined(_LIBCPP_HAS_NO_RANGES) diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h index 7dd27e2920..e8966a9aad 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h +++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/prev.h @@ -37,11 +37,14 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 #if !defined(_LIBCPP_HAS_NO_RANGES) +// [range.iter.op.prev] + namespace ranges { -// TODO(varconst): rename `__prev_fn` to `__fn`. -struct __prev_fn final : private __function_like { +namespace __prev { + +struct __fn final : private __function_like { _LIBCPP_HIDE_FROM_ABI - constexpr explicit __prev_fn(__tag __x) noexcept : __function_like(__x) {} + constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {} template <bidirectional_iterator _Ip> _LIBCPP_HIDE_FROM_ABI @@ -65,7 +68,11 @@ struct __prev_fn final : private __function_like { } }; -inline constexpr auto prev = __prev_fn(__function_like::__tag()); +} // namespace __prev + +inline namespace __cpo { + inline constexpr auto prev = __prev::__fn(__function_like::__tag()); +} // namespace __cpo } // namespace ranges #endif // !defined(_LIBCPP_HAS_NO_RANGES) diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h index d06859ee5f..7807b803df 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h +++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/reverse_iterator.h @@ -10,9 +10,9 @@ #ifndef _LIBCPP___ITERATOR_REVERSE_ITERATOR_H #define _LIBCPP___ITERATOR_REVERSE_ITERATOR_H -#include <__config> #include <__compare/compare_three_way_result.h> #include <__compare/three_way_comparable.h> +#include <__config> #include <__iterator/iterator.h> #include <__iterator/iterator_traits.h> #include <__memory/addressof.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__locale b/contrib/libs/cxxsupp/libcxx/include/__locale index 6375933801..b1c277f76b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__locale +++ b/contrib/libs/cxxsupp/libcxx/include/__locale @@ -12,14 +12,15 @@ #include <__availability> #include <__config> -#include <string> -#include <memory> -#include <utility> -#include <mutex> -#include <cstdint> -#include <cctype> #include <atomic> +#include <cctype> +#include <cstdint> #include <locale.h> +#include <memory> +#include <mutex> +#include <string> +#include <utility> + #if defined(_LIBCPP_MSVCRT_LIKE) # include <cstring> # include <__support/win32/locale_win32.h> 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 6ec803806c..09786ffc69 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h +++ b/contrib/libs/cxxsupp/libcxx/include/__memory/ranges_uninitialized_algorithms.h @@ -10,10 +10,13 @@ #ifndef _LIBCPP___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H #define _LIBCPP___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H +#include <__algorithm/in_out_result.h> #include <__concepts/constructible.h> #include <__config> #include <__function_like.h> +#include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> +#include <__iterator/iter_move.h> #include <__iterator/iterator_traits.h> #include <__iterator/readable_traits.h> #include <__memory/concepts.h> @@ -61,8 +64,8 @@ struct __fn final : private __function_like { } // namespace __uninitialized_default_construct inline namespace __cpo { -inline constexpr auto uninitialized_default_construct = - __uninitialized_default_construct::__fn(__function_like::__tag()); + inline constexpr auto uninitialized_default_construct = + __uninitialized_default_construct::__fn(__function_like::__tag()); } // namespace __cpo // uninitialized_default_construct_n @@ -87,8 +90,8 @@ struct __fn final : private __function_like { } // namespace __uninitialized_default_construct_n inline namespace __cpo { -inline constexpr auto uninitialized_default_construct_n = - __uninitialized_default_construct_n::__fn(__function_like::__tag()); + inline constexpr auto uninitialized_default_construct_n = + __uninitialized_default_construct_n::__fn(__function_like::__tag()); } // namespace __cpo // uninitialized_value_construct @@ -119,8 +122,8 @@ struct __fn final : private __function_like { } // namespace __uninitialized_value_construct inline namespace __cpo { -inline constexpr auto uninitialized_value_construct = - __uninitialized_value_construct::__fn(__function_like::__tag()); + inline constexpr auto uninitialized_value_construct = + __uninitialized_value_construct::__fn(__function_like::__tag()); } // namespace __cpo // uninitialized_value_construct_n @@ -144,8 +147,8 @@ struct __fn final : private __function_like { } // namespace __uninitialized_value_construct_n inline namespace __cpo { -inline constexpr auto uninitialized_value_construct_n = - __uninitialized_value_construct_n::__fn(__function_like::__tag()); + inline constexpr auto uninitialized_value_construct_n = + __uninitialized_value_construct_n::__fn(__function_like::__tag()); } // namespace __cpo // uninitialized_fill @@ -173,10 +176,10 @@ struct __fn final : private __function_like { }; -} // namespace __uninitialized_fil +} // namespace __uninitialized_fill inline namespace __cpo { -inline constexpr auto uninitialized_fill = __uninitialized_fill::__fn(__function_like::__tag()); + inline constexpr auto uninitialized_fill = __uninitialized_fill::__fn(__function_like::__tag()); } // namespace __cpo // uninitialized_fill_n @@ -201,7 +204,168 @@ struct __fn final : private __function_like { } // namespace __uninitialized_fill_n inline namespace __cpo { -inline constexpr auto uninitialized_fill_n = __uninitialized_fill_n::__fn(__function_like::__tag()); + inline constexpr auto uninitialized_fill_n = __uninitialized_fill_n::__fn(__function_like::__tag()); +} // namespace __cpo + +// uninitialized_copy + +template <class _InputIterator, class _OutputIterator> +using uninitialized_copy_result = in_out_result<_InputIterator, _OutputIterator>; + +namespace __uninitialized_copy { + +struct __fn final : private __function_like { + + constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {} + + // clang-format off + template <input_iterator _InputIterator, + sentinel_for<_InputIterator> _Sentinel1, + __nothrow_forward_iterator _OutputIterator, + __nothrow_sentinel_for<_OutputIterator> _Sentinel2> + requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>> + uninitialized_copy_result<_InputIterator, _OutputIterator> + operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const { + // clang-format on + using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>; + + auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast), + _VSTD::move(__ofirst), _VSTD::move(__olast)); + return {_VSTD::move(__result.first), _VSTD::move(__result.second)}; + } + + // clang-format off + template <input_range _InputRange, __nothrow_forward_range _OutputRange> + requires constructible_from<range_value_t<_OutputRange>, range_reference_t<_InputRange>> + uninitialized_copy_result<borrowed_iterator_t<_InputRange>, borrowed_iterator_t<_OutputRange>> + operator()( _InputRange&& __in_range, _OutputRange&& __out_range) const { + // clang-format on + return (*this)(ranges::begin(__in_range), ranges::end(__in_range), ranges::begin(__out_range), + ranges::end(__out_range)); + } +}; + +} // namespace __uninitialized_copy + +inline namespace __cpo { + inline constexpr auto uninitialized_copy = __uninitialized_copy::__fn(__function_like::__tag()); +} // namespace __cpo + +// uninitialized_copy_n + +template <class _InputIterator, class _OutputIterator> +using uninitialized_copy_n_result = in_out_result<_InputIterator, _OutputIterator>; + +namespace __uninitialized_copy_n { + +struct __fn final : private __function_like { + + constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {} + + // clang-format off + template <input_iterator _InputIterator, + __nothrow_forward_iterator _OutputIterator, + __nothrow_sentinel_for<_OutputIterator> _Sentinel> + requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>> + uninitialized_copy_n_result<_InputIterator, _OutputIterator> + operator()(_InputIterator __ifirst, iter_difference_t<_InputIterator> __n, + _OutputIterator __ofirst, _Sentinel __olast) const { + // clang-format on + using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>; + + auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst), + _VSTD::move(__olast)); + return {_VSTD::move(__result.first), _VSTD::move(__result.second)}; + } + +}; + +} // namespace __uninitialized_copy_n + +inline namespace __cpo { + inline constexpr auto uninitialized_copy_n = __uninitialized_copy_n::__fn(__function_like::__tag()); +} // namespace __cpo + +// uninitialized_move + +template <class _InputIterator, class _OutputIterator> +using uninitialized_move_result = in_out_result<_InputIterator, _OutputIterator>; + +namespace __uninitialized_move { + +struct __fn final : private __function_like { + + constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {} + + // clang-format off + template <input_iterator _InputIterator, + sentinel_for<_InputIterator> _Sentinel1, + __nothrow_forward_iterator _OutputIterator, + __nothrow_sentinel_for<_OutputIterator> _Sentinel2> + requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>> + uninitialized_move_result<_InputIterator, _OutputIterator> + operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const { + // clang-format on + using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>; + auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); }; + + auto __result = _VSTD::__uninitialized_move<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast), + _VSTD::move(__ofirst), _VSTD::move(__olast), __iter_move); + return {_VSTD::move(__result.first), _VSTD::move(__result.second)}; + } + + // clang-format off + template <input_range _InputRange, __nothrow_forward_range _OutputRange> + requires constructible_from<range_value_t<_OutputRange>, range_reference_t<_InputRange>> + uninitialized_move_result<borrowed_iterator_t<_InputRange>, borrowed_iterator_t<_OutputRange>> + operator()(_InputRange&& __in_range, _OutputRange&& __out_range) const { + // clang-format on + return (*this)(ranges::begin(__in_range), ranges::end(__in_range), ranges::begin(__out_range), + ranges::end(__out_range)); + } + +}; + +} // namespace __uninitialized_move + +inline namespace __cpo { + inline constexpr auto uninitialized_move = __uninitialized_move::__fn(__function_like::__tag()); +} // namespace __cpo + +// uninitialized_move_n + +template <class _InputIterator, class _OutputIterator> +using uninitialized_move_n_result = in_out_result<_InputIterator, _OutputIterator>; + +namespace __uninitialized_move_n { + +struct __fn final : private __function_like { + + constexpr explicit __fn(__tag __x) noexcept : __function_like(__x) {} + + // clang-format off + template <input_iterator _InputIterator, + __nothrow_forward_iterator _OutputIterator, + __nothrow_sentinel_for<_OutputIterator> _Sentinel> + requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>> + uninitialized_move_n_result<_InputIterator, _OutputIterator> + operator()(_InputIterator __ifirst, iter_difference_t<_InputIterator> __n, _OutputIterator __ofirst, + _Sentinel __olast) const { + // clang-format on + using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>; + auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); }; + + auto __result = _VSTD::__uninitialized_move_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst), + _VSTD::move(__olast), __iter_move); + return {_VSTD::move(__result.first), _VSTD::move(__result.second)}; + } + +}; + +} // namespace __uninitialized_move_n + +inline namespace __cpo { + inline constexpr auto uninitialized_move_n = __uninitialized_move_n::__fn(__function_like::__tag()); } // namespace __cpo } // namespace ranges diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h index 00b376a4bf..543757c5c7 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h +++ b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h @@ -12,14 +12,14 @@ #include <__availability> #include <__config> -#include <__functional_base> #include <__functional/binary_function.h> #include <__functional/operations.h> #include <__functional/reference_wrapper.h> +#include <__functional_base> #include <__memory/addressof.h> #include <__memory/allocation_guard.h> -#include <__memory/allocator_traits.h> #include <__memory/allocator.h> +#include <__memory/allocator_traits.h> #include <__memory/compressed_pair.h> #include <__memory/pointer_traits.h> #include <__memory/unique_ptr.h> @@ -28,8 +28,8 @@ #include <cstdlib> // abort #include <iosfwd> #include <stdexcept> -#include <typeinfo> #include <type_traits> +#include <typeinfo> #include <utility> #if !defined(_LIBCPP_HAS_NO_THREADS) // !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER) # include <atomic> diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h b/contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h index 69132633a4..40e7c79a51 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h +++ b/contrib/libs/cxxsupp/libcxx/include/__memory/uninitialized_algorithms.h @@ -23,52 +23,75 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template <class _InputIterator, class _ForwardIterator> -_ForwardIterator -uninitialized_copy(_InputIterator __f, _InputIterator __l, _ForwardIterator __r) -{ - typedef typename iterator_traits<_ForwardIterator>::value_type value_type; +// This is a simplified version of C++20 `unreachable_sentinel` that doesn't use concepts and thus can be used in any +// language mode. +struct __unreachable_sentinel { + template <class _Iter> + _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool operator!=(const _Iter&, __unreachable_sentinel) _NOEXCEPT { + return true; + } +}; + +// uninitialized_copy + +template <class _ValueType, class _InputIterator, class _Sentinel1, class _ForwardIterator, class _Sentinel2> +inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator> +__uninitialized_copy(_InputIterator __ifirst, _Sentinel1 __ilast, + _ForwardIterator __ofirst, _Sentinel2 __olast) { + _ForwardIterator __idx = __ofirst; #ifndef _LIBCPP_NO_EXCEPTIONS - _ForwardIterator __s = __r; - try - { + try { #endif - for (; __f != __l; ++__f, (void) ++__r) - ::new ((void*)_VSTD::addressof(*__r)) value_type(*__f); + for (; __ifirst != __ilast && __idx != __olast; ++__ifirst, (void)++__idx) + ::new (_VSTD::__voidify(*__idx)) _ValueType(*__ifirst); #ifndef _LIBCPP_NO_EXCEPTIONS - } - catch (...) - { - for (; __s != __r; ++__s) - __s->~value_type(); - throw; - } + } catch (...) { + _VSTD::__destroy(__ofirst, __idx); + throw; + } #endif - return __r; + + return pair<_InputIterator, _ForwardIterator>(_VSTD::move(__ifirst), _VSTD::move(__idx)); } -template <class _InputIterator, class _Size, class _ForwardIterator> -_ForwardIterator -uninitialized_copy_n(_InputIterator __f, _Size __n, _ForwardIterator __r) -{ - typedef typename iterator_traits<_ForwardIterator>::value_type value_type; +template <class _InputIterator, class _ForwardIterator> +_ForwardIterator uninitialized_copy(_InputIterator __ifirst, _InputIterator __ilast, + _ForwardIterator __ofirst) { + typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; + auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast), + _VSTD::move(__ofirst), __unreachable_sentinel()); + return _VSTD::move(__result.second); +} + +// uninitialized_copy_n + +template <class _ValueType, class _InputIterator, class _Size, class _ForwardIterator, class _Sentinel> +inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator> +__uninitialized_copy_n(_InputIterator __ifirst, _Size __n, + _ForwardIterator __ofirst, _Sentinel __olast) { + _ForwardIterator __idx = __ofirst; #ifndef _LIBCPP_NO_EXCEPTIONS - _ForwardIterator __s = __r; - try - { + try { #endif - for (; __n > 0; ++__f, (void) ++__r, (void) --__n) - ::new ((void*)_VSTD::addressof(*__r)) value_type(*__f); + for (; __n > 0 && __idx != __olast; ++__ifirst, (void)++__idx, (void)--__n) + ::new (_VSTD::__voidify(*__idx)) _ValueType(*__ifirst); #ifndef _LIBCPP_NO_EXCEPTIONS - } - catch (...) - { - for (; __s != __r; ++__s) - __s->~value_type(); - throw; - } + } catch (...) { + _VSTD::__destroy(__ofirst, __idx); + throw; + } #endif - return __r; + + return pair<_InputIterator, _ForwardIterator>(_VSTD::move(__ifirst), _VSTD::move(__idx)); +} + +template <class _InputIterator, class _Size, class _ForwardIterator> +inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_copy_n(_InputIterator __ifirst, _Size __n, + _ForwardIterator __ofirst) { + typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; + auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst), + __unreachable_sentinel()); + return _VSTD::move(__result.second); } // uninitialized_fill @@ -253,43 +276,71 @@ _ForwardIterator uninitialized_value_construct_n(_ForwardIterator __first, _Size return __uninitialized_value_construct_n<_ValueType>(_VSTD::move(__first), __n); } -template <class _InputIt, class _ForwardIt> -inline _LIBCPP_INLINE_VISIBILITY -_ForwardIt uninitialized_move(_InputIt __first, _InputIt __last, _ForwardIt __first_res) { - using _Vt = typename iterator_traits<_ForwardIt>::value_type; - auto __idx = __first_res; +// uninitialized_move + +template <class _ValueType, class _InputIterator, class _Sentinel1, class _ForwardIterator, class _Sentinel2, + class _IterMove> +inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator> +__uninitialized_move(_InputIterator __ifirst, _Sentinel1 __ilast, + _ForwardIterator __ofirst, _Sentinel2 __olast, _IterMove __iter_move) { + auto __idx = __ofirst; #ifndef _LIBCPP_NO_EXCEPTIONS - try { + try { #endif - for (; __first != __last; ++__idx, (void) ++__first) - ::new ((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first)); - return __idx; -#ifndef _LIBCPP_NO_EXCEPTIONS - } catch (...) { - _VSTD::destroy(__first_res, __idx); - throw; + for (; __ifirst != __ilast && __idx != __olast; ++__idx, (void)++__ifirst) { + ::new (_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst)); } +#ifndef _LIBCPP_NO_EXCEPTIONS + } catch (...) { + _VSTD::__destroy(__ofirst, __idx); + throw; + } #endif + + return {_VSTD::move(__ifirst), _VSTD::move(__idx)}; +} + +template <class _InputIterator, class _ForwardIterator> +inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_move(_InputIterator __ifirst, _InputIterator __ilast, + _ForwardIterator __ofirst) { + using _ValueType = typename iterator_traits<_ForwardIterator>::value_type; + auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _VSTD::move(*__iter); }; + + auto __result = _VSTD::__uninitialized_move<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast), + _VSTD::move(__ofirst), __unreachable_sentinel(), __iter_move); + return _VSTD::move(__result.second); } -template <class _InputIt, class _Size, class _ForwardIt> -inline _LIBCPP_INLINE_VISIBILITY -pair<_InputIt, _ForwardIt> -uninitialized_move_n(_InputIt __first, _Size __n, _ForwardIt __first_res) { - using _Vt = typename iterator_traits<_ForwardIt>::value_type; - auto __idx = __first_res; +// uninitialized_move_n + +template <class _ValueType, class _InputIterator, class _Size, class _ForwardIterator, class _Sentinel, class _IterMove> +inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator> +__uninitialized_move_n(_InputIterator __ifirst, _Size __n, + _ForwardIterator __ofirst, _Sentinel __olast, _IterMove __iter_move) { + auto __idx = __ofirst; #ifndef _LIBCPP_NO_EXCEPTIONS - try { + try { #endif - for (; __n > 0; ++__idx, (void) ++__first, --__n) - ::new ((void*)_VSTD::addressof(*__idx)) _Vt(_VSTD::move(*__first)); - return {__first, __idx}; + for (; __n > 0 && __idx != __olast; ++__idx, (void)++__ifirst, --__n) + ::new (_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst)); #ifndef _LIBCPP_NO_EXCEPTIONS - } catch (...) { - _VSTD::destroy(__first_res, __idx); - throw; - } + } catch (...) { + _VSTD::__destroy(__ofirst, __idx); + throw; + } #endif + + return {_VSTD::move(__ifirst), _VSTD::move(__idx)}; +} + +template <class _InputIterator, class _Size, class _ForwardIterator> +inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator> +uninitialized_move_n(_InputIterator __ifirst, _Size __n, _ForwardIterator __ofirst) { + using _ValueType = typename iterator_traits<_ForwardIterator>::value_type; + auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _VSTD::move(*__iter); }; + + return _VSTD::__uninitialized_move_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst), + __unreachable_sentinel(), __iter_move); } #endif // _LIBCPP_STD_VER > 14 diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h index 3aeff41733..60045bb477 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h +++ b/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h @@ -11,9 +11,9 @@ #define _LIBCPP___MEMORY_UNIQUE_PTR_H #include <__config> -#include <__functional_base> #include <__functional/hash.h> #include <__functional/operations.h> +#include <__functional_base> #include <__memory/allocator_traits.h> // __pointer #include <__memory/compressed_pair.h> #include <__utility/forward.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h index 9cf38971bd..2aa0762a52 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h +++ b/contrib/libs/cxxsupp/libcxx/include/__random/chi_squared_distribution.h @@ -11,8 +11,8 @@ #include <__config> #include <__random/gamma_distribution.h> -#include <limits> #include <iosfwd> +#include <limits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h index 49d024eafe..34167e4635 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h +++ b/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h @@ -10,8 +10,8 @@ #define _LIBCPP___RANDOM_GAMMA_DISTRIBUTION_H #include <__config> -#include <__random/uniform_real_distribution.h> #include <__random/exponential_distribution.h> +#include <__random/uniform_real_distribution.h> #include <cmath> #include <iosfwd> #include <limits> diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h index 412fa9b646..931ce78da7 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h +++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/single_view.h @@ -10,8 +10,8 @@ #define _LIBCPP___RANGES_SINGLE_VIEW_H #include <__config> -#include <__ranges/view_interface.h> #include <__ranges/copyable_box.h> +#include <__ranges/view_interface.h> #include <__utility/forward.h> #include <__utility/in_place.h> #include <__utility/move.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/__string b/contrib/libs/cxxsupp/libcxx/include/__string index 8a7c0eee29..87daa25092 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__string +++ b/contrib/libs/cxxsupp/libcxx/include/__string @@ -10,21 +10,21 @@ #ifndef _LIBCPP___STRING #define _LIBCPP___STRING -#include <__config> #include <__algorithm/copy.h> #include <__algorithm/copy_backward.h> #include <__algorithm/copy_n.h> #include <__algorithm/fill_n.h> -#include <__algorithm/find_first_of.h> #include <__algorithm/find_end.h> +#include <__algorithm/find_first_of.h> #include <__algorithm/min.h> +#include <__config> #include <__functional/hash.h> // for __murmur2_or_cityhash #include <__iterator/iterator_traits.h> -#include <cstdio> // for EOF #include <cstdint> // for uint_least16_t +#include <cstdio> // for EOF #include <cstring> // for memcpy -#include <type_traits> // for __libcpp_is_constant_evaluated #include <iosfwd> // for streampos & friends +#include <type_traits> // for __libcpp_is_constant_evaluated #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS # include <cwchar> // for wmemcpy diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/swap.h b/contrib/libs/cxxsupp/libcxx/include/__utility/swap.h index 6c07511686..20ec1419fc 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__utility/swap.h +++ b/contrib/libs/cxxsupp/libcxx/include/__utility/swap.h @@ -12,8 +12,8 @@ #include <__config> #include <__utility/declval.h> #include <__utility/move.h> -#include <type_traits> #include <cstddef> +#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/algorithm b/contrib/libs/cxxsupp/libcxx/include/algorithm index 7dc8927d26..5f77952a9d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/algorithm +++ b/contrib/libs/cxxsupp/libcxx/include/algorithm @@ -641,6 +641,12 @@ template <class BidirectionalIterator, class Compare> constexpr bool // constexpr in C++20 prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp); +namespace ranges { +// [algorithms.results], algorithm result types +template<class InputIterator, class OutputIterator> + struct in_out_result; +} + } // std */ @@ -673,8 +679,8 @@ template <class BidirectionalIterator, class Compare> #include <__algorithm/count_if.h> #include <__algorithm/equal.h> #include <__algorithm/equal_range.h> -#include <__algorithm/fill_n.h> #include <__algorithm/fill.h> +#include <__algorithm/fill_n.h> #include <__algorithm/find.h> #include <__algorithm/find_end.h> #include <__algorithm/find_first_of.h> @@ -682,9 +688,10 @@ template <class BidirectionalIterator, class Compare> #include <__algorithm/find_if_not.h> #include <__algorithm/for_each.h> #include <__algorithm/for_each_n.h> -#include <__algorithm/generate_n.h> #include <__algorithm/generate.h> +#include <__algorithm/generate_n.h> #include <__algorithm/half_positive.h> +#include <__algorithm/in_out_result.h> #include <__algorithm/includes.h> #include <__algorithm/inplace_merge.h> #include <__algorithm/is_heap.h> @@ -747,8 +754,8 @@ template <class BidirectionalIterator, class Compare> #include <__algorithm/stable_sort.h> #include <__algorithm/swap_ranges.h> #include <__algorithm/transform.h> -#include <__algorithm/unique_copy.h> #include <__algorithm/unique.h> +#include <__algorithm/unique_copy.h> #include <__algorithm/unwrap_iter.h> #include <__algorithm/upper_bound.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/bitset b/contrib/libs/cxxsupp/libcxx/include/bitset index ba98346f3a..ef389bf06e 100644 --- a/contrib/libs/cxxsupp/libcxx/include/bitset +++ b/contrib/libs/cxxsupp/libcxx/include/bitset @@ -112,8 +112,8 @@ template <size_t N> struct hash<std::bitset<N>>; */ -#include <__config> #include <__bit_reference> +#include <__config> #include <__functional_base> #include <climits> #include <cstddef> diff --git a/contrib/libs/cxxsupp/libcxx/include/cmath b/contrib/libs/cxxsupp/libcxx/include/cmath index 2bae24877d..99d48cb59f 100644 --- a/contrib/libs/cxxsupp/libcxx/include/cmath +++ b/contrib/libs/cxxsupp/libcxx/include/cmath @@ -306,8 +306,8 @@ constexpr long double lerp(long double a, long double b, long double t) noexcept #include <__config> #include <math.h> -#include <version> #include <type_traits> +#include <version> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -636,6 +636,23 @@ lerp(double __a, double __b, double __t) _NOEXCEPT { return __ler constexpr long double lerp(long double __a, long double __b, long double __t) _NOEXCEPT { return __lerp(__a, __b, __t); } +template <class _A1, class _A2, class _A3> +inline _LIBCPP_HIDE_FROM_ABI +constexpr typename enable_if_t +< + is_arithmetic<_A1>::value && + is_arithmetic<_A2>::value && + is_arithmetic<_A3>::value, + __promote<_A1, _A2, _A3> +>::type +lerp(_A1 __a, _A2 __b, _A3 __t) noexcept +{ + typedef typename __promote<_A1, _A2, _A3>::type __result_type; + static_assert(!(_IsSame<_A1, __result_type>::value && + _IsSame<_A2, __result_type>::value && + _IsSame<_A3, __result_type>::value)); + return __lerp((__result_type)__a, (__result_type)__b, (__result_type)__t); +} #endif // _LIBCPP_STD_VER > 17 _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/libs/cxxsupp/libcxx/include/coroutine b/contrib/libs/cxxsupp/libcxx/include/coroutine index 4e140ab3fe..6e83fe285b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/coroutine +++ b/contrib/libs/cxxsupp/libcxx/include/coroutine @@ -40,8 +40,8 @@ struct suspend_always; #include <__config> #include <__coroutine/coroutine_handle.h> -#include <__coroutine/noop_coroutine_handle.h> #include <__coroutine/coroutine_traits.h> +#include <__coroutine/noop_coroutine_handle.h> #include <__coroutine/trivial_awaitables.h> #include <version> diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/__memory b/contrib/libs/cxxsupp/libcxx/include/experimental/__memory index bd9bf95e59..3302779389 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/__memory +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/__memory @@ -10,11 +10,11 @@ #ifndef _LIBCPP_EXPERIMENTAL___MEMORY #define _LIBCPP_EXPERIMENTAL___MEMORY +#include <__functional_base> #include <__memory/allocator_arg_t.h> #include <__memory/uses_allocator.h> #include <experimental/__config> #include <experimental/utility> // for erased_type -#include <__functional_base> #include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/algorithm b/contrib/libs/cxxsupp/libcxx/include/experimental/algorithm index bcf372cafd..a7fa18ff5d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/algorithm +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/algorithm @@ -31,12 +31,11 @@ ForwardIterator search(ForwardIterator first, ForwardIterator last, */ -#include <experimental/__config> +#include <__debug> #include <algorithm> +#include <experimental/__config> #include <type_traits> -#include <__debug> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/coroutine b/contrib/libs/cxxsupp/libcxx/include/experimental/coroutine index 16b4028765..4b53e4b62b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/coroutine +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/coroutine @@ -45,13 +45,13 @@ template <class P> struct hash<coroutine_handle<P>>; */ +#include <__debug> +#include <cstddef> #include <experimental/__config> -#include <new> -#include <type_traits> #include <functional> #include <memory> // for hash<T*> -#include <cstddef> -#include <__debug> +#include <new> +#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/deque b/contrib/libs/cxxsupp/libcxx/include/experimental/deque index 594ddff22f..41c25d95b9 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/deque +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/deque @@ -28,8 +28,8 @@ namespace pmr { */ -#include <experimental/__config> #include <deque> +#include <experimental/__config> #include <experimental/memory_resource> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/forward_list b/contrib/libs/cxxsupp/libcxx/include/experimental/forward_list index 6781424cf2..590bef0283 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/forward_list +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/forward_list @@ -29,8 +29,8 @@ namespace pmr { */ #include <experimental/__config> -#include <forward_list> #include <experimental/memory_resource> +#include <forward_list> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/functional b/contrib/libs/cxxsupp/libcxx/include/experimental/functional index bcff51e805..8977c63543 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/functional +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/functional @@ -86,16 +86,15 @@ inline namespace fundamentals_v1 { */ +#include <__debug> #include <__memory/uses_allocator.h> +#include <algorithm> +#include <array> #include <experimental/__config> #include <functional> -#include <algorithm> #include <type_traits> -#include <vector> -#include <array> #include <unordered_map> - -#include <__debug> +#include <vector> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -104,7 +103,6 @@ inline namespace fundamentals_v1 { _LIBCPP_PUSH_MACROS #include <__undef_macros> - _LIBCPP_BEGIN_NAMESPACE_LFTS #if _LIBCPP_STD_VER > 11 diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/iterator b/contrib/libs/cxxsupp/libcxx/include/experimental/iterator index 9da08a0cff..ab1f54e35e 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/iterator +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/iterator @@ -53,8 +53,8 @@ namespace std { */ #include <__memory/addressof.h> -#include <__utility/move.h> #include <__utility/forward.h> +#include <__utility/move.h> #include <experimental/__config> #include <iterator> diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/list b/contrib/libs/cxxsupp/libcxx/include/experimental/list index 099d80fd8d..be43e60f49 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/list +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/list @@ -29,8 +29,8 @@ namespace pmr { */ #include <experimental/__config> -#include <list> #include <experimental/memory_resource> +#include <list> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/map b/contrib/libs/cxxsupp/libcxx/include/experimental/map index 27ff7e862e..704626eed6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/map +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/map @@ -34,8 +34,8 @@ namespace pmr { */ #include <experimental/__config> -#include <map> #include <experimental/memory_resource> +#include <map> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/memory_resource b/contrib/libs/cxxsupp/libcxx/include/experimental/memory_resource index 71a4f51c50..47bb8c58c8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/memory_resource +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/memory_resource @@ -64,18 +64,18 @@ namespace pmr { */ +#include <__debug> +#include <__tuple> +#include <cstddef> +#include <cstdlib> #include <experimental/__config> #include <experimental/__memory> #include <limits> #include <memory> #include <new> #include <stdexcept> -#include <__tuple> #include <type_traits> #include <utility> -#include <cstddef> -#include <cstdlib> -#include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/propagate_const b/contrib/libs/cxxsupp/libcxx/include/experimental/propagate_const index 12376dcec2..deb4ba98a7 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/propagate_const +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/propagate_const @@ -107,19 +107,18 @@ */ #include <experimental/__config> +#include <functional> +#include <type_traits> +#include <utility> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif #if _LIBCPP_STD_VER > 11 -#include <type_traits> -#include <utility> -#include <functional> - _LIBCPP_BEGIN_NAMESPACE_LFTS_V2 - template <class _Tp> class propagate_const; diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/regex b/contrib/libs/cxxsupp/libcxx/include/experimental/regex index ced0e950a1..5bb3dccf93 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/regex +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/regex @@ -36,9 +36,9 @@ namespace pmr { */ #include <experimental/__config> -#include <regex> -#include <experimental/string> #include <experimental/memory_resource> +#include <experimental/string> +#include <regex> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/set b/contrib/libs/cxxsupp/libcxx/include/experimental/set index 891510bbb8..12b2ac23b8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/set +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/set @@ -34,8 +34,8 @@ namespace pmr { */ #include <experimental/__config> -#include <set> #include <experimental/memory_resource> +#include <set> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/simd b/contrib/libs/cxxsupp/libcxx/include/experimental/simd index 1f17ee96f0..af7e66eb8b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/simd +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/simd @@ -649,10 +649,10 @@ public: */ -#include <experimental/__config> #include <algorithm> #include <array> #include <cstddef> +#include <experimental/__config> #include <functional> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/string b/contrib/libs/cxxsupp/libcxx/include/experimental/string index b881fcf3af..1643e84c5a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/string +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/string @@ -38,8 +38,8 @@ namespace pmr { */ #include <experimental/__config> -#include <string> #include <experimental/memory_resource> +#include <string> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/unordered_map b/contrib/libs/cxxsupp/libcxx/include/experimental/unordered_map index fc8cc7f77b..80905e68ef 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/unordered_map +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/unordered_map @@ -40,8 +40,8 @@ namespace pmr { */ #include <experimental/__config> -#include <unordered_map> #include <experimental/memory_resource> +#include <unordered_map> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/unordered_set b/contrib/libs/cxxsupp/libcxx/include/experimental/unordered_set index 39342da5f6..f09b0bd57d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/unordered_set +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/unordered_set @@ -34,8 +34,8 @@ namespace pmr { */ #include <experimental/__config> -#include <unordered_set> #include <experimental/memory_resource> +#include <unordered_set> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/vector b/contrib/libs/cxxsupp/libcxx/include/experimental/vector index a22698ef7c..4d31d1ccd8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/experimental/vector +++ b/contrib/libs/cxxsupp/libcxx/include/experimental/vector @@ -29,8 +29,8 @@ namespace pmr { */ #include <experimental/__config> -#include <vector> #include <experimental/memory_resource> +#include <vector> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/ext/__hash b/contrib/libs/cxxsupp/libcxx/include/ext/__hash index 2f998ee40a..f6e7a486f6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/ext/__hash +++ b/contrib/libs/cxxsupp/libcxx/include/ext/__hash @@ -13,8 +13,8 @@ #pragma GCC system_header #include <__string> -#include <string> #include <cstring> +#include <string> namespace __gnu_cxx { diff --git a/contrib/libs/cxxsupp/libcxx/include/ext/hash_map b/contrib/libs/cxxsupp/libcxx/include/ext/hash_map index d6ea26c2cf..a52c6a4066 100644 --- a/contrib/libs/cxxsupp/libcxx/include/ext/hash_map +++ b/contrib/libs/cxxsupp/libcxx/include/ext/hash_map @@ -203,10 +203,10 @@ template <class Key, class T, class Hash, class Pred, class Alloc> #include <__config> #include <__hash_table> +#include <ext/__hash> #include <functional> #include <stdexcept> #include <type_traits> -#include <ext/__hash> #if defined(__DEPRECATED) && __DEPRECATED #if defined(_LIBCPP_WARNING) diff --git a/contrib/libs/cxxsupp/libcxx/include/ext/hash_set b/contrib/libs/cxxsupp/libcxx/include/ext/hash_set index 7d19ccd006..bca008d172 100644 --- a/contrib/libs/cxxsupp/libcxx/include/ext/hash_set +++ b/contrib/libs/cxxsupp/libcxx/include/ext/hash_set @@ -194,8 +194,8 @@ template <class Value, class Hash, class Pred, class Alloc> #include <__config> #include <__hash_table> -#include <functional> #include <ext/__hash> +#include <functional> #if defined(__DEPRECATED) && __DEPRECATED #if defined(_LIBCPP_WARNING) diff --git a/contrib/libs/cxxsupp/libcxx/include/filesystem b/contrib/libs/cxxsupp/libcxx/include/filesystem index 9f5b42747b..74f596599a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/filesystem +++ b/contrib/libs/cxxsupp/libcxx/include/filesystem @@ -248,8 +248,8 @@ inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_direct #include <__filesystem/file_type.h> #include <__filesystem/filesystem_error.h> #include <__filesystem/operations.h> -#include <__filesystem/path_iterator.h> #include <__filesystem/path.h> +#include <__filesystem/path_iterator.h> #include <__filesystem/perm_options.h> #include <__filesystem/perms.h> #include <__filesystem/recursive_directory_iterator.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/functional b/contrib/libs/cxxsupp/libcxx/include/functional index 53a5f2bc37..3a24b97588 100644 --- a/contrib/libs/cxxsupp/libcxx/include/functional +++ b/contrib/libs/cxxsupp/libcxx/include/functional @@ -496,9 +496,9 @@ POLICY: For non-variadic implementations, the number of arguments is limited #include <__debug> #include <__functional/binary_function.h> // TODO: deprecate #include <__functional/binary_negate.h> +#include <__functional/bind.h> #include <__functional/bind_back.h> #include <__functional/bind_front.h> -#include <__functional/bind.h> #include <__functional/binder1st.h> #include <__functional/binder2nd.h> #include <__functional/compose.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/iterator b/contrib/libs/cxxsupp/libcxx/include/iterator index be223192de..29097a9aa8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/iterator +++ b/contrib/libs/cxxsupp/libcxx/include/iterator @@ -600,16 +600,16 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept; #include <__iterator/incrementable_traits.h> #include <__iterator/indirectly_comparable.h> #include <__iterator/insert_iterator.h> -#include <__iterator/istreambuf_iterator.h> #include <__iterator/istream_iterator.h> -#include <__iterator/iterator.h> -#include <__iterator/iterator_traits.h> +#include <__iterator/istreambuf_iterator.h> #include <__iterator/iter_move.h> #include <__iterator/iter_swap.h> +#include <__iterator/iterator.h> +#include <__iterator/iterator_traits.h> #include <__iterator/move_iterator.h> #include <__iterator/next.h> -#include <__iterator/ostreambuf_iterator.h> #include <__iterator/ostream_iterator.h> +#include <__iterator/ostreambuf_iterator.h> #include <__iterator/prev.h> #include <__iterator/projected.h> #include <__iterator/readable_traits.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/list b/contrib/libs/cxxsupp/libcxx/include/list index cb7ababdf4..b5a7174740 100644 --- a/contrib/libs/cxxsupp/libcxx/include/list +++ b/contrib/libs/cxxsupp/libcxx/include/list @@ -355,29 +355,23 @@ public: _LIBCPP_INLINE_VISIBILITY reference operator*() const { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to dereference a non-dereferenceable list::iterator"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), + "Attempted to dereference a non-dereferenceable list::iterator"); return __ptr_->__as_node()->__value_; } _LIBCPP_INLINE_VISIBILITY pointer operator->() const { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to dereference a non-dereferenceable list::iterator"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), + "Attempted to dereference a non-dereferenceable list::iterator"); return pointer_traits<pointer>::pointer_to(__ptr_->__as_node()->__value_); } _LIBCPP_INLINE_VISIBILITY __list_iterator& operator++() { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment a non-incrementable list::iterator"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), + "Attempted to increment a non-incrementable list::iterator"); __ptr_ = __ptr_->__next_; return *this; } @@ -387,10 +381,8 @@ public: _LIBCPP_INLINE_VISIBILITY __list_iterator& operator--() { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__decrementable(this), - "Attempted to decrement a non-decrementable list::iterator"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__decrementable(this), + "Attempted to decrement a non-decrementable list::iterator"); __ptr_ = __ptr_->__prev_; return *this; } @@ -482,29 +474,23 @@ public: _LIBCPP_INLINE_VISIBILITY reference operator*() const { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to dereference a non-dereferenceable list::const_iterator"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), + "Attempted to dereference a non-dereferenceable list::const_iterator"); return __ptr_->__as_node()->__value_; } _LIBCPP_INLINE_VISIBILITY pointer operator->() const { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to dereference a non-dereferenceable list::const_iterator"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), + "Attempted to dereference a non-dereferenceable list::const_iterator"); return pointer_traits<pointer>::pointer_to(__ptr_->__as_node()->__value_); } _LIBCPP_INLINE_VISIBILITY __list_const_iterator& operator++() { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment a non-incrementable list::const_iterator"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), + "Attempted to increment a non-incrementable list::const_iterator"); __ptr_ = __ptr_->__next_; return *this; } @@ -514,10 +500,8 @@ public: _LIBCPP_INLINE_VISIBILITY __list_const_iterator& operator--() { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__decrementable(this), - "Attempted to decrement a non-decrementable list::const_iterator"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__decrementable(this), + "Attempted to decrement a non-decrementable list::const_iterator"); __ptr_ = __ptr_->__prev_; return *this; } @@ -1448,11 +1432,8 @@ template <class _Tp, class _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, const value_type& __x) { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::insert(iterator, x) called with an iterator not" - " referring to this list"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::insert(iterator, x) called with an iterator not referring to this list"); __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x); @@ -1469,10 +1450,9 @@ template <class _Tp, class _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& __x) { + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::insert(iterator, n, x) called with an iterator not referring to this list"); #if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::insert(iterator, n, x) called with an iterator not" - " referring to this list"); iterator __r(__p.__ptr_, this); #else iterator __r(__p.__ptr_); @@ -1535,10 +1515,9 @@ typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l, typename enable_if<__is_cpp17_input_iterator<_InpIter>::value>::type*) { + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::insert(iterator, range) called with an iterator not referring to this list"); #if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::insert(iterator, range) called with an iterator not" - " referring to this list"); iterator __r(__p.__ptr_, this); #else iterator __r(__p.__ptr_); @@ -1694,11 +1673,8 @@ template <class... _Args> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args) { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::emplace(iterator, args...) called with an iterator not" - " referring to this list"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::emplace(iterator, args...) called with an iterator not referring to this list"); __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...); @@ -1717,11 +1693,8 @@ template <class _Tp, class _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x) { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::insert(iterator, x) called with an iterator not" - " referring to this list"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::insert(iterator, x) called with an iterator not referring to this list"); __node_allocator& __na = base::__node_alloc(); __hold_pointer __hold = __allocate_node(__na); __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x)); @@ -1800,11 +1773,8 @@ template <class _Tp, class _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __p) { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::erase(iterator) called with an iterator not" - " referring to this list"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::erase(iterator) called with an iterator not referring to this list"); _LIBCPP_ASSERT(__p != end(), "list::erase(iterator) called with a non-dereferenceable iterator"); __node_allocator& __na = base::__node_alloc(); @@ -1841,14 +1811,10 @@ template <class _Tp, class _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l) { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__f)) == this, - "list::erase(iterator, iterator) called with an iterator not" - " referring to this list"); - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__l)) == this, - "list::erase(iterator, iterator) called with an iterator not" - " referring to this list"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__f)) == this, + "list::erase(iterator, iterator) called with an iterator not referring to this list"); + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__l)) == this, + "list::erase(iterator, iterator) called with an iterator not referring to this list"); if (__f != __l) { __node_allocator& __na = base::__node_alloc(); @@ -2006,11 +1972,8 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c) { _LIBCPP_ASSERT(this != _VSTD::addressof(__c), "list::splice(iterator, list) called with this == &list"); -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::splice(iterator, list) called with an iterator not" - " referring to this list"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::splice(iterator, list) called with an iterator not referring to this list"); if (!__c.empty()) { __link_pointer __f = __c.__end_.__next_; @@ -2046,17 +2009,13 @@ template <class _Tp, class _Alloc> void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i) { -#if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::splice(iterator, list, iterator) called with the first iterator" - " not referring to this list"); - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__i)) == _VSTD::addressof(__c), - "list::splice(iterator, list, iterator) called with the second iterator" - " not referring to the list argument"); - _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(_VSTD::addressof(__i)), - "list::splice(iterator, list, iterator) called with the second iterator" - " not dereferenceable"); -#endif + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::splice(iterator, list, iterator) called with the first iterator not referring to this list"); + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__i)) == _VSTD::addressof(__c), + "list::splice(iterator, list, iterator) called with the second iterator not referring to the list argument"); + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(_VSTD::addressof(__i)), + "list::splice(iterator, list, iterator) called with the second iterator not dereferenceable"); + if (__p.__ptr_ != __i.__ptr_ && __p.__ptr_ != __i.__ptr_->__next_) { __link_pointer __f = __i.__ptr_; @@ -2091,23 +2050,20 @@ template <class _Tp, class _Alloc> void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l) { + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, + "list::splice(iterator, list, iterator, iterator) called with first iterator not referring to this list"); + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__f)) == _VSTD::addressof(__c), + "list::splice(iterator, list, iterator, iterator) called with second iterator not referring to the list argument"); + _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__l)) == _VSTD::addressof(__c), + "list::splice(iterator, list, iterator, iterator) called with third iterator not referring to the list argument"); + #if _LIBCPP_DEBUG_LEVEL == 2 - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this, - "list::splice(iterator, list, iterator, iterator) called with first iterator not" - " referring to this list"); - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__f)) == _VSTD::addressof(__c), - "list::splice(iterator, list, iterator, iterator) called with second iterator not" - " referring to the list argument"); - _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__l)) == _VSTD::addressof(__c), - "list::splice(iterator, list, iterator, iterator) called with third iterator not" - " referring to the list argument"); if (this == _VSTD::addressof(__c)) { for (const_iterator __i = __f; __i != __l; ++__i) - _LIBCPP_ASSERT(__i != __p, - "list::splice(iterator, list, iterator, iterator)" - " called with the first iterator within the range" - " of the second and third iterators"); + _LIBCPP_DEBUG_ASSERT(__i != __p, + "list::splice(iterator, list, iterator, iterator)" + " called with the first iterator within the range of the second and third iterators"); } #endif if (__f != __l) diff --git a/contrib/libs/cxxsupp/libcxx/include/math.h b/contrib/libs/cxxsupp/libcxx/include/math.h index 246c3aa1e1..67ec34f8cb 100644 --- a/contrib/libs/cxxsupp/libcxx/include/math.h +++ b/contrib/libs/cxxsupp/libcxx/include/math.h @@ -309,9 +309,9 @@ long double truncl(long double x); // back to C++ linkage before including these C++ headers. extern "C++" { +#include <limits> #include <stdlib.h> #include <type_traits> -#include <limits> // signbit diff --git a/contrib/libs/cxxsupp/libcxx/include/memory b/contrib/libs/cxxsupp/libcxx/include/memory index bbf093df9e..f4d390c039 100644 --- a/contrib/libs/cxxsupp/libcxx/include/memory +++ b/contrib/libs/cxxsupp/libcxx/include/memory @@ -181,28 +181,65 @@ template <class InputIterator, class ForwardIterator> ForwardIterator uninitialized_copy(InputIterator first, InputIterator last, ForwardIterator result); +namespace ranges { + +template<class InputIterator, class OutputIterator> +using uninitialized_copy_result = in_out_result<InputIterator, OutputIterator>; // since C++20 + +template<input_iterator InputIterator, sentinel-for<InputIterator> Sentinel1, nothrow-forward-iterator OutputIterator, nothrow-sentinel-for<OutputIterator> Sentinel2> + requires constructible_from<iter_value_t<OutputIterator>, iter_reference_t<InputIterator>> +uninitialized_copy_result<InputIterator, OutputIterator> +uninitialized_copy(InputIterator ifirst, Sentinel1 ilast, OutputIterator ofirst, Sentinel2 olast); // since C++20 + +template<input_range InputRange, nothrow-forward-range OutputRange> + requires constructible_from<range_value_t<OutputRange>, range_reference_t<InputRange>> +uninitialized_copy_result<borrowed_iterator_t<InputRange>, borrowed_iterator_t<OutputRange>> +uninitialized_copy(InputRange&& in_range, OutputRange&& out_range); // since C++20 + +} + template <class InputIterator, class Size, class ForwardIterator> ForwardIterator uninitialized_copy_n(InputIterator first, Size n, ForwardIterator result); +namespace ranges { + +template<class InputIterator, class OutputIterator> +using uninitialized_copy_n_result = in_out_result<InputIterator, OutputIterator>; // since C++20 + +template<input_iterator InputIterator, nothrow-forward-iterator OutputIterator, nothrow-sentinel-for<OutputIterator> Sentinel> + requires constructible_from<iter_value_t<OutputIterator>, iter_reference_t<InputIterator>> +uninitialized_copy_n_result<InputIterator, OutputIterator> +uninitialized_copy_n(InputIterator ifirst, iter_difference_t<InputIterator> n, OutputIterator ofirst, Sentinel olast); // since C++20 + +} + template <class ForwardIterator, class T> void uninitialized_fill(ForwardIterator first, ForwardIterator last, const T& x); +namespace ranges { + template <nothrow-forward-iterator ForwardIterator, nothrow-sentinel-for<ForwardIterator> Sentinel, class T> requires constructible_from<iter_value_t<ForwardIterator>, const T&> -ForwardIterator ranges::uninitialized_fill(ForwardIterator first, Sentinel last, const T& x); // since C++20 +ForwardIterator uninitialized_fill(ForwardIterator first, Sentinel last, const T& x); // since C++20 template <nothrow-forward-range ForwardRange, class T> requires constructible_from<range_value_t<ForwardRange>, const T&> -borrowed_iterator_t<ForwardRange> ranges::uninitialized_fill(ForwardRange&& range, const T& x); // since C++20 +borrowed_iterator_t<ForwardRange> uninitialized_fill(ForwardRange&& range, const T& x); // since C++20 + +} template <class ForwardIterator, class Size, class T> ForwardIterator uninitialized_fill_n(ForwardIterator first, Size n, const T& x); +namespace ranges { + template <nothrow-forward-iterator ForwardIterator, class T> requires constructible_from<iter_value_t<ForwardIterator>, const T&> -ForwardIterator ranges::uninitialized_fill_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20 +ForwardIterator uninitialized_fill_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20 + +} template <class T, class ...Args> constexpr T* construct_at(T* location, Args&& ...args); // since C++20 @@ -219,44 +256,89 @@ ForwardIterator destroy_n(ForwardIterator first, Size n); // constexpr in C++20 template <class InputIterator, class ForwardIterator> ForwardIterator uninitialized_move(InputIterator first, InputIterator last, ForwardIterator result); +namespace ranges { + +template<class InputIterator, class OutputIterator> +using uninitialized_move_result = in_out_result<InputIterator, OutputIterator>; // since C++20 + +template <input_iterator InputIterator, sentinel_for<InputIterator> Sentinel1, nothrow-forward-iterator OutputIterator, nothrow-sentinel-for<O> Sentinel2> + requires constructible_from<iter_value_t<OutputIterator>, iter_rvalue_reference_t<InputIterator>> +uninitialized_move_result<InputIterator, OutputIterator> +uninitialized_move(InputIterator ifirst, Sentinel1 ilast, OutputIterator ofirst, Sentinel2 olast); // since C++20 + +template<input_range InputRange, nothrow-forward-range OutputRange> + requires constructible_from<range_value_t<OutputRange>, range_rvalue_reference_t<InputRange>> +uninitialized_move_result<borrowed_iterator_t<InputRange>, borrowed_iterator_t<OutputRange>> +uninitialized_move(InputRange&& in_range, OutputRange&& out_range); // since C++20 + +} + template <class InputIterator, class Size, class ForwardIterator> pair<InputIterator,ForwardIterator> uninitialized_move_n(InputIterator first, Size n, ForwardIterator result); +namespace ranges { + +template<class InputIterator, class OutputIterator> +using uninitialized_move_n_result = in_out_result<InputIterator, OutputIterator>; // since C++20 + +template<input_iterator InputIterator, nothrow-forward-iterator OutputIterator, nothrow-sentinel-for<OutputIterator> Sentinel> + requires constructible_from<iter_value_t<OutputIterator>, iter_rvalue_reference_t<InputIterator>> +uninitialized_move_n_result<InputIterator, OutputIterator> +uninitialized_move_n(InputIterator ifirst, iter_difference_t<InputIterator> n, OutputIterator ofirst, Sentinel olast); // since C++20 + +} + template <class ForwardIterator> void uninitialized_value_construct(ForwardIterator first, ForwardIterator last); +namespace ranges { + template <nothrow-forward-iterator ForwardIterator, nothrow-sentinel-for<ForwardIterator> Sentinel> requires default_initializable<iter_value_t<ForwardIterator>> - ForwardIterator ranges::uninitialized_value_construct(ForwardIterator first, Sentinel last); // since C++20 + ForwardIterator uninitialized_value_construct(ForwardIterator first, Sentinel last); // since C++20 template <nothrow-forward-range ForwardRange> requires default_initializable<range_value_t<ForwardRange>> - borrowed_iterator_t<ForwardRange> ranges::uninitialized_value_construct(ForwardRange&& r); // since C++20 + borrowed_iterator_t<ForwardRange> uninitialized_value_construct(ForwardRange&& r); // since C++20 + +} template <class ForwardIterator, class Size> ForwardIterator uninitialized_value_construct_n(ForwardIterator first, Size n); +namespace ranges { + template <nothrow-forward-iterator ForwardIterator> requires default_initializable<iter_value_t<ForwardIterator>> - ForwardIterator ranges::uninitialized_value_construct_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20 + ForwardIterator uninitialized_value_construct_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20 + +} template <class ForwardIterator> void uninitialized_default_construct(ForwardIterator first, ForwardIterator last); +namespace ranges { + template <nothrow-forward-iterator ForwardIterator, nothrow-sentinel-for<ForwardIterator> Sentinel> requires default_initializable<iter_value_t<ForwardIterator>> - ForwardIterator ranges::uninitialized_default_construct(ForwardIterator first, Sentinel last); // since C++20 + ForwardIterator uninitialized_default_construct(ForwardIterator first, Sentinel last); // since C++20 template <nothrow-forward-range ForwardRange> requires default_initializable<range_value_t<ForwardRange>> - borrowed_iterator_t<ForwardRange> ranges::uninitialized_default_construct(ForwardRange&& r); // since C++20 + borrowed_iterator_t<ForwardRange> uninitialized_default_construct(ForwardRange&& r); // since C++20 + +} template <class ForwardIterator, class Size> ForwardIterator uninitialized_default_construct_n(ForwardIterator first, Size n); +namespace ranges { + template <nothrow-forward-iterator ForwardIterator> requires default_initializable<iter_value_t<ForwardIterator>> - ForwardIterator ranges::uninitialized_default_construct_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20 + ForwardIterator uninitialized_default_construct_n(ForwardIterator first, iter_difference_t<ForwardIterator> n); // since C++20 + +} template <class Y> struct auto_ptr_ref {}; // deprecated in C++11, removed in C++17 diff --git a/contrib/libs/cxxsupp/libcxx/include/module.modulemap b/contrib/libs/cxxsupp/libcxx/include/module.modulemap index 8eba28b0ef..305fe1bc9d 100644 --- a/contrib/libs/cxxsupp/libcxx/include/module.modulemap +++ b/contrib/libs/cxxsupp/libcxx/include/module.modulemap @@ -246,6 +246,7 @@ module std [system] { module generate { private header "__algorithm/generate.h" } module generate_n { private header "__algorithm/generate_n.h" } module half_positive { private header "__algorithm/half_positive.h" } + module in_out_result { private header "__algorithm/in_out_result.h" } module includes { private header "__algorithm/includes.h" } module inplace_merge { private header "__algorithm/inplace_merge.h" } module is_heap { private header "__algorithm/is_heap.h" } @@ -430,8 +431,8 @@ module std [system] { module __coroutine { module coroutine_handle { private header "__coroutine/coroutine_handle.h" } module coroutine_traits { private header "__coroutine/coroutine_traits.h" } - module trivial_awaitables { private header "__coroutine/trivial_awaitables.h" } module noop_coroutine_handle { private header "__coroutine/noop_coroutine_handle.h" } + module trivial_awaitables { private header "__coroutine/trivial_awaitables.h" } } } module deque { @@ -461,8 +462,8 @@ module std [system] { module file_type { private header "__filesystem/file_type.h" } module filesystem_error { private header "__filesystem/filesystem_error.h" } module operations { private header "__filesystem/operations.h" } - module path_iterator { private header "__filesystem/path_iterator.h" } module path { private header "__filesystem/path.h" } + module path_iterator { private header "__filesystem/path_iterator.h" } module perm_options { private header "__filesystem/perm_options.h" } module perms { private header "__filesystem/perms.h" } module recursive_directory_iterator { private header "__filesystem/recursive_directory_iterator.h" } @@ -797,8 +798,8 @@ module std [system] { module range_adaptor { private header "__ranges/range_adaptor.h" } module ref_view { private header "__ranges/ref_view.h" } module reverse_view { private header "__ranges/reverse_view.h" } - module size { private header "__ranges/size.h" } module single_view { private header "__ranges/single_view.h" } + module size { private header "__ranges/size.h" } module subrange { private header "__ranges/subrange.h" } module take_view { private header "__ranges/take_view.h" } module transform_view { diff --git a/contrib/libs/cxxsupp/libcxx/include/ranges b/contrib/libs/cxxsupp/libcxx/include/ranges index dd7decf66f..707c7acd1b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/ranges +++ b/contrib/libs/cxxsupp/libcxx/include/ranges @@ -207,8 +207,8 @@ namespace std::ranges { #include <__ranges/dangling.h> #include <__ranges/data.h> #include <__ranges/drop_view.h> -#include <__ranges/empty_view.h> #include <__ranges/empty.h> +#include <__ranges/empty_view.h> #include <__ranges/enable_borrowed_range.h> #include <__ranges/enable_view.h> #include <__ranges/iota_view.h> diff --git a/contrib/libs/cxxsupp/libcxx/include/stdexcept b/contrib/libs/cxxsupp/libcxx/include/stdexcept index c1dc05669b..5df2050ee4 100644 --- a/contrib/libs/cxxsupp/libcxx/include/stdexcept +++ b/contrib/libs/cxxsupp/libcxx/include/stdexcept @@ -42,9 +42,9 @@ public: */ #include <__config> +#include <cstdlib> #include <exception> #include <iosfwd> // for string forward decl -#include <cstdlib> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/contrib/libs/cxxsupp/libcxx/include/unordered_map b/contrib/libs/cxxsupp/libcxx/include/unordered_map index 53ddb95663..49edb8765b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/unordered_map +++ b/contrib/libs/cxxsupp/libcxx/include/unordered_map @@ -517,8 +517,8 @@ template <class Key, class T, class Hash, class Pred, class Alloc> #include <__config> #include <__debug> #include <__functional/is_transparent.h> -#include <__iterator/iterator_traits.h> #include <__hash_table> +#include <__iterator/iterator_traits.h> #include <__node_handle> #include <__utility/forward.h> #include <compare> diff --git a/contrib/libs/cxxsupp/libcxx/include/vector b/contrib/libs/cxxsupp/libcxx/include/vector index 185d77671d..0050fc4f8c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/vector +++ b/contrib/libs/cxxsupp/libcxx/include/vector @@ -271,8 +271,8 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20 */ -#include <__config> #include <__bit_reference> +#include <__config> #include <__debug> #include <__functional_base> #include <__iterator/iterator_traits.h> diff --git a/contrib/libs/cxxsupp/libcxx/src/chrono.cpp b/contrib/libs/cxxsupp/libcxx/src/chrono.cpp index 5aa7af7589..4f2d51042f 100644 --- a/contrib/libs/cxxsupp/libcxx/src/chrono.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/chrono.cpp @@ -44,6 +44,10 @@ # endif #endif // defined(_LIBCPP_WIN32API) +#if defined(__Fuchsia__) +# include <zircon/syscalls.h> +#endif + #if __has_include(<mach/mach_time.h>) # include <mach/mach_time.h> #endif @@ -266,7 +270,18 @@ static steady_clock::time_point __libcpp_steady_clock_now() { return steady_clock::time_point(seconds(ts.tv_sec) + nanoseconds(ts.tv_nsec)); } -#elif defined(CLOCK_MONOTONIC) +# elif defined(__Fuchsia__) + +static steady_clock::time_point __libcpp_steady_clock_now() noexcept { + // Implicitly link against the vDSO system call ABI without + // requiring the final link to specify -lzircon explicitly when + // statically linking libc++. +# pragma comment(lib, "zircon") + + return steady_clock::time_point(nanoseconds(_zx_clock_get_monotonic())); +} + +# elif defined(CLOCK_MONOTONIC) static steady_clock::time_point __libcpp_steady_clock_now() { struct timespec tp; @@ -275,9 +290,9 @@ static steady_clock::time_point __libcpp_steady_clock_now() { return steady_clock::time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); } -#else -# error "Monotonic clock not implemented on this platform" -#endif +# else +# error "Monotonic clock not implemented on this platform" +# endif const bool steady_clock::is_steady; |