aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/patches
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
commit31773f157bf8164364649b5f470f52dece0a4317 (patch)
tree33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /contrib/libs/cxxsupp/libcxx/patches
parent2c7938962d8689e175574fc1e817c05049f27905 (diff)
parenteff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff)
downloadydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/patches')
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/00-future-2023-11-30-fix-std-expected-DEVTOOLSSUPPORT-54349.patch385
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/01-commit-e0e82fc-initial.patch39
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/22__config.patch12
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/27-bitset.patch6
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/28-cudacc.patch28
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/43-string.patch12
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/65-string-iterator-pointer.patch6
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/68-asan-contiguous-container.patch4
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/xxx-config-epilogue.patch4
-rw-r--r--contrib/libs/cxxsupp/libcxx/patches/yyy-enable-std-expected.patch2
10 files changed, 454 insertions, 44 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/patches/00-future-2023-11-30-fix-std-expected-DEVTOOLSSUPPORT-54349.patch b/contrib/libs/cxxsupp/libcxx/patches/00-future-2023-11-30-fix-std-expected-DEVTOOLSSUPPORT-54349.patch
new file mode 100644
index 0000000000..36245f22b7
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/patches/00-future-2023-11-30-fix-std-expected-DEVTOOLSSUPPORT-54349.patch
@@ -0,0 +1,385 @@
+diff --git a/include/__expected/expected.h b/include/__expected/expected.h
+index 045370a..bf16c8f 100644
+--- a/include/__expected/expected.h
++++ b/include/__expected/expected.h
+@@ -119,9 +119,7 @@ public:
+ _LIBCPP_HIDE_FROM_ABI constexpr expected()
+ noexcept(is_nothrow_default_constructible_v<_Tp>) // strengthened
+ requires is_default_constructible_v<_Tp>
+- : __has_val_(true) {
+- std::construct_at(std::addressof(__union_.__val_));
+- }
++ : __union_(std::in_place), __has_val_(true) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected&) = delete;
+
+@@ -136,14 +134,7 @@ public:
+ noexcept(is_nothrow_copy_constructible_v<_Tp> && is_nothrow_copy_constructible_v<_Err>) // strengthened
+ requires(is_copy_constructible_v<_Tp> && is_copy_constructible_v<_Err> &&
+ !(is_trivially_copy_constructible_v<_Tp> && is_trivially_copy_constructible_v<_Err>))
+- : __has_val_(__other.__has_val_) {
+- if (__has_val_) {
+- std::construct_at(std::addressof(__union_.__val_), __other.__union_.__val_);
+- } else {
+- std::construct_at(std::addressof(__union_.__unex_), __other.__union_.__unex_);
+- }
+- }
+-
++ : __union_(__other.__has_val_, __other.__union_), __has_val_(__other.__has_val_) { }
+
+ _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&&)
+ requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err>
+@@ -154,13 +145,7 @@ public:
+ noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_move_constructible_v<_Err>)
+ requires(is_move_constructible_v<_Tp> && is_move_constructible_v<_Err> &&
+ !(is_trivially_move_constructible_v<_Tp> && is_trivially_move_constructible_v<_Err>))
+- : __has_val_(__other.__has_val_) {
+- if (__has_val_) {
+- std::construct_at(std::addressof(__union_.__val_), std::move(__other.__union_.__val_));
+- } else {
+- std::construct_at(std::addressof(__union_.__unex_), std::move(__other.__union_.__unex_));
+- }
+- }
++ : __union_(__other.__has_val_, std::move(__other.__union_)), __has_val_(__other.__has_val_) { }
+
+ private:
+ template <class _Up, class _OtherErr, class _UfQual, class _OtherErrQual>
+@@ -200,26 +185,14 @@ public:
+ expected(const expected<_Up, _OtherErr>& __other)
+ noexcept(is_nothrow_constructible_v<_Tp, const _Up&> &&
+ is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
+- : __has_val_(__other.__has_val_) {
+- if (__has_val_) {
+- std::construct_at(std::addressof(__union_.__val_), __other.__union_.__val_);
+- } else {
+- std::construct_at(std::addressof(__union_.__unex_), __other.__union_.__unex_);
+- }
+- }
++ : __union_(__other.__has_val_, __other.__union_), __has_val_(__other.__has_val_) {}
+
+ template <class _Up, class _OtherErr>
+ requires __can_convert<_Up, _OtherErr, _Up, _OtherErr>::value
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp> || !is_convertible_v<_OtherErr, _Err>)
+ expected(expected<_Up, _OtherErr>&& __other)
+ noexcept(is_nothrow_constructible_v<_Tp, _Up> && is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened
+- : __has_val_(__other.__has_val_) {
+- if (__has_val_) {
+- std::construct_at(std::addressof(__union_.__val_), std::move(__other.__union_.__val_));
+- } else {
+- std::construct_at(std::addressof(__union_.__unex_), std::move(__other.__union_.__unex_));
+- }
+- }
++ : __union_(__other.__has_val_, std::move(__other.__union_)), __has_val_(__other.__has_val_) {}
+
+ template <class _Up = _Tp>
+ requires(!is_same_v<remove_cvref_t<_Up>, in_place_t> && !is_same_v<expected, remove_cvref_t<_Up>> &&
+@@ -227,61 +200,47 @@ public:
+ (!is_same_v<remove_cv_t<_Tp>, bool> || !__is_std_expected<remove_cvref_t<_Up>>::value))
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_Up, _Tp>)
+ expected(_Up&& __u) noexcept(is_nothrow_constructible_v<_Tp, _Up>) // strengthened
+- : __has_val_(true) {
+- std::construct_at(std::addressof(__union_.__val_), std::forward<_Up>(__u));
+- }
++ : __union_(std::in_place, std::forward<_Up>(__u)), __has_val_(true) {}
+
+ template <class _OtherErr>
+ requires is_constructible_v<_Err, const _OtherErr&>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>)
+ expected(const unexpected<_OtherErr>& __unex)
+ noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
+- : __has_val_(false) {
+- std::construct_at(std::addressof(__union_.__unex_), __unex.error());
+- }
++ : __union_(std::unexpect, __unex.error()), __has_val_(false) {}
+
+ template <class _OtherErr>
+ requires is_constructible_v<_Err, _OtherErr>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
+ expected(unexpected<_OtherErr>&& __unex)
+ noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened
+- : __has_val_(false) {
+- std::construct_at(std::addressof(__union_.__unex_), std::move(__unex.error()));
+- }
++ : __union_(std::unexpect, std::move(__unex.error())), __has_val_(false) {}
+
+ template <class... _Args>
+ requires is_constructible_v<_Tp, _Args...>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t, _Args&&... __args)
+ noexcept(is_nothrow_constructible_v<_Tp, _Args...>) // strengthened
+- : __has_val_(true) {
+- std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...);
+- }
++ : __union_(std::in_place, std::forward<_Args>(__args)...), __has_val_(true) {}
+
+ template <class _Up, class... _Args>
+ requires is_constructible_v< _Tp, initializer_list<_Up>&, _Args... >
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit
+ expected(in_place_t, initializer_list<_Up> __il, _Args&&... __args)
+ noexcept(is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>) // strengthened
+- : __has_val_(true) {
+- std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...);
+- }
++ : __union_(std::in_place, __il, std::forward<_Args>(__args)...), __has_val_(true) {}
+
+ template <class... _Args>
+ requires is_constructible_v<_Err, _Args...>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, _Args&&... __args)
+- noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened
+- : __has_val_(false) {
+- std::construct_at(std::addressof(__union_.__unex_), std::forward<_Args>(__args)...);
+- }
++ noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened
++ : __union_(std::unexpect, std::forward<_Args>(__args)...), __has_val_(false) {}
+
+ template <class _Up, class... _Args>
+ requires is_constructible_v< _Err, initializer_list<_Up>&, _Args... >
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit
+ expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args)
+ noexcept(is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened
+- : __has_val_(false) {
+- std::construct_at(std::addressof(__union_.__unex_), __il, std::forward<_Args>(__args)...);
+- }
++ : __union_(std::unexpect, __il, std::forward<_Args>(__args)...), __has_val_(false) {}
+
+ // [expected.object.dtor], destructor
+
+@@ -440,9 +399,10 @@ public:
+ std::destroy_at(std::addressof(__union_.__val_));
+ } else {
+ std::destroy_at(std::addressof(__union_.__unex_));
+- __has_val_ = true;
+ }
+- return *std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...);
++ std::construct_at(std::addressof(__union_.__val_), std::forward<_Args>(__args)...);
++ __has_val_ = true;
++ return __union_.__val_;
+ }
+
+ template <class _Up, class... _Args>
+@@ -452,9 +412,10 @@ public:
+ std::destroy_at(std::addressof(__union_.__val_));
+ } else {
+ std::destroy_at(std::addressof(__union_.__unex_));
+- __has_val_ = true;
+ }
+- return *std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...);
++ std::construct_at(std::addressof(__union_.__val_), __il, std::forward<_Args>(__args)...);
++ __has_val_ = true;
++ return __union_.__val_;
+ }
+
+
+@@ -893,11 +854,15 @@ public:
+ }
+
+ private:
+- struct __empty_t {};
+-
+ template <class _ValueType, class _ErrorType>
+ union __union_t {
+- _LIBCPP_HIDE_FROM_ABI constexpr __union_t() {}
++ template <class... _Args>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::in_place_t, _Args&&... __args)
++ : __val_(std::forward<_Args>(__args)...) {}
++
++ template <class... _Args>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args)
++ : __unex_(std::forward<_Args>(__args)...) {}
+
+ template <class _Func, class... _Args>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(
+@@ -909,6 +874,14 @@ private:
+ std::__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args)
+ : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
+
++ template <class _Union>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) {
++ if (__has_val)
++ std::construct_at(std::addressof(__val_), std::forward<_Union>(__other).__val_);
++ else
++ std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_);
++ }
++
+ _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t()
+ requires(is_trivially_destructible_v<_ValueType> && is_trivially_destructible_v<_ErrorType>)
+ = default;
+@@ -927,10 +900,17 @@ private:
+ template <class _ValueType, class _ErrorType>
+ requires(is_trivially_move_constructible_v<_ValueType> && is_trivially_move_constructible_v<_ErrorType>)
+ union __union_t<_ValueType, _ErrorType> {
+- _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {}
+ _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = default;
+ _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = default;
+
++ template <class... _Args>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::in_place_t, _Args&&... __args)
++ : __val_(std::forward<_Args>(__args)...) {}
++
++ template <class... _Args>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args)
++ : __unex_(std::forward<_Args>(__args)...) {}
++
+ template <class _Func, class... _Args>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(
+ std::__expected_construct_in_place_from_invoke_tag, _Func&& __f, _Args&&... __args)
+@@ -941,6 +921,14 @@ private:
+ std::__expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args)
+ : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
+
++ template <class _Union>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) {
++ if (__has_val)
++ std::construct_at(std::addressof(__val_), std::forward<_Union>(__other).__val_);
++ else
++ std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_);
++ }
++
+ _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t()
+ requires(is_trivially_destructible_v<_ValueType> && is_trivially_destructible_v<_ErrorType>)
+ = default;
+@@ -950,7 +938,6 @@ private:
+ requires(!is_trivially_destructible_v<_ValueType> || !is_trivially_destructible_v<_ErrorType>)
+ {}
+
+- _LIBCPP_NO_UNIQUE_ADDRESS __empty_t __empty_;
+ _LIBCPP_NO_UNIQUE_ADDRESS _ValueType __val_;
+ _LIBCPP_NO_UNIQUE_ADDRESS _ErrorType __unex_;
+ };
+@@ -998,11 +985,7 @@ public:
+ _LIBCPP_HIDE_FROM_ABI constexpr expected(const expected& __rhs)
+ noexcept(is_nothrow_copy_constructible_v<_Err>) // strengthened
+ requires(is_copy_constructible_v<_Err> && !is_trivially_copy_constructible_v<_Err>)
+- : __has_val_(__rhs.__has_val_) {
+- if (!__rhs.__has_val_) {
+- std::construct_at(std::addressof(__union_.__unex_), __rhs.__union_.__unex_);
+- }
+- }
++ : __union_(__rhs.__has_val_, __rhs.__union_), __has_val_(__rhs.__has_val_) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&&)
+ requires(is_move_constructible_v<_Err> && is_trivially_move_constructible_v<_Err>)
+@@ -1011,51 +994,35 @@ public:
+ _LIBCPP_HIDE_FROM_ABI constexpr expected(expected&& __rhs)
+ noexcept(is_nothrow_move_constructible_v<_Err>)
+ requires(is_move_constructible_v<_Err> && !is_trivially_move_constructible_v<_Err>)
+- : __has_val_(__rhs.__has_val_) {
+- if (!__rhs.__has_val_) {
+- std::construct_at(std::addressof(__union_.__unex_), std::move(__rhs.__union_.__unex_));
+- }
+- }
++ : __union_(__rhs.__has_val_, std::move(__rhs.__union_)), __has_val_(__rhs.__has_val_) {}
+
+ template <class _Up, class _OtherErr>
+ requires __can_convert<_Up, _OtherErr, const _OtherErr&>::value
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>)
+ expected(const expected<_Up, _OtherErr>& __rhs)
+ noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
+- : __has_val_(__rhs.__has_val_) {
+- if (!__rhs.__has_val_) {
+- std::construct_at(std::addressof(__union_.__unex_), __rhs.__union_.__unex_);
+- }
+- }
++ : __union_(__rhs.__has_val_, __rhs.__union_), __has_val_(__rhs.__has_val_) {}
+
+ template <class _Up, class _OtherErr>
+ requires __can_convert<_Up, _OtherErr, _OtherErr>::value
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
+ expected(expected<_Up, _OtherErr>&& __rhs)
+ noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened
+- : __has_val_(__rhs.__has_val_) {
+- if (!__rhs.__has_val_) {
+- std::construct_at(std::addressof(__union_.__unex_), std::move(__rhs.__union_.__unex_));
+- }
+- }
++ : __union_(__rhs.__has_val_, std::move(__rhs.__union_)), __has_val_(__rhs.__has_val_) {}
+
+ template <class _OtherErr>
+ requires is_constructible_v<_Err, const _OtherErr&>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<const _OtherErr&, _Err>)
+ expected(const unexpected<_OtherErr>& __unex)
+ noexcept(is_nothrow_constructible_v<_Err, const _OtherErr&>) // strengthened
+- : __has_val_(false) {
+- std::construct_at(std::addressof(__union_.__unex_), __unex.error());
+- }
++ : __union_(std::unexpect, __unex.error()), __has_val_(false) {}
+
+ template <class _OtherErr>
+ requires is_constructible_v<_Err, _OtherErr>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit(!is_convertible_v<_OtherErr, _Err>)
+ expected(unexpected<_OtherErr>&& __unex)
+ noexcept(is_nothrow_constructible_v<_Err, _OtherErr>) // strengthened
+- : __has_val_(false) {
+- std::construct_at(std::addressof(__union_.__unex_), std::move(__unex.error()));
+- }
++ : __union_(std::unexpect, std::move(__unex.error())), __has_val_(false) {}
+
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(in_place_t) noexcept : __has_val_(true) {}
+
+@@ -1063,17 +1030,13 @@ public:
+ requires is_constructible_v<_Err, _Args...>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, _Args&&... __args)
+ noexcept(is_nothrow_constructible_v<_Err, _Args...>) // strengthened
+- : __has_val_(false) {
+- std::construct_at(std::addressof(__union_.__unex_), std::forward<_Args>(__args)...);
+- }
++ : __union_(std::unexpect, std::forward<_Args>(__args)...), __has_val_(false) {}
+
+ template <class _Up, class... _Args>
+ requires is_constructible_v< _Err, initializer_list<_Up>&, _Args... >
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit expected(unexpect_t, initializer_list<_Up> __il, _Args&&... __args)
+ noexcept(is_nothrow_constructible_v<_Err, initializer_list<_Up>&, _Args...>) // strengthened
+- : __has_val_(false) {
+- std::construct_at(std::addressof(__union_.__unex_), __il, std::forward<_Args>(__args)...);
+- }
++ : __union_(std::unexpect, __il, std::forward<_Args>(__args)...), __has_val_(false) {}
+
+ private:
+ template <class _Func>
+@@ -1507,11 +1470,23 @@ private:
+ union __union_t {
+ _LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {}
+
++ template <class... _Args>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args)
++ : __unex_(std::forward<_Args>(__args)...) {}
++
+ template <class _Func, class... _Args>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(
+ __expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args)
+ : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
+
++ template <class _Union>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) {
++ if (__has_val)
++ std::construct_at(std::addressof(__empty_));
++ else
++ std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_);
++ }
++
+ _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t()
+ requires(is_trivially_destructible_v<_ErrorType>)
+ = default;
+@@ -1534,11 +1509,23 @@ private:
+ _LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = default;
+ _LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = default;
+
++ template <class... _Args>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(std::unexpect_t, _Args&&... __args)
++ : __unex_(std::forward<_Args>(__args)...) {}
++
+ template <class _Func, class... _Args>
+ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(
+ __expected_construct_unexpected_from_invoke_tag, _Func&& __f, _Args&&... __args)
+ : __unex_(std::invoke(std::forward<_Func>(__f), std::forward<_Args>(__args)...)) {}
+
++ template <class _Union>
++ _LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(bool __has_val, _Union&& __other) {
++ if (__has_val)
++ std::construct_at(std::addressof(__empty_));
++ else
++ std::construct_at(std::addressof(__unex_), std::forward<_Union>(__other).__unex_);
++ }
++
+ _LIBCPP_HIDE_FROM_ABI constexpr ~__union_t()
+ requires(is_trivially_destructible_v<_ErrorType>)
+ = default;
diff --git a/contrib/libs/cxxsupp/libcxx/patches/01-commit-e0e82fc-initial.patch b/contrib/libs/cxxsupp/libcxx/patches/01-commit-e0e82fc-initial.patch
index bd826ae06e..6e2e94aaab 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/01-commit-e0e82fc-initial.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/01-commit-e0e82fc-initial.patch
@@ -1,5 +1,5 @@
diff --git a/include/__config b/include/__config
-index 52bf12f..e431997 100644
+index 65ce6d6..ab696fb 100644
--- a/include/__config
+++ b/include/__config
@@ -131,7 +131,12 @@
@@ -45,27 +45,26 @@ index 63a119a..61f2cc5 100644
# define _LIBCPP_FILESYSTEM_USE_SENDFILE
#elif defined(__APPLE__) || __has_include(<copyfile.h>)
diff --git a/src/new.cpp b/src/new.cpp
-index c435c5f..6d5b221 100644
+index 033bba5..318b062 100644
--- a/src/new.cpp
+++ b/src/new.cpp
-@@ -37,8 +37,17 @@ operator new(std::size_t size) _THROW_BAD_ALLOC
- else
- #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
- throw std::bad_alloc();
-+#else
-+#ifdef __EMSCRIPTEN__
-+ // Abort here so that when exceptions are disabled, we do not just
-+ // return 0 when malloc returns 0.
-+ // We could also do this with set_new_handler, but that adds a
-+ // global constructor and a table entry, overhead that we can avoid
-+ // by doing it this way.
-+ abort();
- #else
- break;
-+#endif
- #endif
- }
- return p;
+@@ -41,6 +41,16 @@ _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC {
+ # ifndef _LIBCPP_HAS_NO_EXCEPTIONS
+ if (p == nullptr)
+ throw std::bad_alloc();
++# else
++# ifdef __EMSCRIPTEN__
++ if (p == nullptr)
++ // Abort here so that when exceptions are disabled, we do not just
++ // return 0 when malloc returns 0.
++ // We could also do this with set_new_handler, but that adds a
++ // global constructor and a table entry, overhead that we can avoid
++ // by doing it this way.
++ abort();
++# endif
+ # endif
+ return p;
+ }
diff --git a/src/support/runtime/exception_fallback.ipp b/src/support/runtime/exception_fallback.ipp
index 3b2716d..c14c375 100644
--- a/src/support/runtime/exception_fallback.ipp
diff --git a/contrib/libs/cxxsupp/libcxx/patches/22__config.patch b/contrib/libs/cxxsupp/libcxx/patches/22__config.patch
index 7cfe9240d7..e974271645 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/22__config.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/22__config.patch
@@ -1,5 +1,5 @@
diff --git a/include/__config b/include/__config
-index e431997..3b1c3a6 100644
+index ab696fb..6e3b0e3 100644
--- a/include/__config
+++ b/include/__config
@@ -28,13 +28,35 @@
@@ -48,7 +48,7 @@ index e431997..3b1c3a6 100644
# define _LIBCPP_OBJECT_FORMAT_COFF 1
# elif defined(__wasm__)
# define _LIBCPP_OBJECT_FORMAT_WASM 1
-@@ -772,7 +794,7 @@ typedef __char32_t char32_t;
+@@ -771,7 +793,7 @@ typedef __char32_t char32_t;
// TODO: We provide a escape hatch with _LIBCPP_NO_ABI_TAG for folks who want to avoid increasing
// the length of symbols with an ABI tag. In practice, we should remove the escape hatch and
// use compression mangling instead, see https://github.com/itanium-cxx-abi/cxx-abi/issues/70.
@@ -57,7 +57,7 @@ index e431997..3b1c3a6 100644
# define _LIBCPP_HIDE_FROM_ABI \
_LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION \
__attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
-@@ -1075,7 +1097,8 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
+@@ -1074,7 +1096,8 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
defined(__APPLE__) || \
defined(__MVS__) || \
defined(_AIX) || \
@@ -67,7 +67,7 @@ index e431997..3b1c3a6 100644
// clang-format on
# define _LIBCPP_HAS_THREAD_API_PTHREAD
# elif defined(__Fuchsia__)
-@@ -1211,6 +1234,10 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
+@@ -1210,6 +1233,10 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
# define _LIBCPP_CONSTINIT
# endif
@@ -78,7 +78,7 @@ index e431997..3b1c3a6 100644
# if __has_attribute(__diagnose_if__) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS)
# define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((__diagnose_if__(__VA_ARGS__, "warning")))
# else
-@@ -1232,6 +1259,12 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
+@@ -1231,6 +1258,12 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
# define _LIBCPP_LIFETIMEBOUND
# endif
@@ -91,7 +91,7 @@ index e431997..3b1c3a6 100644
# if __has_attribute(__nodebug__)
# define _LIBCPP_NODEBUG __attribute__((__nodebug__))
# else
-@@ -1289,6 +1322,10 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
+@@ -1288,6 +1321,10 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
# define _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
# endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES
diff --git a/contrib/libs/cxxsupp/libcxx/patches/27-bitset.patch b/contrib/libs/cxxsupp/libcxx/patches/27-bitset.patch
index c7a2678844..d6113b4851 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/27-bitset.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/27-bitset.patch
@@ -1,8 +1,8 @@
diff --git a/include/bitset b/include/bitset
-index e4c01e6..7ad332c 100644
+index a3b1dc3..d7112a7 100644
--- a/include/bitset
+++ b/include/bitset
-@@ -150,6 +150,10 @@ _LIBCPP_PUSH_MACROS
+@@ -151,6 +151,10 @@ _LIBCPP_PUSH_MACROS
#include <__undef_macros>
@@ -13,7 +13,7 @@ index e4c01e6..7ad332c 100644
_LIBCPP_BEGIN_NAMESPACE_STD
template <size_t _N_words, size_t _Size>
-@@ -289,9 +293,9 @@ inline
+@@ -290,9 +294,9 @@ inline
_LIBCPP_CONSTEXPR
__bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
#ifndef _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/patches/28-cudacc.patch b/contrib/libs/cxxsupp/libcxx/patches/28-cudacc.patch
index ca2774a7b6..4dc661418a 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/28-cudacc.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/28-cudacc.patch
@@ -1,3 +1,16 @@
+diff --git a/include/__iterator/reverse_iterator.h b/include/__iterator/reverse_iterator.h
+index beb10f7..c1241da 100644
+--- a/include/__iterator/reverse_iterator.h
++++ b/include/__iterator/reverse_iterator.h
+@@ -144,7 +144,7 @@ public:
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX17
+ reference operator*() const {_Iter __tmp = current; return *--__tmp;}
+
+-#if _LIBCPP_STD_VER >= 20
++#if (_LIBCPP_STD_VER >= 20) && !defined(__CUDACC__)
+ _LIBCPP_INLINE_VISIBILITY
+ constexpr pointer operator->() const
+ requires is_pointer_v<_Iter> || requires(const _Iter __i) { __i.operator->(); }
diff --git a/include/__iterator/segmented_iterator.h b/include/__iterator/segmented_iterator.h
index f3cd1e5..c0a77ef 100644
--- a/include/__iterator/segmented_iterator.h
@@ -57,7 +70,7 @@ index c8ffde9..7f44242 100644
} // namespace literals
#endif
diff --git a/include/tuple b/include/tuple
-index e7fc1e2..eb1785c 100644
+index 138c132..63adb8e 100644
--- a/include/tuple
+++ b/include/tuple
@@ -308,7 +308,7 @@ class __tuple_leaf
@@ -69,3 +82,16 @@ index e7fc1e2..eb1785c 100644
return !__reference_binds_to_temporary(_Hp, _Tp);
#else
return true;
+@@ -670,6 +670,12 @@ _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wc++20-extensions")
+ _And<
+ _BoolConstant<sizeof...(_Up) == sizeof...(_Tp)>,
+ _EnableUTypesCtor<_Up...>
++// nvcc 12.2 cannot choose between tuple(const T& ... t) and tuple(U&&... u)
++// so we have to added an explicit requires in enable_if
++#ifdef __CUDACC__
++ ,
++ _Not<_And<is_copy_constructible<_Tp>..., _Lazy<_And, is_convertible<_Up, const _Tp&>...>> >
++#endif
+ >::value
+ , int> = 0>
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
diff --git a/contrib/libs/cxxsupp/libcxx/patches/43-string.patch b/contrib/libs/cxxsupp/libcxx/patches/43-string.patch
index 10ffa7cbf3..88d1ef5e37 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/43-string.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/43-string.patch
@@ -12,7 +12,7 @@ index 5bde46a..33bf0eb 100644
# endif
diff --git a/include/string b/include/string
-index 123e1d6..57624c7 100644
+index 9193516..0ff5802 100644
--- a/include/string
+++ b/include/string
@@ -703,6 +703,7 @@ struct __init_with_sentinel_tag {};
@@ -23,7 +23,7 @@ index 123e1d6..57624c7 100644
public:
typedef basic_string __self;
typedef basic_string_view<_CharT, _Traits> __self_view;
-@@ -947,9 +948,11 @@ public:
+@@ -943,9 +944,11 @@ public:
__init(__s, traits_type::length(__s));
}
@@ -36,7 +36,7 @@ index 123e1d6..57624c7 100644
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string(const _CharT* __s, size_type __n)
: __r_(__default_init_tag(), __default_init_tag()) {
-@@ -957,6 +960,9 @@ public:
+@@ -953,6 +956,9 @@ public:
__init(__s, __n);
}
@@ -46,7 +46,7 @@ index 123e1d6..57624c7 100644
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string(const _CharT* __s, size_type __n, const _Allocator& __a)
: __r_(__default_init_tag(), __a) {
-@@ -1120,7 +1126,7 @@ public:
+@@ -1111,7 +1117,7 @@ public:
#endif
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
basic_string& operator=(const value_type* __s) {return assign(__s);}
@@ -55,7 +55,7 @@ index 123e1d6..57624c7 100644
basic_string& operator=(nullptr_t) = delete;
#endif
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(value_type __c);
-@@ -1182,6 +1188,13 @@ public:
+@@ -1173,6 +1179,13 @@ public:
return (__is_long() ? __get_long_cap() : static_cast<size_type>(__min_cap)) - 1;
}
@@ -69,7 +69,7 @@ index 123e1d6..57624c7 100644
_LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __n, value_type __c);
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void resize(size_type __n) { resize(__n, value_type()); }
-@@ -1701,7 +1714,7 @@ public:
+@@ -1706,7 +1719,7 @@ public:
{ return ends_with(__self_view(__s)); }
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/patches/65-string-iterator-pointer.patch b/contrib/libs/cxxsupp/libcxx/patches/65-string-iterator-pointer.patch
index f0fc358b91..08ac3b9d87 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/65-string-iterator-pointer.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/65-string-iterator-pointer.patch
@@ -1,5 +1,5 @@
diff --git a/include/string b/include/string
-index 57624c7..6550f5b 100644
+index 0ff5802..7320cf1 100644
--- a/include/string
+++ b/include/string
@@ -730,9 +730,14 @@ public:
@@ -17,7 +17,7 @@ index 57624c7..6550f5b 100644
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-@@ -1131,6 +1136,7 @@ public:
+@@ -1122,6 +1127,7 @@ public:
#endif
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& operator=(value_type __c);
@@ -25,7 +25,7 @@ index 57624c7..6550f5b 100644
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
iterator begin() _NOEXCEPT
{return __make_iterator(__get_pointer());}
-@@ -1143,6 +1149,22 @@ public:
+@@ -1134,6 +1140,22 @@ public:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
const_iterator end() const _NOEXCEPT
{return __make_const_iterator(__get_pointer() + size());}
diff --git a/contrib/libs/cxxsupp/libcxx/patches/68-asan-contiguous-container.patch b/contrib/libs/cxxsupp/libcxx/patches/68-asan-contiguous-container.patch
index 4845273a97..290678ca70 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/68-asan-contiguous-container.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/68-asan-contiguous-container.patch
@@ -1,8 +1,8 @@
diff --git a/include/__config b/include/__config
-index 3b1c3a6..0b4f9ef 100644
+index 6e3b0e3..c0af95d 100644
--- a/include/__config
+++ b/include/__config
-@@ -1063,7 +1063,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
+@@ -1062,7 +1062,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
# ifndef _LIBCPP_HAS_NO_ASAN
extern "C" _LIBCPP_EXPORTED_FROM_ABI void
__sanitizer_annotate_contiguous_container(const void*, const void*, const void*, const void*);
diff --git a/contrib/libs/cxxsupp/libcxx/patches/xxx-config-epilogue.patch b/contrib/libs/cxxsupp/libcxx/patches/xxx-config-epilogue.patch
index 6856fd613b..76711ef036 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/xxx-config-epilogue.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/xxx-config-epilogue.patch
@@ -1,8 +1,8 @@
diff --git a/include/__config b/include/__config
-index 0b4f9ef..f804928 100644
+index c0af95d..4856162 100644
--- a/include/__config
+++ b/include/__config
-@@ -1517,4 +1517,7 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
+@@ -1516,4 +1516,7 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
#endif // __cplusplus
diff --git a/contrib/libs/cxxsupp/libcxx/patches/yyy-enable-std-expected.patch b/contrib/libs/cxxsupp/libcxx/patches/yyy-enable-std-expected.patch
index 0e2e9e1220..b0626579ba 100644
--- a/contrib/libs/cxxsupp/libcxx/patches/yyy-enable-std-expected.patch
+++ b/contrib/libs/cxxsupp/libcxx/patches/yyy-enable-std-expected.patch
@@ -12,7 +12,7 @@ index 27f01d9..174f97f 100644
_LIBCPP_BEGIN_NAMESPACE_STD
diff --git a/include/__expected/expected.h b/include/__expected/expected.h
-index 045370a..3f468fc 100644
+index bf16c8f..3f25e00 100644
--- a/include/__expected/expected.h
+++ b/include/__expected/expected.h
@@ -62,7 +62,7 @@