aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx
diff options
context:
space:
mode:
authorhalyavin <halyavin@yandex-team.com>2023-09-26 11:14:38 +0300
committerhalyavin <halyavin@yandex-team.com>2023-09-26 11:42:52 +0300
commit7fcf8b470c7f4b97acf6f2833afa770c1372f231 (patch)
treec7583ae7054d92eb5788c03760b6b9c50f7cc6c6 /contrib/libs/cxxsupp/libcxx
parent4c226ec97b09cd6fc38f8a0bbe57f52d384abe3f (diff)
downloadydb-7fcf8b470c7f4b97acf6f2833afa770c1372f231.tar.gz
Update libc++ to 9b03c08e (6 Mar 2022).
Notable changes: * don't warn that coroutines are not supported when using experimental/coroutine * add _LIBCPP_HIDE_FROM_ABI to __quoted_proxy constructors * ADL-proof calls of __quoted * fix ctype facet `is` method for Windows * change return type of bit_width to int (LWG3656) * make private __wrap_iter constructors explicit * fix delayed initialization of `__fill_` in basic_ios * ranges::iter_move cleanup * ADL-proof __synth_three_way * reject random number generators with signed types * use C++ overloads from math.h on AIX * add explicit to some internal constructors * replace _LIBCPP_HAS_NO_STRONG_ENUMS with C++ version check * use `inline constexpr bool` instead of `constexpr bool` for helpers in ranges * reject uniform_int_distribution<bool>, uniform_int_distribution<char> and all user types * allow std::mergeable and std::sortable even with incomplete ranges * fix double close bug in std::filesystem::remove_all * remove recursion in basic_string::insert because it interferes with constexpr * fix error checking of wctob_l calls * pack _Flags class on AIX * fix integer type in __estimate_column_width exposed by AIX * qualify all std::move calls with std * make chrono includes granular * set std::numeric_limits::tinyness_before to true on ARM * add ranges::in_found_result and ranges::min_max_result
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__bit_reference6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__config18
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__debug6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/file_time_type.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__hash_table24
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/istreambuf_iterator.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h38
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__locale5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h24
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__mutex_base5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/is_valid.h61
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__string20
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__threading_support3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/atomic1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/barrier4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/bit4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/deque2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/future9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/iomanip106
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/ios4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/math.h86
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/random1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/semaphore1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string83
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/system_error2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/thread1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/valarray26
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp18
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp4
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/locale.cpp4
61 files changed, 389 insertions, 283 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__bit_reference b/contrib/libs/cxxsupp/libcxx/include/__bit_reference
index 60e77868c2..79d836222e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__bit_reference
+++ b/contrib/libs/cxxsupp/libcxx/include/__bit_reference
@@ -88,7 +88,7 @@ public:
{return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
private:
_LIBCPP_INLINE_VISIBILITY
- __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
+ explicit __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
: __seg_(__s), __mask_(__m) {}
};
@@ -164,7 +164,7 @@ public:
private:
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR
- __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
+ explicit __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
: __seg_(__s), __mask_(__m) {}
__bit_const_reference& operator=(const __bit_const_reference&) = delete;
@@ -1250,7 +1250,7 @@ public:
private:
_LIBCPP_INLINE_VISIBILITY
- __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
+ explicit __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
: __seg_(__s), __ctz_(__ctz) {}
friend typename _Cp::__self;
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 f55edd4876..a5ee5eb6fb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__compare/synth_three_way.h
@@ -42,7 +42,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
};
template <class _Tp, class _Up = _Tp>
-using __synth_three_way_result = decltype(__synth_three_way(declval<_Tp&>(), declval<_Up&>()));
+using __synth_three_way_result = decltype(std::__synth_three_way(declval<_Tp&>(), declval<_Up&>()));
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__config b/contrib/libs/cxxsupp/libcxx/include/__config
index 83c45fbe43..3cb48bcfa0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__config
+++ b/contrib/libs/cxxsupp/libcxx/include/__config
@@ -514,10 +514,6 @@ typedef __char32_t char32_t;
# define _LIBCPP_NO_EXCEPTIONS
#endif
-#if !(__has_feature(cxx_strong_enums))
-#define _LIBCPP_HAS_NO_STRONG_ENUMS
-#endif
-
#if __has_feature(cxx_attributes)
# define _LIBCPP_NORETURN [[noreturn]]
#else
@@ -924,7 +920,7 @@ typedef unsigned int char32_t;
# define _LIBCPP_USING_IF_EXISTS
#endif
-#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
+#ifdef _LIBCPP_CXX03_LANG
# define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx
# define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \
__lx __v_; \
@@ -932,10 +928,10 @@ typedef unsigned int char32_t;
_LIBCPP_INLINE_VISIBILITY explicit x(int __v) : __v_(static_cast<__lx>(__v)) {} \
_LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} \
};
-#else // _LIBCPP_HAS_NO_STRONG_ENUMS
+#else // _LIBCPP_CXX03_LANG
# define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_ENUM_VIS x
# define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
-#endif // _LIBCPP_HAS_NO_STRONG_ENUMS
+#endif // _LIBCPP_CXX03_LANG
// _LIBCPP_DEBUG potential values:
// - undefined: No assertions. This is the default.
@@ -1546,6 +1542,14 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container(
# define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str)
#endif
+#if defined(_AIX) && !defined(_LIBCPP_COMPILER_GCC)
+# define _LIBCPP_PACKED_BYTE_FOR_AIX _Pragma("pack(1)")
+# define _LIBCPP_PACKED_BYTE_FOR_AIX_END _Pragma("pack(pop)")
+#else
+# define _LIBCPP_PACKED_BYTE_FOR_AIX /* empty */
+# define _LIBCPP_PACKED_BYTE_FOR_AIX_END /* empty */
+#endif
+
#endif // __cplusplus
#endif // _LIBCPP_CONFIG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__debug b/contrib/libs/cxxsupp/libcxx/include/__debug
index b7677a22c8..a4160b3b7f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__debug
+++ b/contrib/libs/cxxsupp/libcxx/include/__debug
@@ -66,7 +66,7 @@ struct _LIBCPP_TYPE_VIS __c_node
__c_node& operator=(const __c_node&) = delete;
_LIBCPP_INLINE_VISIBILITY
- __c_node(void* __c, __c_node* __next)
+ explicit __c_node(void* __c, __c_node* __next)
: __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {}
virtual ~__c_node();
@@ -83,7 +83,7 @@ template <class _Cont>
struct _C_node
: public __c_node
{
- _C_node(void* __c, __c_node* __n)
+ explicit _C_node(void* __c, __c_node* __n)
: __c_node(__c, __n) {}
virtual bool __dereferenceable(const void*) const;
@@ -141,7 +141,7 @@ class _LIBCPP_TYPE_VIS __libcpp_db
__i_node** __iend_;
size_t __isz_;
- __libcpp_db();
+ explicit __libcpp_db();
public:
__libcpp_db(const __libcpp_db&) = delete;
__libcpp_db& operator=(const __libcpp_db&) = delete;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
index a1f18add81..3db244556c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
@@ -11,6 +11,7 @@
#define _LIBCPP___FILESYSTEM_DIRECTORY_ENTRY_H
#include <__availability>
+#include <__chrono/time_point.h>
#include <__config>
#include <__errc>
#include <__filesystem/file_status.h>
@@ -21,7 +22,6 @@
#include <__filesystem/path.h>
#include <__filesystem/perms.h>
#include <__utility/unreachable.h>
-#include <chrono>
#include <cstdint>
#include <cstdlib>
#include <iosfwd>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/file_time_type.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/file_time_type.h
index 620b5ec8d3..7c4932e603 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/file_time_type.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/file_time_type.h
@@ -11,8 +11,9 @@
#define _LIBCPP___FILESYSTEM_FILE_TIME_TYPE_H
#include <__availability>
+#include <__chrono/file_clock.h>
+#include <__chrono/time_point.h>
#include <__config>
-#include <chrono>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h
index 894c501d4a..85c71f017f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h
@@ -11,6 +11,7 @@
#define _LIBCPP___FILESYSTEM_OPERATIONS_H
#include <__availability>
+#include <__chrono/time_point.h>
#include <__config>
#include <__filesystem/copy_options.h>
#include <__filesystem/file_status.h>
@@ -20,7 +21,6 @@
#include <__filesystem/perm_options.h>
#include <__filesystem/perms.h>
#include <__filesystem/space_info.h>
-#include <chrono>
#include <cstdint>
#include <system_error>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
index 6b4b1ae9ba..29bb1e94a8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
@@ -968,7 +968,7 @@ public:
_LIBCPP_INLINE_VISIBILITY friend basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, path& __p) {
basic_string<_CharT, _Traits> __tmp;
- __is >> __quoted(__tmp);
+ __is >> _VSTD::__quoted(__tmp);
__p = __tmp;
return __is;
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h b/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
index 57f4e46e56..92c8986e76 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/parser_std_format_spec.h
@@ -52,6 +52,7 @@ namespace __format_spec {
* * The format-type filtering needs to be done post parsing in the parser
* derived from @ref __parser_std.
*/
+_LIBCPP_PACKED_BYTE_FOR_AIX
class _LIBCPP_TYPE_VIS _Flags {
public:
enum class _LIBCPP_ENUM_VIS _Alignment : uint8_t {
@@ -109,6 +110,7 @@ public:
_Type __type{_Type::__default};
};
+_LIBCPP_PACKED_BYTE_FOR_AIX_END
namespace __detail {
template <class _CharT>
@@ -1271,7 +1273,7 @@ __estimate_column_width(const _CharT* __first, const _CharT* __last,
size_t __result = 0;
while (__first != __last) {
- wchar_t __c = *__first;
+ uint32_t __c = *__first;
__result += __column_width(__c);
if (__result > __maximum)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h b/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
index e8cf51981a..b89d595937 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/ranges_operations.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
namespace ranges {
@@ -91,7 +91,8 @@ struct greater_equal {
};
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+
+#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__hash_table b/contrib/libs/cxxsupp/libcxx/include/__hash_table
index e802dd2137..9cc656f4d6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__hash_table
+++ b/contrib/libs/cxxsupp/libcxx/include/__hash_table
@@ -369,14 +369,14 @@ public:
private:
#if _LIBCPP_DEBUG_LEVEL == 2
_LIBCPP_INLINE_VISIBILITY
- __hash_iterator(__next_pointer __node, const void* __c) _NOEXCEPT
+ explicit __hash_iterator(__next_pointer __node, const void* __c) _NOEXCEPT
: __node_(__node)
{
__get_db()->__insert_ic(this, __c);
}
#else
_LIBCPP_INLINE_VISIBILITY
- __hash_iterator(__next_pointer __node) _NOEXCEPT
+ explicit __hash_iterator(__next_pointer __node) _NOEXCEPT
: __node_(__node)
{}
#endif
@@ -487,14 +487,14 @@ public:
private:
#if _LIBCPP_DEBUG_LEVEL == 2
_LIBCPP_INLINE_VISIBILITY
- __hash_const_iterator(__next_pointer __node, const void* __c) _NOEXCEPT
+ explicit __hash_const_iterator(__next_pointer __node, const void* __c) _NOEXCEPT
: __node_(__node)
{
__get_db()->__insert_ic(this, __c);
}
#else
_LIBCPP_INLINE_VISIBILITY
- __hash_const_iterator(__next_pointer __node) _NOEXCEPT
+ explicit __hash_const_iterator(__next_pointer __node) _NOEXCEPT
: __node_(__node)
{}
#endif
@@ -600,8 +600,8 @@ public:
private:
#if _LIBCPP_DEBUG_LEVEL == 2
_LIBCPP_INLINE_VISIBILITY
- __hash_local_iterator(__next_pointer __node, size_t __bucket,
- size_t __bucket_count, const void* __c) _NOEXCEPT
+ explicit __hash_local_iterator(__next_pointer __node, size_t __bucket,
+ size_t __bucket_count, const void* __c) _NOEXCEPT
: __node_(__node),
__bucket_(__bucket),
__bucket_count_(__bucket_count)
@@ -612,8 +612,8 @@ private:
}
#else
_LIBCPP_INLINE_VISIBILITY
- __hash_local_iterator(__next_pointer __node, size_t __bucket,
- size_t __bucket_count) _NOEXCEPT
+ explicit __hash_local_iterator(__next_pointer __node, size_t __bucket,
+ size_t __bucket_count) _NOEXCEPT
: __node_(__node),
__bucket_(__bucket),
__bucket_count_(__bucket_count)
@@ -743,8 +743,8 @@ public:
private:
#if _LIBCPP_DEBUG_LEVEL == 2
_LIBCPP_INLINE_VISIBILITY
- __hash_const_local_iterator(__next_pointer __node_ptr, size_t __bucket,
- size_t __bucket_count, const void* __c) _NOEXCEPT
+ explicit __hash_const_local_iterator(__next_pointer __node_ptr, size_t __bucket,
+ size_t __bucket_count, const void* __c) _NOEXCEPT
: __node_(__node_ptr),
__bucket_(__bucket),
__bucket_count_(__bucket_count)
@@ -755,8 +755,8 @@ private:
}
#else
_LIBCPP_INLINE_VISIBILITY
- __hash_const_local_iterator(__next_pointer __node_ptr, size_t __bucket,
- size_t __bucket_count) _NOEXCEPT
+ explicit __hash_const_local_iterator(__next_pointer __node_ptr, size_t __bucket,
+ size_t __bucket_count) _NOEXCEPT
: __node_(__node_ptr),
__bucket_(__bucket),
__bucket_count_(__bucket_count)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
index 505e4f1f3f..abbd8f4038 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/common_iterator.h
@@ -42,7 +42,7 @@ class common_iterator {
iter_value_t<_Iter> __value;
// We can move __x because the only caller verifies that __x is not a reference.
- constexpr __proxy(iter_reference_t<_Iter>&& __x)
+ constexpr explicit __proxy(iter_reference_t<_Iter>&& __x)
: __value(_VSTD::move(__x)) {}
public:
@@ -55,7 +55,7 @@ class common_iterator {
friend common_iterator;
iter_value_t<_Iter> __value;
- constexpr __postfix_proxy(iter_reference_t<_Iter>&& __x)
+ constexpr explicit __postfix_proxy(iter_reference_t<_Iter>&& __x)
: __value(_VSTD::forward<iter_reference_t<_Iter>>(__x)) {}
public:
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/istreambuf_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/istreambuf_iterator.h
index 3b16f79476..bc53a6a1c8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/istreambuf_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/istreambuf_iterator.h
@@ -50,7 +50,8 @@ private:
{
char_type __keep_;
streambuf_type* __sbuf_;
- _LIBCPP_INLINE_VISIBILITY __proxy(char_type __c, streambuf_type* __s)
+ _LIBCPP_INLINE_VISIBILITY
+ explicit __proxy(char_type __c, streambuf_type* __s)
: __keep_(__c), __sbuf_(__s) {}
friend class istreambuf_iterator;
public:
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h
index 4a89662927..97d54c4a82 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/iter_move.h
@@ -10,11 +10,11 @@
#ifndef _LIBCPP___ITERATOR_ITER_MOVE_H
#define _LIBCPP___ITERATOR_ITER_MOVE_H
+#include <__concepts/class_or_enum.h>
#include <__config>
#include <__iterator/iterator_traits.h>
#include <__utility/forward.h>
#include <__utility/move.h>
-#include <concepts> // __class_or_enum
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -36,44 +36,32 @@ template <class _Tp>
concept __unqualified_iter_move =
__class_or_enum<remove_cvref_t<_Tp>> &&
requires (_Tp&& __t) {
- iter_move(_VSTD::forward<_Tp>(__t));
+ iter_move(std::forward<_Tp>(__t));
};
-// [iterator.cust.move]/1
-// The name ranges::iter_move denotes a customization point object.
-// The expression ranges::iter_move(E) for a subexpression E is
-// expression-equivalent to:
+// [iterator.cust.move]
+
struct __fn {
- // [iterator.cust.move]/1.1
- // iter_move(E), if E has class or enumeration type and iter_move(E) is a
- // well-formed expression when treated as an unevaluated operand, [...]
template<class _Ip>
- requires __class_or_enum<remove_cvref_t<_Ip>> && __unqualified_iter_move<_Ip>
+ requires __unqualified_iter_move<_Ip>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
- noexcept(noexcept(iter_move(_VSTD::forward<_Ip>(__i))))
+ noexcept(noexcept(iter_move(std::forward<_Ip>(__i))))
{
- return iter_move(_VSTD::forward<_Ip>(__i));
+ return iter_move(std::forward<_Ip>(__i));
}
- // [iterator.cust.move]/1.2
- // Otherwise, if the expression *E is well-formed:
- // 1.2.1 if *E is an lvalue, std::move(*E);
- // 1.2.2 otherwise, *E.
template<class _Ip>
- requires (!(__class_or_enum<remove_cvref_t<_Ip>> && __unqualified_iter_move<_Ip>)) &&
- requires(_Ip&& __i) { *_VSTD::forward<_Ip>(__i); }
+ requires (!__unqualified_iter_move<_Ip>) &&
+ requires { *declval<_Ip>(); }
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
- noexcept(noexcept(*_VSTD::forward<_Ip>(__i)))
+ noexcept(noexcept(*std::forward<_Ip>(__i)))
{
- if constexpr (is_lvalue_reference_v<decltype(*_VSTD::forward<_Ip>(__i))>) {
- return _VSTD::move(*_VSTD::forward<_Ip>(__i));
+ if constexpr (is_lvalue_reference_v<decltype(*declval<_Ip>())>) {
+ return std::move(*std::forward<_Ip>(__i));
} else {
- return *_VSTD::forward<_Ip>(__i);
+ return *std::forward<_Ip>(__i);
}
}
-
- // [iterator.cust.move]/1.3
- // Otherwise, ranges::iter_move(E) is ill-formed.
};
} // namespace __iter_move
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
index 6ffb2ab806..e7d25fc7df 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/iterator_traits.h
@@ -198,7 +198,7 @@ concept __cpp17_random_access_iterator =
{ __i + __n } -> same_as<_Ip>;
{ __n + __i } -> same_as<_Ip>;
{ __i - __n } -> same_as<_Ip>;
- { __i - __i } -> same_as<decltype(__n)>;
+ { __i - __i } -> same_as<decltype(__n)>; // NOLINT(misc-redundant-expression) ; This is llvm.org/PR54114
{ __i[__n] } -> convertible_to<iter_reference_t<_Ip>>;
};
} // namespace __iterator_traits_detail
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h
index 08022aab6d..13db6c7f0b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/mergeable.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
template <class _Input1, class _Input2, class _Output,
class _Comp = ranges::less, class _Proj1 = identity, class _Proj2 = identity>
@@ -34,7 +34,7 @@ concept mergeable =
indirectly_copyable<_Input2, _Output> &&
indirect_strict_weak_order<_Comp, projected<_Input1, _Proj1>, projected<_Input2, _Proj2>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h
index 77a553d3ec..057e1549df 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/sortable.h
@@ -23,14 +23,14 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
template <class _Iter, class _Comp = ranges::less, class _Proj = identity>
concept sortable =
permutable<_Iter> &&
indirect_strict_weak_order<_Comp, projected<_Iter, _Proj>>;
-#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h
index d91a25ee6c..69e5ee15aa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/wrap_iter.h
@@ -136,13 +136,15 @@ public:
private:
#if _LIBCPP_DEBUG_LEVEL == 2
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter(const void* __p, iterator_type __x) : __i(__x)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ explicit __wrap_iter(const void* __p, iterator_type __x) : __i(__x)
{
if (!__libcpp_is_constant_evaluated())
__get_db()->__insert_ic(this, __p);
}
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ explicit __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
#endif
template <class _Up> friend class __wrap_iter;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__locale b/contrib/libs/cxxsupp/libcxx/include/__locale
index 323ed3e212..38b282bf83 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__locale
+++ b/contrib/libs/cxxsupp/libcxx/include/__locale
@@ -22,15 +22,15 @@
#include <utility>
#if defined(_LIBCPP_MSVCRT_LIKE)
-# include <cstring>
# include <__support/win32/locale_win32.h>
+# include <cstring>
#elif defined(_AIX) || defined(__MVS__)
# include <__support/ibm/xlocale.h>
#elif defined(__ANDROID__)
# include <__support/android/locale_bionic.h>
#elif defined(__sun__)
-# include <xlocale.h>
# include <__support/solaris/xlocale.h>
+# include <xlocale.h>
#elif defined(_NEWLIB_VERSION)
# include <__support/newlib/xlocale.h>
#elif defined(__OpenBSD__)
@@ -460,6 +460,7 @@ public:
static const mask blank = _BLANK;
static const mask __regex_word = 0x4000; // 0x8000 and 0x0100 and 0x00ff are used
# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
+# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
# ifdef __APPLE__
typedef __uint32_t mask;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h b/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
index 852031f17d..89e5820e99 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
@@ -32,17 +32,17 @@ struct __compressed_pair_elem {
using reference = _Tp&;
using const_reference = const _Tp&;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem(__default_init_tag) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem(__value_init_tag) : __value_() {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_() {}
template <class _Up, class = __enable_if_t<!is_same<__compressed_pair_elem, typename decay<_Up>::type>::value> >
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit
- __compressed_pair_elem(_Up&& __u) : __value_(std::forward<_Up>(__u)) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+ explicit __compressed_pair_elem(_Up&& __u) : __value_(std::forward<_Up>(__u)) {}
#ifndef _LIBCPP_CXX03_LANG
template <class... _Args, size_t... _Indices>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
- __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>)
+ explicit __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>)
: __value_(std::forward<_Args>(std::get<_Indices>(__args))...) {}
#endif
@@ -60,9 +60,9 @@ struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
using const_reference = const _Tp&;
using __value_type = _Tp;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem() = default;
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem(__default_init_tag) {}
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem(__value_init_tag) : __value_type() {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem() = default;
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_type() {}
template <class _Up, class = __enable_if_t<!is_same<__compressed_pair_elem, typename decay<_Up>::type>::value> >
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
@@ -101,17 +101,17 @@ public:
>
>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
- __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}
+ explicit __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}
template <class _U1, class _U2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
- __compressed_pair(_U1&& __t1, _U2&& __t2) : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {}
+ explicit __compressed_pair(_U1&& __t1, _U2&& __t2) : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {}
#ifndef _LIBCPP_CXX03_LANG
template <class... _Args1, class... _Args2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
- __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
- tuple<_Args2...> __second_args)
+ explicit __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
+ tuple<_Args2...> __second_args)
: _Base1(__pc, std::move(__first_args), typename __make_tuple_indices<sizeof...(_Args1)>::type()),
_Base2(__pc, std::move(__second_args), typename __make_tuple_indices<sizeof...(_Args2)>::type()) {}
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/__mutex_base b/contrib/libs/cxxsupp/libcxx/include/__mutex_base
index 78eda0882c..da056b6d14 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__mutex_base
+++ b/contrib/libs/cxxsupp/libcxx/include/__mutex_base
@@ -10,9 +10,12 @@
#ifndef _LIBCPP___MUTEX_BASE
#define _LIBCPP___MUTEX_BASE
+#include <__chrono/duration.h>
+#include <__chrono/steady_clock.h>
+#include <__chrono/system_clock.h>
+#include <__chrono/time_point.h>
#include <__config>
#include <__threading_support>
-#include <chrono>
#include <ratio>
#include <system_error>
#include <time.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h
index cf019519ab..e97d53f5a4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/bernoulli_distribution.h
@@ -10,6 +10,7 @@
#define _LIBCPP___RANDOM_BERNOULLI_DISTRIBUTION_H
#include <__config>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <iosfwd>
@@ -103,6 +104,7 @@ inline
bernoulli_distribution::result_type
bernoulli_distribution::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
uniform_real_distribution<double> __gen;
return __gen(__g) < __p.p();
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h
index 77df98cba0..d0e8f30349 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/binomial_distribution.h
@@ -10,6 +10,7 @@
#define _LIBCPP___RANDOM_BINOMIAL_DISTRIBUTION_H
#include <__config>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <cmath>
#include <iosfwd>
@@ -26,6 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _IntType = int>
class _LIBCPP_TEMPLATE_VIS binomial_distribution
{
+ static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be an integer type larger than char");
public:
// types
typedef _IntType result_type;
@@ -146,6 +148,7 @@ template<class _URNG>
_IntType
binomial_distribution<_IntType>::operator()(_URNG& __g, const param_type& __pr)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
if (__pr.__t_ == 0 || __pr.__p_ == 0)
return 0;
if (__pr.__p_ == 1)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h
index 288118e1d2..5bc44ee8dd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/cauchy_distribution.h
@@ -10,6 +10,7 @@
#define _LIBCPP___RANDOM_CAUCHY_DISTRIBUTION_H
#include <__config>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <cmath>
#include <iosfwd>
@@ -116,6 +117,7 @@ inline
_RealType
cauchy_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
uniform_real_distribution<result_type> __gen;
// purposefully let tan arg get as close to pi/2 as it wants, tan will return a finite
return __p.a() + __p.b() * _VSTD::tan(3.1415926535897932384626433832795 * __gen(__g));
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h
index fc19068eb0..d899e72d87 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/discrete_distribution.h
@@ -11,6 +11,7 @@
#include <__algorithm/upper_bound.h>
#include <__config>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <cstddef>
#include <iosfwd>
@@ -29,6 +30,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _IntType = int>
class _LIBCPP_TEMPLATE_VIS discrete_distribution
{
+ static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be an integer type larger than char");
public:
// types
typedef _IntType result_type;
@@ -211,6 +213,7 @@ template<class _URNG>
_IntType
discrete_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
uniform_real_distribution<double> __gen;
return static_cast<_IntType>(
_VSTD::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) -
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h
index e51871dd53..1c9e9e0d9e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/exponential_distribution.h
@@ -11,6 +11,7 @@
#include <__config>
#include <__random/generate_canonical.h>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <cmath>
#include <iosfwd>
@@ -109,6 +110,7 @@ template<class _URNG>
_RealType
exponential_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
return -_VSTD::log
(
result_type(1) -
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h
index 15cebd8e95..ba30aa5b88 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/extreme_value_distribution.h
@@ -10,6 +10,7 @@
#define _LIBCPP___RANDOM_EXTREME_VALUE_DISTRIBUTION_H
#include <__config>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <cmath>
#include <iosfwd>
@@ -116,6 +117,7 @@ template<class _URNG>
_RealType
extreme_value_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
return __p.a() - __p.b() *
_VSTD::log(-_VSTD::log(1-uniform_real_distribution<result_type>()(__g)));
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h
index 72f1f40aaa..60c7f28c0b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/fisher_f_distribution.h
@@ -11,6 +11,7 @@
#include <__config>
#include <__random/gamma_distribution.h>
+#include <__random/is_valid.h>
#include <iosfwd>
#include <limits>
@@ -114,6 +115,7 @@ template<class _URNG>
_RealType
fisher_f_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
gamma_distribution<result_type> __gdm(__p.m() * result_type(.5));
gamma_distribution<result_type> __gdn(__p.n() * result_type(.5));
return __p.n() * __gdm(__g) / (__p.m() * __gdn(__g));
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h
index a8504961b2..986d79b67a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/gamma_distribution.h
@@ -11,6 +11,7 @@
#include <__config>
#include <__random/exponential_distribution.h>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <cmath>
#include <iosfwd>
@@ -117,6 +118,7 @@ template<class _URNG>
_RealType
gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
result_type __a = __p.alpha();
uniform_real_distribution<result_type> __gen(0, 1);
exponential_distribution<result_type> __egen;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h
index b9cc151b34..8e1be522e0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/geometric_distribution.h
@@ -10,6 +10,7 @@
#define _LIBCPP___RANDOM_GEOMETRIC_DISTRIBUTION_H
#include <__config>
+#include <__random/is_valid.h>
#include <__random/negative_binomial_distribution.h>
#include <iosfwd>
#include <limits>
@@ -26,6 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _IntType = int>
class _LIBCPP_TEMPLATE_VIS geometric_distribution
{
+ static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be an integer type larger than char");
public:
// types
typedef _IntType result_type;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/is_valid.h b/contrib/libs/cxxsupp/libcxx/include/__random/is_valid.h
new file mode 100644
index 0000000000..be3b61b8dc
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/is_valid.h
@@ -0,0 +1,61 @@
+//===----------------------------------------------------------------------===//
+//
+// 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___RANDOM_IS_VALID_H
+#define _LIBCPP___RANDOM_IS_VALID_H
+
+#include <__config>
+#include <cstdint>
+#include <type_traits>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+// [rand.req.genl]/1.5:
+// The effect of instantiating a template that has a template type parameter
+// named IntType is undefined unless the corresponding template argument is
+// cv-unqualified and is one of short, int, long, long long, unsigned short,
+// unsigned int, unsigned long, or unsigned long long.
+
+template<class> struct __libcpp_random_is_valid_inttype : false_type {};
+template<> struct __libcpp_random_is_valid_inttype<int8_t> : true_type {}; // extension
+template<> struct __libcpp_random_is_valid_inttype<short> : true_type {};
+template<> struct __libcpp_random_is_valid_inttype<int> : true_type {};
+template<> struct __libcpp_random_is_valid_inttype<long> : true_type {};
+template<> struct __libcpp_random_is_valid_inttype<long long> : true_type {};
+template<> struct __libcpp_random_is_valid_inttype<uint8_t> : true_type {}; // extension
+template<> struct __libcpp_random_is_valid_inttype<unsigned short> : true_type {};
+template<> struct __libcpp_random_is_valid_inttype<unsigned int> : true_type {};
+template<> struct __libcpp_random_is_valid_inttype<unsigned long> : true_type {};
+template<> struct __libcpp_random_is_valid_inttype<unsigned long long> : true_type {};
+
+#ifndef _LIBCPP_HAS_NO_INT128
+template<> struct __libcpp_random_is_valid_inttype<__int128_t> : true_type {}; // extension
+template<> struct __libcpp_random_is_valid_inttype<__uint128_t> : true_type {}; // extension
+#endif // _LIBCPP_HAS_NO_INT128
+
+// [rand.req.urng]/3:
+// A class G meets the uniform random bit generator requirements if G models
+// uniform_random_bit_generator, invoke_result_t<G&> is an unsigned integer type,
+// and G provides a nested typedef-name result_type that denotes the same type
+// as invoke_result_t<G&>.
+// (In particular, reject URNGs with signed result_types; our distributions cannot
+// handle such generator types.)
+
+template<class, class = void> struct __libcpp_random_is_valid_urng : false_type {};
+template<class _Gp> struct __libcpp_random_is_valid_urng<_Gp, __enable_if_t<
+ is_unsigned<typename _Gp::result_type>::value &&
+ _IsSame<decltype(declval<_Gp&>()()), typename _Gp::result_type>::value
+> > : true_type {};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___RANDOM_IS_VALID_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h
index 01e9c303a7..72ce88ea74 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/negative_binomial_distribution.h
@@ -12,6 +12,7 @@
#include <__config>
#include <__random/bernoulli_distribution.h>
#include <__random/gamma_distribution.h>
+#include <__random/is_valid.h>
#include <__random/poisson_distribution.h>
#include <iosfwd>
#include <limits>
@@ -28,6 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _IntType = int>
class _LIBCPP_TEMPLATE_VIS negative_binomial_distribution
{
+ static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be an integer type larger than char");
public:
// types
typedef _IntType result_type;
@@ -116,6 +118,7 @@ template<class _URNG>
_IntType
negative_binomial_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
result_type __k = __pr.k();
double __p = __pr.p();
if (__k <= 21 * __p)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h
index dc4de78e92..0431df9272 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/normal_distribution.h
@@ -10,6 +10,7 @@
#define _LIBCPP___RANDOM_NORMAL_DISTRIBUTION_H
#include <__config>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <cmath>
#include <iosfwd>
@@ -131,6 +132,7 @@ template<class _URNG>
_RealType
normal_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
result_type _Up;
if (_V_hot_)
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h
index eec9b7540a..a33ab07200 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_constant_distribution.h
@@ -11,6 +11,7 @@
#include <__algorithm/upper_bound.h>
#include <__config>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <iosfwd>
#include <numeric>
@@ -284,6 +285,7 @@ template<class _URNG>
_RealType
piecewise_constant_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
typedef uniform_real_distribution<result_type> _Gen;
result_type __u = _Gen()(__g);
ptrdiff_t __k = _VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h
index 0d7591af10..e69ce94440 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/piecewise_linear_distribution.h
@@ -11,6 +11,7 @@
#include <__algorithm/upper_bound.h>
#include <__config>
+#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <iosfwd>
#include <numeric>
@@ -289,6 +290,7 @@ template<class _URNG>
_RealType
piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
typedef uniform_real_distribution<result_type> _Gen;
result_type __u = _Gen()(__g);
ptrdiff_t __k = _VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h
index c54d783b7c..7730923ad6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/poisson_distribution.h
@@ -12,6 +12,7 @@
#include <__config>
#include <__random/clamp_to_integral.h>
#include <__random/exponential_distribution.h>
+#include <__random/is_valid.h>
#include <__random/normal_distribution.h>
#include <__random/uniform_real_distribution.h>
#include <cmath>
@@ -30,6 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template<class _IntType = int>
class _LIBCPP_TEMPLATE_VIS poisson_distribution
{
+ static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be an integer type larger than char");
public:
// types
typedef _IntType result_type;
@@ -157,6 +159,7 @@ template<class _URNG>
_IntType
poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
double __tx;
uniform_real_distribution<double> __urd;
if (__pr.__mean_ < 10)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h
index dc38a8b3d2..9e95f97cef 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/student_t_distribution.h
@@ -11,6 +11,7 @@
#include <__config>
#include <__random/gamma_distribution.h>
+#include <__random/is_valid.h>
#include <__random/normal_distribution.h>
#include <cmath>
#include <iosfwd>
@@ -111,6 +112,7 @@ template<class _URNG>
_RealType
student_t_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
gamma_distribution<result_type> __gd(__p.n() * .5, 2);
return __nd_(__g) * _VSTD::sqrt(__p.n()/__gd(__g));
}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h
index 4e961f0c8a..dd0a7e4e49 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_int_distribution.h
@@ -11,6 +11,7 @@
#include <__bits>
#include <__config>
+#include <__random/is_valid.h>
#include <__random/log2.h>
#include <bit>
#include <cstddef>
@@ -155,9 +156,10 @@ __independent_bits_engine<_Engine, _UIntType>::__eval(true_type)
return _Sp;
}
-template<class _IntType = int> // __int128_t is also supported as an extension here
+template<class _IntType = int>
class uniform_int_distribution
{
+ static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be an integer type larger than char");
public:
// types
typedef _IntType result_type;
@@ -230,6 +232,7 @@ typename uniform_int_distribution<_IntType>::result_type
uniform_int_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
typedef typename conditional<sizeof(result_type) <= sizeof(uint32_t), uint32_t,
typename make_unsigned<result_type>::type>::type _UIntType;
const _UIntType _Rp = _UIntType(__p.b()) - _UIntType(__p.a()) + _UIntType(1);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h
index e11222540b..7d2ecda732 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__random/uniform_real_distribution.h
@@ -11,6 +11,7 @@
#include <__config>
#include <__random/generate_canonical.h>
+#include <__random/is_valid.h>
#include <iosfwd>
#include <limits>
#include <type_traits>
@@ -115,6 +116,7 @@ inline
typename uniform_real_distribution<_RealType>::result_type
uniform_real_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
{
+ static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
return (__p.b() - __p.a())
* _VSTD::generate_canonical<_RealType, numeric_limits<_RealType>::digits>(__g)
+ __p.a();
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
index c3ab6261f0..b5de7e9e32 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/reverse_view.h
@@ -111,22 +111,22 @@ namespace ranges {
namespace views {
namespace __reverse {
template<class _Tp>
- constexpr bool __is_reverse_view = false;
+ inline constexpr bool __is_reverse_view = false;
template<class _Tp>
- constexpr bool __is_reverse_view<reverse_view<_Tp>> = true;
+ inline constexpr bool __is_reverse_view<reverse_view<_Tp>> = true;
template<class _Tp>
- constexpr bool __is_sized_reverse_subrange = false;
+ inline constexpr bool __is_sized_reverse_subrange = false;
template<class _Iter>
- constexpr bool __is_sized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, subrange_kind::sized>> = true;
+ inline constexpr bool __is_sized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, subrange_kind::sized>> = true;
template<class _Tp>
- constexpr bool __is_unsized_reverse_subrange = false;
+ inline constexpr bool __is_unsized_reverse_subrange = false;
template<class _Iter, subrange_kind _Kind>
- constexpr bool __is_unsized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, _Kind>> = _Kind == subrange_kind::unsized;
+ inline constexpr bool __is_unsized_reverse_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, _Kind>> = _Kind == subrange_kind::unsized;
template<class _Tp>
struct __unwrapped_reverse_subrange {
diff --git a/contrib/libs/cxxsupp/libcxx/include/__string b/contrib/libs/cxxsupp/libcxx/include/__string
index 57ac5379ed..7192aaccba 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__string
+++ b/contrib/libs/cxxsupp/libcxx/include/__string
@@ -693,7 +693,7 @@ char_traits<char8_t>::find(const char_type* __s, size_t __n, const char_type& __
return nullptr;
}
-#endif // #_LIBCPP_HAS_NO_CHAR8_T
+#endif // _LIBCPP_HAS_NO_CHAR8_T
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
@@ -1169,17 +1169,17 @@ size_t __do_string_hash(_Ptr __p, _Ptr __e)
return __murmur2_or_cityhash<size_t>()(__p, (__e-__p)*sizeof(value_type));
}
-template <class _CharT, class _Iter, class _Traits=char_traits<_CharT> >
+template <class _CharT, class _Iter, class _Traits = char_traits<_CharT> >
struct __quoted_output_proxy
{
- _Iter __first;
- _Iter __last;
- _CharT __delim;
- _CharT __escape;
-
- __quoted_output_proxy(_Iter __f, _Iter __l, _CharT __d, _CharT __e)
- : __first(__f), __last(__l), __delim(__d), __escape(__e) {}
- // This would be a nice place for a string_ref
+ _Iter __first_;
+ _Iter __last_;
+ _CharT __delim_;
+ _CharT __escape_;
+
+ _LIBCPP_HIDE_FROM_ABI
+ explicit __quoted_output_proxy(_Iter __f, _Iter __l, _CharT __d, _CharT __e)
+ : __first_(__f), __last_(__l), __delim_(__d), __escape_(__e) {}
};
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h b/contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h
index 9b084b3302..0bbafd1866 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__thread/poll_with_backoff.h
@@ -10,8 +10,12 @@
#define _LIBCPP___THREAD_POLL_WITH_BACKOFF_H
#include <__availability>
+#include <__chrono/duration.h>
+#include <__chrono/high_resolution_clock.h>
+#include <__chrono/steady_clock.h>
+#include <__chrono/time_point.h>
#include <__config>
-#include <chrono>
+#include <__filesystem/file_time_type.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h b/contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h
index 58c2390baf..28fe75d6fd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__thread/timed_backoff_policy.h
@@ -13,8 +13,8 @@
#ifndef _LIBCPP_HAS_NO_THREADS
-#include <__threading_support>
-#include <chrono>
+# include <__chrono/duration.h>
+# include <__threading_support>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__threading_support b/contrib/libs/cxxsupp/libcxx/include/__threading_support
index 8320557b1c..2c3f1bf9d0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__threading_support
+++ b/contrib/libs/cxxsupp/libcxx/include/__threading_support
@@ -11,9 +11,10 @@
#define _LIBCPP_THREADING_SUPPORT
#include <__availability>
+#include <__chrono/convert_to_timespec.h>
+#include <__chrono/duration.h>
#include <__config>
#include <__thread/poll_with_backoff.h>
-#include <chrono>
#include <errno.h>
#include <iosfwd>
#include <limits>
diff --git a/contrib/libs/cxxsupp/libcxx/include/atomic b/contrib/libs/cxxsupp/libcxx/include/atomic
index 09e3dd3bb0..382e9df366 100644
--- a/contrib/libs/cxxsupp/libcxx/include/atomic
+++ b/contrib/libs/cxxsupp/libcxx/include/atomic
@@ -519,6 +519,7 @@ template <class T>
*/
#include <__availability>
+#include <__chrono/duration.h>
#include <__config>
#include <__thread/poll_with_backoff.h>
#include <__thread/timed_backoff_policy.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/barrier b/contrib/libs/cxxsupp/libcxx/include/barrier
index b0975a5519..52cd129596 100644
--- a/contrib/libs/cxxsupp/libcxx/include/barrier
+++ b/contrib/libs/cxxsupp/libcxx/include/barrier
@@ -126,7 +126,7 @@ public:
__barrier_base(ptrdiff_t __expected, _CompletionF __completion = _CompletionF())
: __expected(__expected), __base(__construct_barrier_algorithm_base(this->__expected),
&__destroy_barrier_algorithm_base),
- __expected_adjustment(0), __completion(move(__completion)), __phase(0)
+ __expected_adjustment(0), __completion(std::move(__completion)), __phase(0)
{
}
[[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
@@ -190,7 +190,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
__barrier_base(ptrdiff_t __expected, _CompletionF __completion = _CompletionF())
- : __expected(__expected), __arrived(__expected), __completion(move(__completion)), __phase(false)
+ : __expected(__expected), __arrived(__expected), __completion(std::move(__completion)), __phase(false)
{
}
[[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
diff --git a/contrib/libs/cxxsupp/libcxx/include/bit b/contrib/libs/cxxsupp/libcxx/include/bit
index 7f9318ecde..aaefd8a362 100644
--- a/contrib/libs/cxxsupp/libcxx/include/bit
+++ b/contrib/libs/cxxsupp/libcxx/include/bit
@@ -30,7 +30,7 @@ namespace std {
template <class T>
constexpr T bit_floor(T x) noexcept; // C++20
template <class T>
- constexpr T bit_width(T x) noexcept; // C++20
+ constexpr int bit_width(T x) noexcept; // C++20
// [bit.rotate], rotating
template<class T>
@@ -322,7 +322,7 @@ bit_ceil(_Tp __t) noexcept
template <class _Tp>
_LIBCPP_INLINE_VISIBILITY constexpr
-enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp>
+enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int>
bit_width(_Tp __t) noexcept
{
return __t == 0 ? 0 : __bit_log2(__t) + 1;
diff --git a/contrib/libs/cxxsupp/libcxx/include/deque b/contrib/libs/cxxsupp/libcxx/include/deque
index a4ab230742..4b7058f1eb 100644
--- a/contrib/libs/cxxsupp/libcxx/include/deque
+++ b/contrib/libs/cxxsupp/libcxx/include/deque
@@ -452,7 +452,7 @@ public:
{return !(__x < __y);}
private:
- _LIBCPP_INLINE_VISIBILITY __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT
+ _LIBCPP_INLINE_VISIBILITY explicit __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT
: __m_iter_(__m), __ptr_(__p) {}
template <class _Tp, class _Ap> friend class __deque_base;
diff --git a/contrib/libs/cxxsupp/libcxx/include/future b/contrib/libs/cxxsupp/libcxx/include/future
index 15685dfb22..a4c8ccc6d6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/future
+++ b/contrib/libs/cxxsupp/libcxx/include/future
@@ -363,12 +363,13 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
#include <__assert>
#include <__availability>
+#include <__chrono/duration.h>
+#include <__chrono/time_point.h>
#include <__config>
#include <__memory/allocator_arg_t.h>
#include <__memory/uses_allocator.h>
#include <__utility/auto_cast.h>
#include <__utility/forward.h>
-#include <chrono>
#include <exception>
#include <memory>
#include <mutex>
@@ -399,7 +400,7 @@ _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_errc)
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<future_errc> : public true_type {};
-#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
+#ifdef _LIBCPP_CXX03_LANG
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<future_errc::__lx> : public true_type { };
#endif
@@ -413,7 +414,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(launch)
};
_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(launch)
-#ifndef _LIBCPP_HAS_NO_STRONG_ENUMS
+#ifndef _LIBCPP_CXX03_LANG
typedef underlying_type<launch>::type __launch_underlying_type;
@@ -473,7 +474,7 @@ operator^=(launch& __x, launch __y)
__x = __x ^ __y; return __x;
}
-#endif // !_LIBCPP_HAS_NO_STRONG_ENUMS
+#endif // !_LIBCPP_CXX03_LANG
//enum class future_status
_LIBCPP_DECLARE_STRONG_ENUM(future_status)
diff --git a/contrib/libs/cxxsupp/libcxx/include/iomanip b/contrib/libs/cxxsupp/libcxx/include/iomanip
index 3d7915410f..f34c718b09 100644
--- a/contrib/libs/cxxsupp/libcxx/include/iomanip
+++ b/contrib/libs/cxxsupp/libcxx/include/iomanip
@@ -514,15 +514,14 @@ put_time(const tm* __tm, const _CharT* __fmt)
}
template <class _CharT, class _Traits, class _ForwardIterator>
-basic_ostream<_CharT, _Traits> &
-__quoted_output ( basic_ostream<_CharT, _Traits> &__os,
- _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape )
+basic_ostream<_CharT, _Traits>&
+__quoted_output(basic_ostream<_CharT, _Traits>& __os,
+ _ForwardIterator __first, _ForwardIterator __last, _CharT __delim, _CharT __escape)
{
basic_string<_CharT, _Traits> __str;
__str.push_back(__delim);
- for ( ; __first != __last; ++ __first )
- {
- if (_Traits::eq (*__first, __escape) || _Traits::eq (*__first, __delim))
+ for (; __first != __last; ++__first) {
+ if (_Traits::eq(*__first, __escape) || _Traits::eq(*__first, __delim))
__str.push_back(__escape);
__str.push_back(*__first);
}
@@ -531,69 +530,66 @@ __quoted_output ( basic_ostream<_CharT, _Traits> &__os,
}
template <class _CharT, class _Traits, class _String>
-basic_istream<_CharT, _Traits> &
-__quoted_input ( basic_istream<_CharT, _Traits> &__is, _String & __string, _CharT __delim, _CharT __escape )
+basic_istream<_CharT, _Traits>&
+__quoted_input(basic_istream<_CharT, _Traits>& __is, _String& __string, _CharT __delim, _CharT __escape)
{
- __string.clear ();
+ __string.clear();
_CharT __c;
__is >> __c;
- if ( __is.fail ())
+ if (__is.fail())
return __is;
- if (!_Traits::eq (__c, __delim)) // no delimiter, read the whole string
- {
- __is.unget ();
+ if (!_Traits::eq(__c, __delim)) {
+ // no delimiter, read the whole string
+ __is.unget();
__is >> __string;
return __is;
}
__save_flags<_CharT, _Traits> sf(__is);
- noskipws (__is);
- while (true)
- {
+ std::noskipws(__is);
+ while (true) {
__is >> __c;
- if ( __is.fail ())
+ if (__is.fail())
break;
- if (_Traits::eq (__c, __escape))
- {
+ if (_Traits::eq(__c, __escape)) {
__is >> __c;
- if ( __is.fail ())
+ if (__is.fail())
break;
- }
- else if (_Traits::eq (__c, __delim))
+ } else if (_Traits::eq(__c, __delim))
break;
- __string.push_back ( __c );
- }
+ __string.push_back(__c);
+ }
return __is;
}
-
template <class _CharT, class _Traits, class _Iter>
basic_ostream<_CharT, _Traits>& operator<<(
basic_ostream<_CharT, _Traits>& __os,
- const __quoted_output_proxy<_CharT, _Iter, _Traits> & __proxy)
+ const __quoted_output_proxy<_CharT, _Iter, _Traits>& __proxy)
{
- return __quoted_output (__os, __proxy.__first, __proxy.__last, __proxy.__delim, __proxy.__escape);
+ return std::__quoted_output(__os, __proxy.__first_, __proxy.__last_, __proxy.__delim_, __proxy.__escape_);
}
template <class _CharT, class _Traits, class _Allocator>
struct __quoted_proxy
{
- basic_string<_CharT, _Traits, _Allocator> &__string;
- _CharT __delim;
- _CharT __escape;
+ basic_string<_CharT, _Traits, _Allocator>& __string_;
+ _CharT __delim_;
+ _CharT __escape_;
- __quoted_proxy(basic_string<_CharT, _Traits, _Allocator> &__s, _CharT __d, _CharT __e)
- : __string(__s), __delim(__d), __escape(__e) {}
+ _LIBCPP_HIDE_FROM_ABI
+ explicit __quoted_proxy(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __d, _CharT __e)
+ : __string_(__s), __delim_(__d), __escape_(__e) {}
};
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY
basic_ostream<_CharT, _Traits>& operator<<(
basic_ostream<_CharT, _Traits>& __os,
- const __quoted_proxy<_CharT, _Traits, _Allocator> & __proxy)
+ const __quoted_proxy<_CharT, _Traits, _Allocator>& __proxy)
{
- return __quoted_output (__os, __proxy.__string.cbegin (), __proxy.__string.cend (), __proxy.__delim, __proxy.__escape);
+ return std::__quoted_output(__os, __proxy.__string_.cbegin(), __proxy.__string_.cend(), __proxy.__delim_, __proxy.__escape_);
}
// extractor for non-const basic_string& proxies
@@ -601,69 +597,63 @@ template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY
basic_istream<_CharT, _Traits>& operator>>(
basic_istream<_CharT, _Traits>& __is,
- const __quoted_proxy<_CharT, _Traits, _Allocator> & __proxy)
+ const __quoted_proxy<_CharT, _Traits, _Allocator>& __proxy)
{
- return __quoted_input ( __is, __proxy.__string, __proxy.__delim, __proxy.__escape );
+ return std::__quoted_input(__is, __proxy.__string_, __proxy.__delim_, __proxy.__escape_);
}
-
template <class _CharT>
_LIBCPP_INLINE_VISIBILITY
__quoted_output_proxy<_CharT, const _CharT *>
-quoted ( const _CharT *__s, _CharT __delim = _CharT('"'), _CharT __escape =_CharT('\\'))
+quoted(const _CharT *__s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
const _CharT *__end = __s;
- while ( *__end ) ++__end;
- return __quoted_output_proxy<_CharT, const _CharT *> ( __s, __end, __delim, __escape );
+ while (*__end) ++__end;
+ return __quoted_output_proxy<_CharT, const _CharT *>(__s, __end, __delim, __escape);
}
-
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY
__quoted_output_proxy<_CharT, typename basic_string <_CharT, _Traits, _Allocator>::const_iterator>
-__quoted ( const basic_string <_CharT, _Traits, _Allocator> &__s, _CharT __delim = _CharT('"'), _CharT __escape=_CharT('\\'))
+__quoted(const basic_string <_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return __quoted_output_proxy<_CharT,
- typename basic_string <_CharT, _Traits, _Allocator>::const_iterator>
- ( __s.cbegin(), __s.cend (), __delim, __escape );
+ return __quoted_output_proxy<_CharT, typename basic_string<_CharT, _Traits, _Allocator>::const_iterator>(__s.cbegin(), __s.cend(), __delim, __escape);
}
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY
__quoted_proxy<_CharT, _Traits, _Allocator>
-__quoted ( basic_string <_CharT, _Traits, _Allocator> &__s, _CharT __delim = _CharT('"'), _CharT __escape=_CharT('\\'))
+__quoted(basic_string <_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return __quoted_proxy<_CharT, _Traits, _Allocator>( __s, __delim, __escape );
+ return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
}
-
#if _LIBCPP_STD_VER > 11
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY
-__quoted_output_proxy<_CharT, typename basic_string <_CharT, _Traits, _Allocator>::const_iterator>
-quoted ( const basic_string <_CharT, _Traits, _Allocator> &__s, _CharT __delim = _CharT('"'), _CharT __escape=_CharT('\\'))
+__quoted_output_proxy<_CharT, typename basic_string<_CharT, _Traits, _Allocator>::const_iterator>
+quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return __quoted(__s, __delim, __escape);
+ return std::__quoted(__s, __delim, __escape);
}
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY
__quoted_proxy<_CharT, _Traits, _Allocator>
-quoted ( basic_string <_CharT, _Traits, _Allocator> &__s, _CharT __delim = _CharT('"'), _CharT __escape=_CharT('\\'))
+quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return __quoted(__s, __delim, __escape);
+ return std::__quoted(__s, __delim, __escape);
}
template <class _CharT, class _Traits>
__quoted_output_proxy<_CharT, const _CharT *, _Traits>
-quoted (basic_string_view <_CharT, _Traits> __sv,
- _CharT __delim = _CharT('"'), _CharT __escape=_CharT('\\'))
+quoted(basic_string_view<_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
{
- return __quoted_output_proxy<_CharT, const _CharT *, _Traits>
- ( __sv.data(), __sv.data() + __sv.size(), __delim, __escape );
+ return __quoted_output_proxy<_CharT, const _CharT *, _Traits>(__sv.data(), __sv.data() + __sv.size(), __delim, __escape);
}
-#endif
+
+#endif // _LIBCPP_STD_VER > 11
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/libs/cxxsupp/libcxx/include/ios b/contrib/libs/cxxsupp/libcxx/include/ios
index 6c8267a39c..874227ac73 100644
--- a/contrib/libs/cxxsupp/libcxx/include/ios
+++ b/contrib/libs/cxxsupp/libcxx/include/ios
@@ -403,7 +403,7 @@ _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(io_errc)
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc> : public true_type { };
-#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
+#ifdef _LIBCPP_CXX03_LANG
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc::__lx> : public true_type { };
#endif
@@ -781,6 +781,8 @@ inline _LIBCPP_INLINE_VISIBILITY
_CharT
basic_ios<_CharT, _Traits>::fill(char_type __ch)
{
+ if (traits_type::eq_int_type(traits_type::eof(), __fill_))
+ __fill_ = widen(' ');
char_type __r = __fill_;
__fill_ = __ch;
return __r;
diff --git a/contrib/libs/cxxsupp/libcxx/include/math.h b/contrib/libs/cxxsupp/libcxx/include/math.h
index a409b610f3..d1513afd18 100644
--- a/contrib/libs/cxxsupp/libcxx/include/math.h
+++ b/contrib/libs/cxxsupp/libcxx/include/math.h
@@ -792,10 +792,10 @@ isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
// acos
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return ::acosf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -804,10 +804,10 @@ acos(_A1 __lcpp_x) _NOEXCEPT {return ::acos((double)__lcpp_x);}
// asin
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float asin(float __lcpp_x) _NOEXCEPT {return ::asinf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return ::asinl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -816,10 +816,10 @@ asin(_A1 __lcpp_x) _NOEXCEPT {return ::asin((double)__lcpp_x);}
// atan
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float atan(float __lcpp_x) _NOEXCEPT {return ::atanf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return ::atanl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -828,10 +828,10 @@ atan(_A1 __lcpp_x) _NOEXCEPT {return ::atan((double)__lcpp_x);}
// atan2
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT {return ::atan2f(__lcpp_y, __lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return ::atan2l(__lcpp_y, __lcpp_x);}
-#endif
+# endif
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -851,10 +851,10 @@ atan2(_A1 __lcpp_y, _A2 __lcpp_x) _NOEXCEPT
// ceil
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float ceil(float __lcpp_x) _NOEXCEPT {return ::ceilf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ::ceill(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -863,10 +863,10 @@ ceil(_A1 __lcpp_x) _NOEXCEPT {return ::ceil((double)__lcpp_x);}
// cos
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float cos(float __lcpp_x) _NOEXCEPT {return ::cosf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return ::cosl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -875,10 +875,10 @@ cos(_A1 __lcpp_x) _NOEXCEPT {return ::cos((double)__lcpp_x);}
// cosh
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float cosh(float __lcpp_x) _NOEXCEPT {return ::coshf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return ::coshl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -887,10 +887,10 @@ cosh(_A1 __lcpp_x) _NOEXCEPT {return ::cosh((double)__lcpp_x);}
// exp
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float exp(float __lcpp_x) _NOEXCEPT {return ::expf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return ::expl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -899,10 +899,10 @@ exp(_A1 __lcpp_x) _NOEXCEPT {return ::exp((double)__lcpp_x);}
// fabs
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float fabs(float __lcpp_x) _NOEXCEPT {return ::fabsf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return ::fabsl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -911,10 +911,10 @@ fabs(_A1 __lcpp_x) _NOEXCEPT {return ::fabs((double)__lcpp_x);}
// floor
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float floor(float __lcpp_x) _NOEXCEPT {return ::floorf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return ::floorl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -923,10 +923,10 @@ floor(_A1 __lcpp_x) _NOEXCEPT {return ::floor((double)__lcpp_x);}
// fmod
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::fmodf(__lcpp_x, __lcpp_y);}
inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmodl(__lcpp_x, __lcpp_y);}
-#endif
+# endif
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -946,10 +946,10 @@ fmod(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
// frexp
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpf(__lcpp_x, __lcpp_e);}
inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpl(__lcpp_x, __lcpp_e);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -958,10 +958,10 @@ frexp(_A1 __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexp((double)__lcpp_x, _
// ldexp
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpf(__lcpp_x, __lcpp_e);}
inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpl(__lcpp_x, __lcpp_e);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -970,10 +970,10 @@ ldexp(_A1 __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexp((double)__lcpp_x, __
// log
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float log(float __lcpp_x) _NOEXCEPT {return ::logf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return ::logl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -982,10 +982,10 @@ log(_A1 __lcpp_x) _NOEXCEPT {return ::log((double)__lcpp_x);}
// log10
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float log10(float __lcpp_x) _NOEXCEPT {return ::log10f(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return ::log10l(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -994,17 +994,17 @@ log10(_A1 __lcpp_x) _NOEXCEPT {return ::log10((double)__lcpp_x);}
// modf
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT {return ::modff(__lcpp_x, __lcpp_y);}
inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return ::modfl(__lcpp_x, __lcpp_y);}
-#endif
+# endif
// pow
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT {return ::powf(__lcpp_x, __lcpp_y);}
inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::powl(__lcpp_x, __lcpp_y);}
-#endif
+# endif
template <class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1024,7 +1024,7 @@ pow(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
// sin
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float sin(float __lcpp_x) _NOEXCEPT {return ::sinf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return ::sinl(__lcpp_x);}
#endif
@@ -1036,10 +1036,10 @@ sin(_A1 __lcpp_x) _NOEXCEPT {return ::sin((double)__lcpp_x);}
// sinh
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float sinh(float __lcpp_x) _NOEXCEPT {return ::sinhf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return ::sinhl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1048,10 +1048,10 @@ sinh(_A1 __lcpp_x) _NOEXCEPT {return ::sinh((double)__lcpp_x);}
// sqrt
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float sqrt(float __lcpp_x) _NOEXCEPT {return ::sqrtf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return ::sqrtl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1060,10 +1060,10 @@ sqrt(_A1 __lcpp_x) _NOEXCEPT {return ::sqrt((double)__lcpp_x);}
// tan
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float tan(float __lcpp_x) _NOEXCEPT {return ::tanf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return ::tanl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1072,10 +1072,10 @@ tan(_A1 __lcpp_x) _NOEXCEPT {return ::tan((double)__lcpp_x);}
// tanh
-#if !(defined(_AIX) || defined(__sun__))
+# if !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY float tanh(float __lcpp_x) _NOEXCEPT {return ::tanhf(__lcpp_x);}
inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return ::tanhl(__lcpp_x);}
-#endif
+# endif
template <class _A1>
inline _LIBCPP_INLINE_VISIBILITY
diff --git a/contrib/libs/cxxsupp/libcxx/include/random b/contrib/libs/cxxsupp/libcxx/include/random
index cf1ac2443a..0323c44761 100644
--- a/contrib/libs/cxxsupp/libcxx/include/random
+++ b/contrib/libs/cxxsupp/libcxx/include/random
@@ -1694,6 +1694,7 @@ class piecewise_linear_distribution
#include <__random/geometric_distribution.h>
#include <__random/independent_bits_engine.h>
#include <__random/is_seed_sequence.h>
+#include <__random/is_valid.h>
#include <__random/knuth_b.h>
#include <__random/linear_congruential_engine.h>
#include <__random/log2.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/semaphore b/contrib/libs/cxxsupp/libcxx/include/semaphore
index 753d50f512..df7b0d921e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/semaphore
+++ b/contrib/libs/cxxsupp/libcxx/include/semaphore
@@ -46,6 +46,7 @@ using binary_semaphore = counting_semaphore<1>;
*/
#include <__availability>
+#include <__chrono/time_point.h>
#include <__config>
#include <__thread/timed_backoff_policy.h>
#include <__threading_support>
diff --git a/contrib/libs/cxxsupp/libcxx/include/string b/contrib/libs/cxxsupp/libcxx/include/string
index a1bfff1f6a..3fbb874e26 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string
+++ b/contrib/libs/cxxsupp/libcxx/include/string
@@ -1465,12 +1465,35 @@ private:
return !__libcpp_is_constant_evaluated() && (__sz < __min_cap);
}
- _LIBCPP_INLINE_VISIBILITY
- allocator_type& __alloc() _NOEXCEPT
- {return __r_.second();}
- _LIBCPP_INLINE_VISIBILITY
- const allocator_type& __alloc() const _NOEXCEPT
- {return __r_.second();}
+ template <class _ForwardIterator>
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ iterator __insert_from_safe_copy(size_type __n, size_type __ip, _ForwardIterator __first, _ForwardIterator __last) {
+ size_type __sz = size();
+ size_type __cap = capacity();
+ value_type* __p;
+ if (__cap - __sz >= __n)
+ {
+ __p = std::__to_address(__get_pointer());
+ size_type __n_move = __sz - __ip;
+ if (__n_move != 0)
+ traits_type::move(__p + __ip + __n, __p + __ip, __n_move);
+ }
+ else
+ {
+ __grow_by(__cap, __sz + __n - __cap, __sz, __ip, 0, __n);
+ __p = std::__to_address(__get_long_pointer());
+ }
+ __sz += __n;
+ __set_size(__sz);
+ traits_type::assign(__p[__sz], value_type());
+ for (__p += __ip; __first != __last; ++__p, ++__first)
+ traits_type::assign(*__p, *__first);
+
+ return begin() + __ip;
+ }
+
+ _LIBCPP_HIDE_FROM_ABI allocator_type& __alloc() _NOEXCEPT { return __r_.second(); }
+ _LIBCPP_HIDE_FROM_ABI const allocator_type& __alloc() const _NOEXCEPT { return __r_.second(); }
#ifdef _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
@@ -2814,45 +2837,23 @@ __enable_if_t
>
basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last)
{
- _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
- "string::insert(iterator, range) called with an iterator not"
- " referring to this string");
+ _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
+ "string::insert(iterator, range) called with an iterator not referring to this string");
size_type __ip = static_cast<size_type>(__pos - begin());
- size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
- if (__n)
+ size_type __n = static_cast<size_type>(std::distance(__first, __last));
+ if (__n == 0)
+ return begin() + __ip;
+
+ if (__string_is_trivial_iterator<_ForwardIterator>::value && !__addr_in_range(*__first))
{
- if (__string_is_trivial_iterator<_ForwardIterator>::value &&
- !__addr_in_range(*__first))
- {
- size_type __sz = size();
- size_type __cap = capacity();
- value_type* __p;
- if (__cap - __sz >= __n)
- {
- __p = _VSTD::__to_address(__get_pointer());
- size_type __n_move = __sz - __ip;
- if (__n_move != 0)
- traits_type::move(__p + __ip + __n, __p + __ip, __n_move);
- }
- else
- {
- __grow_by(__cap, __sz + __n - __cap, __sz, __ip, 0, __n);
- __p = _VSTD::__to_address(__get_long_pointer());
- }
- __sz += __n;
- __set_size(__sz);
- traits_type::assign(__p[__sz], value_type());
- for (__p += __ip; __first != __last; ++__p, (void) ++__first)
- traits_type::assign(*__p, *__first);
- }
- else
- {
- const basic_string __temp(__first, __last, __alloc());
- return insert(__pos, __temp.data(), __temp.data() + __temp.size());
- }
+ return __insert_from_safe_copy(__n, __ip, __first, __last);
+ }
+ else
+ {
+ const basic_string __temp(__first, __last, __alloc());
+ return __insert_from_safe_copy(__n, __ip, __temp.begin(), __temp.end());
}
- return begin() + __ip;
}
template <class _CharT, class _Traits, class _Allocator>
diff --git a/contrib/libs/cxxsupp/libcxx/include/system_error b/contrib/libs/cxxsupp/libcxx/include/system_error
index 66a3f3c1e0..48a6b2e503 100644
--- a/contrib/libs/cxxsupp/libcxx/include/system_error
+++ b/contrib/libs/cxxsupp/libcxx/include/system_error
@@ -183,7 +183,7 @@ template <>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc>
: true_type { };
-#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS
+#ifdef _LIBCPP_CXX03_LANG
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc::__lx>
: true_type { };
diff --git a/contrib/libs/cxxsupp/libcxx/include/thread b/contrib/libs/cxxsupp/libcxx/include/thread
index b059cfb459..5a8e830fcc 100644
--- a/contrib/libs/cxxsupp/libcxx/include/thread
+++ b/contrib/libs/cxxsupp/libcxx/include/thread
@@ -89,7 +89,6 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <__thread/timed_backoff_policy.h>
#include <__threading_support>
#include <__utility/forward.h>
-#include <chrono>
#include <cstddef>
#include <functional>
#include <iosfwd>
diff --git a/contrib/libs/cxxsupp/libcxx/include/valarray b/contrib/libs/cxxsupp/libcxx/include/valarray
index 90740f2e56..11d4137440 100644
--- a/contrib/libs/cxxsupp/libcxx/include/valarray
+++ b/contrib/libs/cxxsupp/libcxx/include/valarray
@@ -1536,21 +1536,21 @@ public:
gslice(size_t __start, const valarray<size_t>& __size,
valarray<size_t>&& __stride)
: __size_(__size),
- __stride_(move(__stride))
+ __stride_(std::move(__stride))
{__init(__start);}
_LIBCPP_INLINE_VISIBILITY
gslice(size_t __start, valarray<size_t>&& __size,
const valarray<size_t>& __stride)
- : __size_(move(__size)),
+ : __size_(std::move(__size)),
__stride_(__stride)
{__init(__start);}
_LIBCPP_INLINE_VISIBILITY
gslice(size_t __start, valarray<size_t>&& __size,
valarray<size_t>&& __stride)
- : __size_(move(__size)),
- __stride_(move(__stride))
+ : __size_(std::move(__size)),
+ __stride_(std::move(__stride))
{__init(__start);}
#endif // _LIBCPP_CXX03_LANG
@@ -1701,7 +1701,7 @@ private:
#ifndef _LIBCPP_CXX03_LANG
gslice_array(gslice&& __gs, const valarray<value_type>& __v)
: __vp_(const_cast<value_type*>(__v.__begin_)),
- __1d_(move(__gs.__1d_))
+ __1d_(std::move(__gs.__1d_))
{}
#endif // _LIBCPP_CXX03_LANG
@@ -2395,7 +2395,7 @@ private:
_LIBCPP_INLINE_VISIBILITY
indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v)
: __vp_(const_cast<value_type*>(__v.__begin_)),
- __1d_(move(__ia))
+ __1d_(std::move(__ia))
{}
#endif // _LIBCPP_CXX03_LANG
@@ -2614,7 +2614,7 @@ private:
_LIBCPP_INLINE_VISIBILITY
__indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e)
: __expr_(__e),
- __1d_(move(__ia))
+ __1d_(std::move(__ia))
{}
#endif // _LIBCPP_CXX03_LANG
@@ -3209,7 +3209,7 @@ inline
__val_expr<__indirect_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](gslice&& __gs) const
{
- return __val_expr<__indirect_expr<const valarray&> >(__indirect_expr<const valarray&>(move(__gs.__1d_), *this));
+ return __val_expr<__indirect_expr<const valarray&> >(__indirect_expr<const valarray&>(std::move(__gs.__1d_), *this));
}
template <class _Tp>
@@ -3217,7 +3217,7 @@ inline
gslice_array<_Tp>
valarray<_Tp>::operator[](gslice&& __gs)
{
- return gslice_array<value_type>(move(__gs), *this);
+ return gslice_array<value_type>(std::move(__gs), *this);
}
#endif // _LIBCPP_CXX03_LANG
@@ -3245,7 +3245,7 @@ inline
__val_expr<__mask_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](valarray<bool>&& __vb) const
{
- return __val_expr<__mask_expr<const valarray&> >(__mask_expr<const valarray&>(move(__vb), *this));
+ return __val_expr<__mask_expr<const valarray&> >(__mask_expr<const valarray&>(std::move(__vb), *this));
}
template <class _Tp>
@@ -3253,7 +3253,7 @@ inline
mask_array<_Tp>
valarray<_Tp>::operator[](valarray<bool>&& __vb)
{
- return mask_array<value_type>(move(__vb), *this);
+ return mask_array<value_type>(std::move(__vb), *this);
}
#endif // _LIBCPP_CXX03_LANG
@@ -3281,7 +3281,7 @@ inline
__val_expr<__indirect_expr<const valarray<_Tp>&> >
valarray<_Tp>::operator[](valarray<size_t>&& __vs) const
{
- return __val_expr<__indirect_expr<const valarray&> >(__indirect_expr<const valarray&>(move(__vs), *this));
+ return __val_expr<__indirect_expr<const valarray&> >(__indirect_expr<const valarray&>(std::move(__vs), *this));
}
template <class _Tp>
@@ -3289,7 +3289,7 @@ inline
indirect_array<_Tp>
valarray<_Tp>::operator[](valarray<size_t>&& __vs)
{
- return indirect_array<value_type>(move(__vs), *this);
+ return indirect_array<value_type>(std::move(__vs), *this);
}
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp
index 8b91929df8..8d069cc080 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/directory_iterator.cpp
@@ -25,8 +25,8 @@ public:
__dir_stream& operator=(const __dir_stream&) = delete;
__dir_stream(__dir_stream&& __ds) noexcept : __stream_(__ds.__stream_),
- __root_(move(__ds.__root_)),
- __entry_(move(__ds.__entry_)) {
+ __root_(std::move(__ds.__root_)),
+ __entry_(std::move(__ds.__entry_)) {
__ds.__stream_ = INVALID_HANDLE_VALUE;
}
@@ -104,8 +104,8 @@ public:
__dir_stream& operator=(const __dir_stream&) = delete;
__dir_stream(__dir_stream&& other) noexcept : __stream_(other.__stream_),
- __root_(move(other.__root_)),
- __entry_(move(other.__entry_)) {
+ __root_(std::move(other.__root_)),
+ __entry_(std::move(other.__entry_)) {
other.__stream_ = nullptr;
}
@@ -187,7 +187,7 @@ directory_iterator& directory_iterator::__increment(error_code* ec) {
error_code m_ec;
if (!__imp_->advance(m_ec)) {
- path root = move(__imp_->__root_);
+ path root = std::move(__imp_->__root_);
__imp_.reset();
if (m_ec)
err.report(m_ec, "at root " PATH_CSTR_FMT, root.c_str());
@@ -221,7 +221,7 @@ recursive_directory_iterator::recursive_directory_iterator(
__imp_ = make_shared<__shared_imp>();
__imp_->__options_ = opt;
- __imp_->__stack_.push(move(new_s));
+ __imp_->__stack_.push(std::move(new_s));
}
void recursive_directory_iterator::__pop(error_code* ec) {
@@ -275,7 +275,7 @@ void recursive_directory_iterator::__advance(error_code* ec) {
}
if (m_ec) {
- path root = move(stack.top().__root_);
+ path root = std::move(stack.top().__root_);
__imp_.reset();
err.report(m_ec, "at root " PATH_CSTR_FMT, root.c_str());
} else {
@@ -309,7 +309,7 @@ bool recursive_directory_iterator::__try_recursion(error_code* ec) {
if (!skip_rec) {
__dir_stream new_it(curr_it.__entry_.path(), __imp_->__options_, m_ec);
if (new_it.good()) {
- __imp_->__stack_.push(move(new_it));
+ __imp_->__stack_.push(std::move(new_it));
return true;
}
}
@@ -320,7 +320,7 @@ bool recursive_directory_iterator::__try_recursion(error_code* ec) {
if (ec)
ec->clear();
} else {
- path at_ent = move(curr_it.__entry_.__p_);
+ path at_ent = std::move(curr_it.__entry_.__p_);
__imp_.reset();
err.report(m_ec, "attempting recursion into " PATH_CSTR_FMT,
at_ent.c_str());
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp
index 9e0abc83b1..82d321942a 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp
@@ -1420,12 +1420,14 @@ uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) {
if (fd != -1) {
// If that worked, iterate over the contents of the directory and
// remove everything in it, recursively.
- scope_exit close_fd([=] { ::close(fd); });
DIR* stream = ::fdopendir(fd);
if (stream == nullptr) {
+ ::close(fd);
ec = detail::capture_errno();
return 0;
}
+ // Note: `::closedir` will also close the associated file descriptor, so
+ // there should be no call to `close(fd)`.
scope_exit close_stream([=] { ::closedir(stream); });
uintmax_t count = 0;
diff --git a/contrib/libs/cxxsupp/libcxx/src/locale.cpp b/contrib/libs/cxxsupp/libcxx/src/locale.cpp
index fc95dad600..8615901034 100644
--- a/contrib/libs/cxxsupp/libcxx/src/locale.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/locale.cpp
@@ -1527,7 +1527,7 @@ char
ctype_byname<wchar_t>::do_narrow(char_type c, char dfault) const
{
int r = __libcpp_wctob_l(c, __l);
- return r != static_cast<int>(WEOF) ? static_cast<char>(r) : dfault;
+ return (r != EOF) ? static_cast<char>(r) : dfault;
}
const wchar_t*
@@ -1536,7 +1536,7 @@ ctype_byname<wchar_t>::do_narrow(const char_type* low, const char_type* high, ch
for (; low != high; ++low, ++dest)
{
int r = __libcpp_wctob_l(*low, __l);
- *dest = r != static_cast<int>(WEOF) ? static_cast<char>(r) : dfault;
+ *dest = (r != EOF) ? static_cast<char>(r) : dfault;
}
return low;
}