aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Khalyavin <halyavin@gmail.com>2022-06-24 01:36:20 +0300
committerAndrey Khalyavin <halyavin@gmail.com>2022-06-24 01:36:20 +0300
commit744d10b39ed56155025137ac4a38e11e72ae7d4a (patch)
tree07bcc252ab4cd4b4c92aa5e7e1c90215e11db7c7
parentfd274bd81aff99a065469b0c1a0f581b1d401c79 (diff)
downloadydb-744d10b39ed56155025137ac4a38e11e72ae7d4a.tar.gz
Update libc++ to 8f0b2ac1 (12 Feb 2022).
Notable changes: * use [[no_unique_address]] for field `__base_` in join_view * remove _LIBCPP_HIDE_FROM_ABI from __threading_support functions * remove __functional_base header which is just a set of #include directives * remove unused include in ranges_swap_ranges.h * do not print bools with "c" format. * add noexcept to basic_format_context::arg constructor * add ranges::min_element * add ranges::in_fun_result * add ranges::swap_ranges * add std::vector::reference::operator=(bool) const * replace _LIBCPP_DEBUG with _LIBCPP_DEBUG_LEVEL * fix constexpr in __debug_less * modernize code in compress_pair.h * add permutable concept * cleanup format headers * remove _LIBCPP_ABI_UNSTABLE, we must set _LIBCPP_ABI_VERSION and _LIBCPP_ABI_NAMESPACE outselves now * make some members private in experimental/functional * remove std::nullptr_t emulation in C++03 mode ref:f3c7583f32067a3dd9da42aeb15f1b01d746dc59
-rw-r--r--build/ymake.core.conf2
-rwxr-xr-xcontrib/libs/cxxsupp/libcxx/import2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h25
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h49
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h72
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h69
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__bit_reference10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__config62
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__config_site.in3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__debug10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_args.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_context.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional_base32
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h35
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/auto_ptr.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h149
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__nullptr61
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/access.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__threading_support56
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__wrappers_config3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/algorithm31
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/bitset1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cstddef9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/experimental/__memory1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/experimental/functional29
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/format5
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/iterator25
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/memory9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/module.modulemap9
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/optional6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/stddef.h7
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/system_error1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/thread1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/tuple12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/typeindex12
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/variant11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/vector11
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/version23
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/support/win32/locale_win32.cpp3
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/support/win32/support.cpp6
52 files changed, 501 insertions, 416 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 1501935bac..95de9b5d95 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -9,7 +9,7 @@
FAKEID=3141592653
SANDBOX_FAKEID=${FAKEID}.7600000
-CPP_FAKEID=9517719
+CPP_FAKEID=9563524
GO_FAKEID=9478151
ANDROID_FAKEID=8821472
CLANG_TIDY_FAKEID=8625699
diff --git a/contrib/libs/cxxsupp/libcxx/import b/contrib/libs/cxxsupp/libcxx/import
index 96ad7ad7a7..c8f540c7e6 100755
--- a/contrib/libs/cxxsupp/libcxx/import
+++ b/contrib/libs/cxxsupp/libcxx/import
@@ -1,6 +1,6 @@
#!/bin/sh -e
-rev=24c12bfb
+rev=8f0b2ac1
output_dir="libcxx-r$rev"
if [ -z $1 ] ; then
git clone https://github.com/llvm/llvm-project.git --no-checkout "$output_dir/tmp"
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
index bb81dd71c8..40526f6efd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
@@ -10,11 +10,8 @@
#define _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
#include <__config>
-
-#ifdef _LIBCPP_DEBUG
-# include <__debug>
-# include <__utility/declval.h>
-#endif
+#include <__debug>
+#include <__utility/declval.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -22,17 +19,15 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifdef _LIBCPP_DEBUG
-
template <class _Compare>
struct __debug_less
{
_Compare &__comp_;
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_AFTER_CXX11
__debug_less(_Compare& __c) : __comp_(__c) {}
template <class _Tp, class _Up>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_AFTER_CXX11
bool operator()(const _Tp& __x, const _Up& __y)
{
bool __r = __comp_(__x, __y);
@@ -42,7 +37,7 @@ struct __debug_less
}
template <class _Tp, class _Up>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_AFTER_CXX11
bool operator()(_Tp& __x, _Up& __y)
{
bool __r = __comp_(__x, __y);
@@ -52,28 +47,28 @@ struct __debug_less
}
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_AFTER_CXX11
inline _LIBCPP_INLINE_VISIBILITY
decltype((void)declval<_Compare&>()(
declval<_LHS const&>(), declval<_RHS const&>()))
__do_compare_assert(int, _LHS & __l, _RHS & __r) {
_LIBCPP_ASSERT(!__comp_(__l, __r),
"Comparator does not induce a strict weak ordering");
+ (void)__l;
+ (void)__r;
}
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
+ _LIBCPP_CONSTEXPR_AFTER_CXX11
inline _LIBCPP_INLINE_VISIBILITY
void __do_compare_assert(long, _LHS &, _RHS &) {}
};
-#endif // _LIBCPP_DEBUG
-
template <class _Comp>
struct __comp_ref_type {
// Pass the comparator by lvalue reference. Or in debug mode, using a
// debugging wrapper that stores a reference.
-#ifndef _LIBCPP_DEBUG
+#if _LIBCPP_DEBUG_LEVEL == 0
typedef _Comp& type;
#else
typedef __debug_less<_Comp> type;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h
new file mode 100644
index 0000000000..d5186e11b7
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/in_fun_result.h
@@ -0,0 +1,49 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
+#define _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifndef _LIBCPP_HAS_NO_CONCEPTS
+
+namespace ranges {
+template <class _Ip, class _Fp>
+struct in_fun_result {
+ _LIBCPP_NO_UNIQUE_ADDRESS _Ip in;
+ _LIBCPP_NO_UNIQUE_ADDRESS _Fp fun;
+
+ template <class _I2, class _F2>
+ requires convertible_to<const _Ip&, _I2> && convertible_to<const _Fp&, _F2>
+ _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_I2, _F2>() const & {
+ return {in, fun};
+ }
+
+ template <class _I2, class _F2>
+ requires convertible_to<_Ip, _I2> && convertible_to<_Fp, _F2>
+ _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_I2, _F2>() && {
+ return {std::move(in), std::move(fun)};
+ }
+};
+} // namespace ranges
+
+#endif // _LIBCPP_HAS_NO_RANGES
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h
new file mode 100644
index 0000000000..2af503dabf
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_min_element.h
@@ -0,0 +1,72 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
+#define _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
+
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__functional/ranges_operations.h>
+#include <__iterator/concepts.h>
+#include <__iterator/projected.h>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/forward.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#ifndef _LIBCPP_HAS_NO_CONCEPTS
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+namespace __min_element {
+struct __fn {
+ template <class _Ip, class _Sp, class _Proj, class _Comp>
+ _LIBCPP_HIDE_FROM_ABI static constexpr
+ _Ip __go(_Ip __first, _Sp __last, _Comp& __comp, _Proj& __proj) {
+ if (__first == __last)
+ return __first;
+
+ _Ip __i = __first;
+ while (++__i != __last)
+ if (std::invoke(__comp, std::invoke(__proj, *__i), std::invoke(__proj, *__first)))
+ __first = __i;
+ return __first;
+ }
+
+ template <forward_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
+ indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ _Ip operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
+ return __go(__first, __last, __comp, __proj);
+ }
+
+ template <forward_range _Rp, class _Proj = identity,
+ indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
+ return __go(ranges::begin(__r), ranges::end(__r), __comp, __proj);
+ }
+};
+} // namespace __min_element
+
+inline namespace __cpo {
+ inline constexpr auto min_element = __min_element::__fn{};
+} // namespace __cpo
+} // namespace ranges
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_HAS_NO_RANGES
+
+#endif // _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h
new file mode 100644
index 0000000000..59a875ae3b
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/ranges_swap_ranges.h
@@ -0,0 +1,69 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
+#define _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
+
+#include <__algorithm/in_in_result.h>
+#include <__config>
+#include <__iterator/concepts.h>
+#include <__iterator/iter_swap.h>
+#include <__ranges/access.h>
+#include <__ranges/concepts.h>
+#include <__ranges/dangling.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#ifndef _LIBCPP_HAS_NO_CONCEPTS
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+
+template <class _I1, class _I2>
+using swap_ranges_result = in_in_result<_I1, _I2>;
+
+namespace __swap_ranges {
+struct __fn {
+ template <input_iterator _I1, sentinel_for<_I1> _S1,
+ input_iterator _I2, sentinel_for<_I2> _S2>
+ requires indirectly_swappable<_I1, _I2>
+ _LIBCPP_HIDE_FROM_ABI constexpr swap_ranges_result<_I1, _I2>
+ operator()(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2) const {
+ while (__first1 != __last1 && __first2 != __last2) {
+ ranges::iter_swap(__first1, __first2);
+ ++__first1;
+ ++__first2;
+ }
+ return {_VSTD::move(__first1), _VSTD::move(__first2)};
+ }
+
+ template <input_range _R1, input_range _R2>
+ requires indirectly_swappable<iterator_t<_R1>, iterator_t<_R2>>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ swap_ranges_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>>
+ operator()(_R1&& __r1, _R2&& __r2) const {
+ return operator()(ranges::begin(__r1), ranges::end(__r1),
+ ranges::begin(__r2), ranges::end(__r2));
+ }
+};
+} // namespace __swap_ranges
+
+inline namespace __cpo {
+ inline constexpr auto swap_ranges = __swap_ranges::__fn{};
+} // namespace __cpo
+} // namespace ranges
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_HAS_NO_RANGES
+
+#endif // _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h
index b17ee896b1..0422265bb4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/swap_ranges.h
@@ -11,7 +11,6 @@
#include <__config>
#include <__utility/swap.h>
-#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__bit_reference b/contrib/libs/cxxsupp/libcxx/include/__bit_reference
index ef4ad6bd0f..23e7ad9bb0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__bit_reference
+++ b/contrib/libs/cxxsupp/libcxx/include/__bit_reference
@@ -65,6 +65,16 @@ public:
return *this;
}
+#if _LIBCPP_STD_VER > 20
+ _LIBCPP_HIDE_FROM_ABI const __bit_reference& operator=(bool __x) const noexcept {
+ if (__x)
+ *__seg_ |= __mask_;
+ else
+ *__seg_ &= ~__mask_;
+ return *this;
+ }
+#endif
+
_LIBCPP_INLINE_VISIBILITY
__bit_reference& operator=(const __bit_reference& __x) _NOEXCEPT
{return operator=(static_cast<bool>(__x));}
diff --git a/contrib/libs/cxxsupp/libcxx/include/__config b/contrib/libs/cxxsupp/libcxx/include/__config
index e62fe2efd6..17792f64c9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__config
+++ b/contrib/libs/cxxsupp/libcxx/include/__config
@@ -52,14 +52,6 @@
#define _LIBCPP_VERSION 15000
-#ifdef _LIBCPP_ABI_UNSTABLE
-# define _LIBCPP_ABI_VERSION 2
-#endif
-
-#ifndef _LIBCPP_ABI_VERSION
-# define _LIBCPP_ABI_VERSION 1
-#endif
-
#if __STDC_HOSTED__ == 0
# define _LIBCPP_FREESTANDING
#endif
@@ -164,23 +156,6 @@
# endif
#endif
-// By default, don't use a nullptr_t emulation type in C++03.
-//
-// This is technically an ABI break from previous releases, however it is
-// very unlikely to impact anyone. If a user is impacted by this break,
-// they can return to using the C++03 nullptr emulation by defining
-// _LIBCPP_ABI_USE_CXX03_NULLPTR_EMULATION.
-//
-// This switch will be removed entirely in favour of never providing a
-// C++03 emulation after one release.
-//
-// IMPORTANT: IF YOU ARE READING THIS AND YOU TURN THIS MACRO ON, PLEASE LEAVE
-// A COMMENT ON https://reviews.llvm.org/D109459 OR YOU WILL BE BROKEN
-// IN THE FUTURE WHEN WE REMOVE THE ABILITY TO USE THE C++03 EMULATION.
-#ifndef _LIBCPP_ABI_USE_CXX03_NULLPTR_EMULATION
-# define _LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR
-#endif
-
#if defined(_LIBCPP_BUILDING_LIBRARY) || _LIBCPP_ABI_VERSION >= 2
// Enable additional explicit instantiations of iostreams components. This
// reduces the number of weak definitions generated in programs that use
@@ -193,13 +168,6 @@
# define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
#endif
-#define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y
-#define _LIBCPP_CONCAT(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y)
-
-#ifndef _LIBCPP_ABI_NAMESPACE
-# define _LIBCPP_ABI_NAMESPACE _LIBCPP_CONCAT(__y,_LIBCPP_ABI_VERSION)
-#endif
-
#if __cplusplus < 201103L && !defined(_LIBCPP_COMPILER_MSVC)
#define _LIBCPP_CXX03_LANG
#endif
@@ -546,12 +514,8 @@ typedef __char32_t char32_t;
# define _LIBCPP_NORETURN __attribute__ ((noreturn))
#endif
-#if !(__has_feature(cxx_nullptr))
-# if (__has_extension(cxx_nullptr) || __has_keyword(__nullptr)) && defined(_LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR)
-# define nullptr __nullptr
-# else
-# define _LIBCPP_HAS_NO_NULLPTR
-# endif
+#ifdef _LIBCPP_CXX03_LANG
+# define nullptr __nullptr
#endif
// Objective-C++ features (opt-in)
@@ -1524,6 +1488,28 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container(
// the ABI inconsistent.
#endif
+#if __has_cpp_attribute(msvc::no_unique_address)
+ // MSVC implements [[no_unique_address]] as a silent no-op currently.
+ // (If/when MSVC breaks its C++ ABI, it will be changed to work as intended.)
+ // However, MSVC implements [[msvc::no_unique_address]] which does what
+ // [[no_unique_address]] is supposed to do, in general.
+
+ // Clang-cl does not yet (14.0) implement either [[no_unique_address]] or
+ // [[msvc::no_unique_address]] though. If/when it does implement
+ // [[msvc::no_unique_address]], this should be preferred though.
+# define _LIBCPP_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
+#elif __has_cpp_attribute(no_unique_address)
+# define _LIBCPP_NO_UNIQUE_ADDRESS [[no_unique_address]]
+#else
+# define _LIBCPP_NO_UNIQUE_ADDRESS /* nothing */
+ // Note that this can be replaced by #error as soon as clang-cl
+ // implements msvc::no_unique_address, since there should be no C++20
+ // compiler that doesn't support one of the two attributes at that point.
+ // We geenrally don't want to use this macro outside of C++20-only code,
+ // because using it conditionally in one language version only would make
+ // the ABI inconsistent.
+#endif
+
#endif // __cplusplus
#endif // _LIBCPP_CONFIG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__config_site.in b/contrib/libs/cxxsupp/libcxx/include/__config_site.in
index 59ca229812..a1a08a5ee0 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__config_site.in
+++ b/contrib/libs/cxxsupp/libcxx/include/__config_site.in
@@ -10,7 +10,7 @@
#define _LIBCPP_CONFIG_SITE
#cmakedefine _LIBCPP_ABI_VERSION @_LIBCPP_ABI_VERSION@
-#cmakedefine _LIBCPP_ABI_UNSTABLE
+#cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
#cmakedefine _LIBCPP_ABI_FORCE_ITANIUM
#cmakedefine _LIBCPP_ABI_FORCE_MICROSOFT
#cmakedefine _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT
@@ -25,7 +25,6 @@
#cmakedefine _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
#cmakedefine _LIBCPP_NO_VCRUNTIME
#cmakedefine _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION @_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION@
-#cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
#cmakedefine _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
#cmakedefine _LIBCPP_HAS_PARALLEL_ALGORITHMS
#cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE
diff --git a/contrib/libs/cxxsupp/libcxx/include/__debug b/contrib/libs/cxxsupp/libcxx/include/__debug
index ce78cb281c..5d0b5bf57f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__debug
+++ b/contrib/libs/cxxsupp/libcxx/include/__debug
@@ -18,10 +18,6 @@
# pragma GCC system_header
#endif
-#if defined(_LIBCPP_HAS_NO_NULLPTR)
-# include <cstddef>
-#endif
-
#if _LIBCPP_DEBUG_LEVEL >= 1 || defined(_LIBCPP_BUILDING_LIBRARY)
# include <cstddef>
# include <cstdio>
@@ -33,10 +29,10 @@
# define _LIBCPP_ASSERT_IMPL(x, m) ((void)0)
#elif _LIBCPP_DEBUG_LEVEL == 1
# define _LIBCPP_DEBUG_ASSERT(x, m) ((void)0)
-# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
+# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : ::std::__libcpp_debug_function(::std::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
#elif _LIBCPP_DEBUG_LEVEL == 2
-# define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(__libcpp_is_constant_evaluated() || (x), m)
-# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : _VSTD::__libcpp_debug_function(_VSTD::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
+# define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(::std::__libcpp_is_constant_evaluated() || (x), m)
+# define _LIBCPP_ASSERT_IMPL(x, m) ((x) ? (void)0 : ::std::__libcpp_debug_function(::std::__libcpp_debug_info(__FILE__, __LINE__, #x, m)))
#else
# error _LIBCPP_DEBUG_LEVEL must be one of 0, 1, 2
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
index f0167a66e0..df08e93d2e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_arg.h
@@ -15,7 +15,6 @@
#include <__format/format_error.h>
#include <__format/format_fwd.h>
#include <__format/format_parse_context.h>
-#include <__functional_base>
#include <__memory/addressof.h>
#include <__variant/monostate.h>
#include <string>
@@ -25,9 +24,6 @@
# pragma GCC system_header
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
@@ -287,6 +283,4 @@ private:
_LIBCPP_END_NAMESPACE_STD
-_LIBCPP_POP_MACROS
-
#endif // _LIBCPP___FORMAT_FORMAT_ARG_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
index fc493c276c..2739d1131b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_args.h
@@ -19,9 +19,6 @@
# pragma GCC system_header
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
@@ -66,6 +63,4 @@ private:
_LIBCPP_END_NAMESPACE_STD
-_LIBCPP_POP_MACROS
-
#endif // _LIBCPP___FORMAT_FORMAT_ARGS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
index 4c1d932e70..d4bc35decd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_context.h
@@ -27,9 +27,6 @@
# pragma GCC system_header
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
@@ -101,7 +98,7 @@ public:
basic_format_context& operator=(const basic_format_context&) = delete;
_LIBCPP_HIDE_FROM_ABI basic_format_arg<basic_format_context>
- arg(size_t __id) const {
+ arg(size_t __id) const noexcept {
return __args_.get(__id);
}
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
@@ -160,6 +157,4 @@ private:
_LIBCPP_END_NAMESPACE_STD
-_LIBCPP_POP_MACROS
-
#endif // _LIBCPP___FORMAT_FORMAT_CONTEXT_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h b/contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h
index c89757a4fd..9421aa8788 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/format_fwd.h
@@ -12,16 +12,11 @@
#include <__availability>
#include <__config>
-#include <__iterator/concepts.h>
-#include <__utility/forward.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
@@ -38,10 +33,6 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg;
template <class _Context, class... _Args>
struct _LIBCPP_TEMPLATE_VIS __format_arg_store;
-template <class _Ctx, class... _Args>
-_LIBCPP_HIDE_FROM_ABI __format_arg_store<_Ctx, _Args...>
-make_format_args(const _Args&...);
-
template <class _Tp, class _CharT = char>
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter;
@@ -51,6 +42,4 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter;
_LIBCPP_END_NAMESPACE_STD
-_LIBCPP_POP_MACROS
-
#endif // _LIBCPP___FORMAT_FORMAT_FWD_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
index 67bacb6016..1d4c8fc91f 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter.h
@@ -18,16 +18,12 @@
#include <__format/format_fwd.h>
#include <__format/format_string.h>
#include <__format/parser_std_format_spec.h>
-#include <concepts>
#include <string_view>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
@@ -285,6 +281,4 @@ __write_unicode(output_iterator<const _CharT&> auto __out_it,
_LIBCPP_END_NAMESPACE_STD
-_LIBCPP_POP_MACROS
-
#endif // _LIBCPP___FORMAT_FORMATTER_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
index 52d5224a15..f428683657 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_bool.h
@@ -54,10 +54,6 @@ public:
this->__handle_bool();
break;
- case _Flags::_Type::__char:
- this->__handle_char();
- break;
-
case _Flags::_Type::__binary_lower_case:
case _Flags::_Type::__binary_upper_case:
case _Flags::_Type::__octal:
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
index aa2eb641c6..15b6764000 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_pointer.h
@@ -20,7 +20,6 @@
#include <__format/formatter_integral.h>
#include <__format/parser_std_format_spec.h>
#include <__iterator/access.h>
-#include <__nullptr>
#include <cstdint>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
index e5af5ff8d5..01e2bafda4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__format/formatter_string.h
@@ -22,9 +22,6 @@
# pragma GCC system_header
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
@@ -157,6 +154,4 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string_v
_LIBCPP_END_NAMESPACE_STD
-_LIBCPP_POP_MACROS
-
#endif // _LIBCPP___FORMAT_FORMATTER_STRING_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional_base b/contrib/libs/cxxsupp/libcxx/include/__functional_base
deleted file mode 100644
index caa3d7fd86..0000000000
--- a/contrib/libs/cxxsupp/libcxx/include/__functional_base
+++ /dev/null
@@ -1,32 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_FUNCTIONAL_BASE
-#define _LIBCPP_FUNCTIONAL_BASE
-
-#include <__config>
-#include <__functional/binary_function.h>
-#include <__functional/invoke.h>
-#include <__functional/operations.h>
-#include <__functional/reference_wrapper.h>
-#include <__functional/unary_function.h>
-#include <__functional/weak_result_type.h>
-#include <__memory/allocator_arg_t.h>
-#include <__memory/uses_allocator.h>
-#include <exception>
-#include <new>
-#include <type_traits>
-#include <typeinfo>
-#include <utility>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-#endif
-
-#endif // _LIBCPP_FUNCTIONAL_BASE
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h
new file mode 100644
index 0000000000..85834a23c8
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/permutable.h
@@ -0,0 +1,35 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___ITERATOR_PERMUTABLE_H
+#define _LIBCPP___ITERATOR_PERMUTABLE_H
+
+#include <__config>
+#include <__iterator/concepts.h>
+#include <__iterator/iter_swap.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
+
+template <class _Iterator>
+concept permutable =
+ forward_iterator<_Iterator> &&
+ indirectly_movable_storable<_Iterator, _Iterator> &&
+ indirectly_swappable<_Iterator, _Iterator>;
+
+#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ITERATOR_PERMUTABLE_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/auto_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/auto_ptr.h
index a244aaa047..163a46b631 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/auto_ptr.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/auto_ptr.h
@@ -11,7 +11,6 @@
#define _LIBCPP___MEMORY_AUTO_PTR_H
#include <__config>
-#include <__nullptr>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h b/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
index 4cd1910267..852031f17d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/compressed_pair.h
@@ -26,40 +26,28 @@ _LIBCPP_BEGIN_NAMESPACE_STD
struct __default_init_tag {};
struct __value_init_tag {};
-template <class _Tp, int _Idx,
- bool _CanBeEmptyBase =
- is_empty<_Tp>::value && !__libcpp_is_final<_Tp>::value>
+template <class _Tp, int _Idx, bool _CanBeEmptyBase = is_empty<_Tp>::value && !__libcpp_is_final<_Tp>::value>
struct __compressed_pair_elem {
- typedef _Tp _ParamT;
- typedef _Tp& reference;
- typedef const _Tp& const_reference;
-
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- __compressed_pair_elem(__default_init_tag) {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- __compressed_pair_elem(__value_init_tag) : __value_() {}
-
- template <class _Up, class = typename enable_if<
- !is_same<__compressed_pair_elem, typename decay<_Up>::type>::value
- >::type>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR explicit
- __compressed_pair_elem(_Up&& __u)
- : __value_(_VSTD::forward<_Up>(__u))
- {
- }
+ using _ParamT = _Tp;
+ 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_() {}
+
+ 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)) {}
#ifndef _LIBCPP_CXX03_LANG
- template <class... _Args, size_t... _Indexes>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
- __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args,
- __tuple_indices<_Indexes...>)
- : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
+ 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...>)
+ : __value_(std::forward<_Args>(std::get<_Indices>(__args))...) {}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return __value_; }
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return __value_; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return __value_; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return __value_; }
private:
_Tp __value_;
@@ -67,36 +55,28 @@ private:
template <class _Tp, int _Idx>
struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
- typedef _Tp _ParamT;
- typedef _Tp& reference;
- typedef const _Tp& const_reference;
- typedef _Tp __value_type;
-
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __compressed_pair_elem() = default;
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- __compressed_pair_elem(__default_init_tag) {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- __compressed_pair_elem(__value_init_tag) : __value_type() {}
-
- template <class _Up, class = typename enable_if<
- !is_same<__compressed_pair_elem, typename decay<_Up>::type>::value
- >::type>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR explicit
- __compressed_pair_elem(_Up&& __u)
- : __value_type(_VSTD::forward<_Up>(__u))
- {}
+ using _ParamT = _Tp;
+ using reference = _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() {}
+
+ 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_type(std::forward<_Up>(__u)) {}
#ifndef _LIBCPP_CXX03_LANG
- template <class... _Args, size_t... _Indexes>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
- __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args,
- __tuple_indices<_Indexes...>)
- : __value_type(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
+ 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...>)
+ : __value_type(std::forward<_Args>(std::get<_Indices>(__args))...) {}
#endif
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return *this; }
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return *this; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return *this; }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return *this; }
};
template <class _T1, class _T2>
@@ -109,72 +89,73 @@ public:
// object and the allocator have the same type).
static_assert((!is_same<_T1, _T2>::value),
"__compressed_pair cannot be instantiated when T1 and T2 are the same type; "
- "The current implementation is NOT ABI-compatible with the previous "
- "implementation for this configuration");
+ "The current implementation is NOT ABI-compatible with the previous implementation for this configuration");
- typedef _LIBCPP_NODEBUG __compressed_pair_elem<_T1, 0> _Base1;
- typedef _LIBCPP_NODEBUG __compressed_pair_elem<_T2, 1> _Base2;
+ using _Base1 _LIBCPP_NODEBUG = __compressed_pair_elem<_T1, 0>;
+ using _Base2 _LIBCPP_NODEBUG = __compressed_pair_elem<_T2, 1>;
- template <bool _Dummy = true,
- class = typename enable_if<
- __dependent_type<is_default_constructible<_T1>, _Dummy>::value &&
- __dependent_type<is_default_constructible<_T2>, _Dummy>::value
- >::type
+ template <bool _Dummy = true,
+ class = __enable_if_t<
+ __dependent_type<is_default_constructible<_T1>, _Dummy>::value &&
+ __dependent_type<is_default_constructible<_T2>, _Dummy>::value
+ >
>
- _LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+ __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}
template <class _U1, class _U2>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- __compressed_pair(_U1&& __t1, _U2&& __t2)
- : _Base1(_VSTD::forward<_U1>(__t1)), _Base2(_VSTD::forward<_U2>(__t2)) {}
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+ __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_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
__compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
tuple<_Args2...> __second_args)
- : _Base1(__pc, _VSTD::move(__first_args),
- typename __make_tuple_indices<sizeof...(_Args1)>::type()),
- _Base2(__pc, _VSTD::move(__second_args),
- typename __make_tuple_indices<sizeof...(_Args2)>::type()) {}
+ : _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
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 typename _Base1::reference first() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ typename _Base1::reference first() _NOEXCEPT {
return static_cast<_Base1&>(*this).__get();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename _Base1::const_reference first() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+ typename _Base1::const_reference first() const _NOEXCEPT {
return static_cast<_Base1 const&>(*this).__get();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 typename _Base2::reference second() _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ typename _Base2::reference second() _NOEXCEPT {
return static_cast<_Base2&>(*this).__get();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename _Base2::const_reference second() const _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+ typename _Base2::const_reference second() const _NOEXCEPT {
return static_cast<_Base2 const&>(*this).__get();
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- static _Base1* __get_first_base(__compressed_pair* __pair) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+ _Base1* __get_first_base(__compressed_pair* __pair) _NOEXCEPT {
return static_cast<_Base1*>(__pair);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- static _Base2* __get_second_base(__compressed_pair* __pair) _NOEXCEPT {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+ _Base2* __get_second_base(__compressed_pair* __pair) _NOEXCEPT {
return static_cast<_Base2*>(__pair);
}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 void swap(__compressed_pair& __x)
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+ void swap(__compressed_pair& __x)
_NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
- using _VSTD::swap;
+ using std::swap;
swap(first(), __x.first());
swap(second(), __x.second());
}
};
template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
void swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
_NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
__x.swap(__y);
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
index 926a3c4bed..828513a295 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h
@@ -15,7 +15,6 @@
#include <__functional/binary_function.h>
#include <__functional/operations.h>
#include <__functional/reference_wrapper.h>
-#include <__functional_base>
#include <__memory/addressof.h>
#include <__memory/allocation_guard.h>
#include <__memory/allocator.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
index 0be0ad146c..ac589452aa 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__memory/unique_ptr.h
@@ -13,7 +13,6 @@
#include <__config>
#include <__functional/hash.h>
#include <__functional/operations.h>
-#include <__functional_base>
#include <__memory/allocator_traits.h> // __pointer
#include <__memory/compressed_pair.h>
#include <__utility/forward.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__nullptr b/contrib/libs/cxxsupp/libcxx/include/__nullptr
deleted file mode 100644
index 73f0722058..0000000000
--- a/contrib/libs/cxxsupp/libcxx/include/__nullptr
+++ /dev/null
@@ -1,61 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _LIBCPP_NULLPTR
-#define _LIBCPP_NULLPTR
-
-#include <__config>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-#endif
-
-#ifdef _LIBCPP_HAS_NO_NULLPTR
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-struct _LIBCPP_TEMPLATE_VIS nullptr_t
-{
- void* __lx;
-
- struct __nat {int __for_bool_;};
-
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR nullptr_t() : __lx(0) {}
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR nullptr_t(int __nat::*) : __lx(0) {}
-
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator int __nat::*() const {return 0;}
-
- template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
- operator _Tp* () const {return 0;}
-
- template <class _Tp, class _Up>
- _LIBCPP_INLINE_VISIBILITY
- operator _Tp _Up::* () const {return 0;}
-
- friend _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator==(nullptr_t, nullptr_t) {return true;}
- friend _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bool operator!=(nullptr_t, nullptr_t) {return false;}
-};
-
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR nullptr_t __get_nullptr_t() {return nullptr_t(0);}
-
-#define nullptr _VSTD::__get_nullptr_t()
-
-_LIBCPP_END_NAMESPACE_STD
-
-#else // _LIBCPP_HAS_NO_NULLPTR
-
-namespace std
-{
- typedef decltype(nullptr) nullptr_t;
-} // namespace std
-
-#endif // _LIBCPP_HAS_NO_NULLPTR
-
-#endif // _LIBCPP_NULLPTR
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
index 168e0304f5..5b623c1e4a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/access.h
@@ -14,7 +14,6 @@
#include <__iterator/concepts.h>
#include <__iterator/readable_traits.h>
#include <__ranges/enable_borrowed_range.h>
-#include <__utility/as_const.h>
#include <__utility/auto_cast.h>
#include <concepts>
#include <type_traits>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h b/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
index 1af2221336..4bab8dfeec 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__ranges/join_view.h
@@ -68,7 +68,7 @@ namespace ranges {
static constexpr bool _UseCache = !is_reference_v<_InnerRange>;
using _Cache = _If<_UseCache, __non_propagating_cache<remove_cvref_t<_InnerRange>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _Cache __cache_;
- _View __base_ = _View(); // TODO: [[no_unique_address]] makes clang crash! File a bug :)
+ _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
public:
_LIBCPP_HIDE_FROM_ABI
diff --git a/contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h b/contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h
index 69491bf746..8456b0564d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__support/win32/locale_win32.h
@@ -11,7 +11,7 @@
#define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
#include <__config>
-#include <__nullptr>
+#include <cstddef>
#include <locale.h> // _locale_t
#include <stdio.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__threading_support b/contrib/libs/cxxsupp/libcxx/include/__threading_support
index cad9d5713f..d2b84c1322 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__threading_support
+++ b/contrib/libs/cxxsupp/libcxx/include/__threading_support
@@ -256,7 +256,6 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);
#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
{
pthread_mutexattr_t attr;
@@ -281,88 +280,74 @@ int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
return 0;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
{
return pthread_mutex_lock(__m);
}
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
{
return pthread_mutex_trylock(__m) == 0;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m)
{
return pthread_mutex_unlock(__m);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m)
{
return pthread_mutex_destroy(__m);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
{
return pthread_mutex_lock(__m);
}
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
{
return pthread_mutex_trylock(__m) == 0;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
{
return pthread_mutex_unlock(__m);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
{
return pthread_mutex_destroy(__m);
}
// Condition Variable
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_signal(__libcpp_condvar_t *__cv)
{
return pthread_cond_signal(__cv);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv)
{
return pthread_cond_broadcast(__cv);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
{
return pthread_cond_wait(__cv, __m);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
__libcpp_timespec_t *__ts)
{
return pthread_cond_timedwait(__cv, __m, __ts);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
{
return pthread_cond_destroy(__cv);
}
// Execute once
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
void (*init_routine)()) {
return pthread_once(flag, init_routine);
@@ -370,40 +355,34 @@ int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
// Thread id
// Returns non-zero if the thread ids are equal, otherwise 0
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2)
{
return t1 == t2;
}
// Returns non-zero if t1 < t2, otherwise 0
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2)
{
return t1 < t2;
}
// Thread
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
return __libcpp_thread_get_id(__t) == 0;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
void *__arg)
{
return pthread_create(__t, nullptr, __func, __arg);
}
-_LIBCPP_HIDE_FROM_ABI inline
__libcpp_thread_id __libcpp_thread_get_current_id()
{
const __libcpp_thread_t thread = pthread_self();
return __libcpp_thread_get_id(&thread);
}
-_LIBCPP_HIDE_FROM_ABI inline
__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
{
#if defined(__MVS__)
@@ -413,25 +392,21 @@ __libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
#endif
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_thread_join(__libcpp_thread_t *__t)
{
return pthread_join(*__t, nullptr);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_thread_detach(__libcpp_thread_t *__t)
{
return pthread_detach(*__t);
}
-_LIBCPP_HIDE_FROM_ABI inline
void __libcpp_thread_yield()
{
sched_yield();
}
-_LIBCPP_HIDE_FROM_ABI inline
void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
{
__libcpp_timespec_t __ts = _VSTD::__convert_to_timespec<__libcpp_timespec_t>(__ns);
@@ -439,19 +414,16 @@ void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
}
// Thread local storage
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
{
return pthread_key_create(__key, __at_exit);
}
-_LIBCPP_HIDE_FROM_ABI inline
void *__libcpp_tls_get(__libcpp_tls_key __key)
{
return pthread_getspecific(__key);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
{
return pthread_setspecific(__key, __p);
@@ -459,56 +431,47 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
#elif defined(_LIBCPP_HAS_THREAD_API_C11)
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
{
return mtx_init(__m, mtx_plain | mtx_recursive) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
{
return mtx_lock(__m) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
{
return mtx_trylock(__m) == thrd_success;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m)
{
return mtx_unlock(__m) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m)
{
mtx_destroy(__m);
return 0;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
{
return mtx_lock(__m) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
{
return mtx_trylock(__m) == thrd_success;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
{
return mtx_unlock(__m) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
{
mtx_destroy(__m);
@@ -516,25 +479,21 @@ int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
}
// Condition Variable
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_signal(__libcpp_condvar_t *__cv)
{
return cnd_signal(__cv) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv)
{
return cnd_broadcast(__cv) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
{
return cnd_wait(__cv, __m) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
timespec *__ts)
{
@@ -542,7 +501,6 @@ int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
return __ec == thrd_timedout ? ETIMEDOUT : __ec;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
{
cnd_destroy(__cv);
@@ -550,7 +508,6 @@ int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
}
// Execute once
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
void (*init_routine)(void)) {
::call_once(flag, init_routine);
@@ -559,26 +516,22 @@ int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
// Thread id
// Returns non-zero if the thread ids are equal, otherwise 0
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2)
{
return thrd_equal(t1, t2) != 0;
}
// Returns non-zero if t1 < t2, otherwise 0
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2)
{
return t1 < t2;
}
// Thread
-_LIBCPP_HIDE_FROM_ABI inline
bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
return __libcpp_thread_get_id(__t) == 0;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
void *__arg)
{
@@ -586,37 +539,31 @@ int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
return __ec == thrd_nomem ? ENOMEM : __ec;
}
-_LIBCPP_HIDE_FROM_ABI inline
__libcpp_thread_id __libcpp_thread_get_current_id()
{
return thrd_current();
}
-_LIBCPP_HIDE_FROM_ABI inline
__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
{
return *__t;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_thread_join(__libcpp_thread_t *__t)
{
return thrd_join(*__t, nullptr) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_thread_detach(__libcpp_thread_t *__t)
{
return thrd_detach(*__t) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
void __libcpp_thread_yield()
{
thrd_yield();
}
-_LIBCPP_HIDE_FROM_ABI inline
void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
{
__libcpp_timespec_t __ts = _VSTD::__convert_to_timespec<__libcpp_timespec_t>(__ns);
@@ -624,19 +571,16 @@ void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
}
// Thread local storage
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
{
return tss_create(__key, __at_exit) == thrd_success ? 0 : EINVAL;
}
-_LIBCPP_HIDE_FROM_ABI inline
void *__libcpp_tls_get(__libcpp_tls_key __key)
{
return tss_get(__key);
}
-_LIBCPP_HIDE_FROM_ABI inline
int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
{
return tss_set(__key, __p) == thrd_success ? 0 : EINVAL;
diff --git a/contrib/libs/cxxsupp/libcxx/include/__wrappers_config b/contrib/libs/cxxsupp/libcxx/include/__wrappers_config
index 934e7c9279..33e8c986ed 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__wrappers_config
+++ b/contrib/libs/cxxsupp/libcxx/include/__wrappers_config
@@ -1,5 +1,8 @@
#pragma once
+#define _LIBCPP_ABI_VERSION 1
+#define _LIBCPP_ABI_NAMESPACE __y1
+
#if !defined(NDEBUG) && !defined(_LIBCPP_DEBUG)
# define _LIBCPP_DEBUG 0
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/algorithm b/contrib/libs/cxxsupp/libcxx/include/algorithm
index 2537e882a1..e4aba31567 100644
--- a/contrib/libs/cxxsupp/libcxx/include/algorithm
+++ b/contrib/libs/cxxsupp/libcxx/include/algorithm
@@ -19,6 +19,9 @@ namespace std
{
namespace ranges {
+ template <class I, class F>
+ struct in_fun_result; // since C++20
+
template <class I1, class I2>
struct in_in_result; // since C++20
@@ -27,6 +30,14 @@ namespace ranges {
template <class I, class O1, class O2>
struct in_out_out_result; // since C++20
+
+ template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
+ indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> // since C++20
+ constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {});
+
+ template<forward_range R, class Proj = identity,
+ indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> // since C++20
+ constexpr borrowed_iterator_t<R> min_element(R&& r, Comp comp = {}, Proj proj = {});
}
template <class InputIterator, class Predicate>
@@ -199,6 +210,16 @@ template <class ForwardIterator1, class ForwardIterator2>
constexpr ForwardIterator2 // constexpr in C++20
swap_ranges(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2);
+template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2>
+ requires indirectly_swappable<I1, I2>
+ constexpr ranges::swap_ranges_result<I1, I2>
+ ranges::swap_ranges(I1 first1, S1 last1, I2 first2, S2 last2);
+
+template<input_range R1, input_range R2>
+ requires indirectly_swappable<iterator_t<R1>, iterator_t<R2>>
+ constexpr ranges::swap_ranges_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>>
+ ranges::swap_ranges(R1&& r1, R2&& r2);
+
template <class ForwardIterator1, class ForwardIterator2>
constexpr void // constexpr in C++20
iter_swap(ForwardIterator1 a, ForwardIterator2 b);
@@ -651,13 +672,6 @@ template <class BidirectionalIterator>
template <class BidirectionalIterator, class Compare>
constexpr bool // constexpr in C++20
prev_permutation(BidirectionalIterator first, BidirectionalIterator last, Compare comp);
-
-namespace ranges {
-// [algorithms.results], algorithm result types
-template<class InputIterator, class OutputIterator>
- struct in_out_result;
-}
-
} // std
*/
@@ -702,6 +716,7 @@ template<class InputIterator, class OutputIterator>
#include <__algorithm/generate.h>
#include <__algorithm/generate_n.h>
#include <__algorithm/half_positive.h>
+#include <__algorithm/in_fun_result.h>
#include <__algorithm/in_in_out_result.h>
#include <__algorithm/in_in_result.h>
#include <__algorithm/in_out_out_result.h>
@@ -739,6 +754,8 @@ template<class InputIterator, class OutputIterator>
#include <__algorithm/pop_heap.h>
#include <__algorithm/prev_permutation.h>
#include <__algorithm/push_heap.h>
+#include <__algorithm/ranges_min_element.h>
+#include <__algorithm/ranges_swap_ranges.h>
#include <__algorithm/remove.h>
#include <__algorithm/remove_copy.h>
#include <__algorithm/remove_copy_if.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/bitset b/contrib/libs/cxxsupp/libcxx/include/bitset
index 38d90104db..2930d43e38 100644
--- a/contrib/libs/cxxsupp/libcxx/include/bitset
+++ b/contrib/libs/cxxsupp/libcxx/include/bitset
@@ -114,7 +114,6 @@ template <size_t N> struct hash<std::bitset<N>>;
#include <__bit_reference>
#include <__config>
-#include <__functional_base>
#include <climits>
#include <cstddef>
#include <iosfwd>
diff --git a/contrib/libs/cxxsupp/libcxx/include/cstddef b/contrib/libs/cxxsupp/libcxx/include/cstddef
index af15ac57fc..5dce7c0dbd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cstddef
+++ b/contrib/libs/cxxsupp/libcxx/include/cstddef
@@ -34,25 +34,20 @@ Types:
*/
#include <__config>
+#include <stddef.h>
#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
-#ifdef _LIBCPP_COMPILER_MSVC
-#include _LIBCPP_UCRT_INCLUDE(stddef.h)
-#else
-#include_next <stddef.h>
-#endif
#ifdef _LIBCPP_ABI_VCRUNTIME
typedef double max_align_t;
#endif
-#include <__nullptr>
_LIBCPP_BEGIN_NAMESPACE_STD
+using ::nullptr_t;
using ::ptrdiff_t _LIBCPP_USING_IF_EXISTS;
using ::size_t _LIBCPP_USING_IF_EXISTS;
diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/__memory b/contrib/libs/cxxsupp/libcxx/include/experimental/__memory
index 40021691d5..749cf4c0c6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/experimental/__memory
+++ b/contrib/libs/cxxsupp/libcxx/include/experimental/__memory
@@ -10,7 +10,6 @@
#ifndef _LIBCPP_EXPERIMENTAL___MEMORY
#define _LIBCPP_EXPERIMENTAL___MEMORY
-#include <__functional_base>
#include <__memory/allocator_arg_t.h>
#include <__memory/uses_allocator.h>
#include <experimental/__config>
diff --git a/contrib/libs/cxxsupp/libcxx/include/experimental/functional b/contrib/libs/cxxsupp/libcxx/include/experimental/functional
index 4e081e8023..de21ab6982 100644
--- a/contrib/libs/cxxsupp/libcxx/include/experimental/functional
+++ b/contrib/libs/cxxsupp/libcxx/include/experimental/functional
@@ -18,29 +18,6 @@
namespace std {
namespace experimental {
inline namespace fundamentals_v1 {
-
- // See C++14 20.9.9, Function object binders
- template <class T> constexpr bool is_bind_expression_v
- = is_bind_expression<T>::value;
- template <class T> constexpr int is_placeholder_v
- = is_placeholder<T>::value;
-
- // 4.2, Class template function
- template<class> class function; // undefined
- template<class R, class... ArgTypes> class function<R(ArgTypes...)>;
-
- template<class R, class... ArgTypes>
- void swap(function<R(ArgTypes...)>&, function<R(ArgTypes...)>&);
-
- template<class R, class... ArgTypes>
- bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
- template<class R, class... ArgTypes>
- bool operator==(nullptr_t, const function<R(ArgTypes...)>&) noexcept;
- template<class R, class... ArgTypes>
- bool operator!=(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
- template<class R, class... ArgTypes>
- bool operator!=(nullptr_t, const function<R(ArgTypes...)>&) noexcept;
-
// 4.3, Searchers
template<class ForwardIterator, class BinaryPredicate = equal_to<>>
class default_searcher;
@@ -79,9 +56,6 @@ inline namespace fundamentals_v1 {
} // namespace fundamentals_v1
} // namespace experimental
- template<class R, class... ArgTypes, class Alloc>
- struct uses_allocator<experimental::function<R(ArgTypes...)>, Alloc>;
-
} // namespace std
*/
@@ -144,7 +118,6 @@ template<class _Key, class _Value, class _Hash, class _BinaryPredicate, bool /*u
// General case for BM data searching; use a map
template<class _Key, typename _Value, class _Hash, class _BinaryPredicate>
class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, false> {
-public: // TODO private:
typedef _Value value_type;
typedef _Key key_type;
@@ -253,7 +226,7 @@ public:
return this->__search(__f, __l);
}
-public: // TODO private:
+private:
_RandomAccessIterator1 __first_;
_RandomAccessIterator1 __last_;
_BinaryPredicate __pred_;
diff --git a/contrib/libs/cxxsupp/libcxx/include/format b/contrib/libs/cxxsupp/libcxx/include/format
index 09e87ab81f..03c25f15d4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/format
+++ b/contrib/libs/cxxsupp/libcxx/include/format
@@ -155,9 +155,6 @@ namespace std {
# pragma GCC system_header
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17
@@ -557,8 +554,6 @@ formatted_size(locale __loc, wstring_view __fmt, const _Args&... __args) {
_LIBCPP_END_NAMESPACE_STD
-_LIBCPP_POP_MACROS
-
#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
#endif // _LIBCPP_FORMAT
diff --git a/contrib/libs/cxxsupp/libcxx/include/iterator b/contrib/libs/cxxsupp/libcxx/include/iterator
index 1786c4b8d4..202667809d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/iterator
+++ b/contrib/libs/cxxsupp/libcxx/include/iterator
@@ -147,6 +147,10 @@ template<class In, class Out>
template<class I1, class I2 = I1>
concept indirectly_swappable = see below; // since C++20
+// [alg.req.permutable], concept permutable // since C++20
+template<class I>
+ concept permutable = see below;
+
template<class I1, class I2, class R, class P1 = identity,
class P2 = identity>
concept indirectly_comparable =
@@ -340,8 +344,10 @@ public:
insert_iterator& operator++(int); // constexpr in C++20
};
-template <class Container, class Iterator>
-insert_iterator<Container> inserter(Container& x, Iterator i); // constexpr in C++20
+template <class Container>
+insert_iterator<Container> inserter(Container& x, typename Container::iterator i); // until C++20
+template <class Container>
+constexpr insert_iterator<Container> inserter(Container& x, ranges::iterator_t<Container> i); // since C++20
template <class Iterator>
class move_iterator {
@@ -592,7 +598,6 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <__config>
#include <__debug>
-#include <__functional_base>
#include <__iterator/access.h>
#include <__iterator/advance.h>
#include <__iterator/back_insert_iterator.h>
@@ -618,6 +623,7 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <__iterator/next.h>
#include <__iterator/ostream_iterator.h>
#include <__iterator/ostreambuf_iterator.h>
+#include <__iterator/permutable.h>
#include <__iterator/prev.h>
#include <__iterator/projected.h>
#include <__iterator/readable_traits.h>
@@ -636,6 +642,19 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <utility>
#include <version>
+// TODO: remove these headers
+#include <__functional/binary_function.h>
+#include <__functional/invoke.h>
+#include <__functional/operations.h>
+#include <__functional/reference_wrapper.h>
+#include <__functional/unary_function.h>
+#include <__functional/weak_result_type.h>
+#include <__memory/allocator_arg_t.h>
+#include <__memory/uses_allocator.h>
+#include <exception>
+#include <new>
+#include <typeinfo>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/memory b/contrib/libs/cxxsupp/libcxx/include/memory
index 46eea0abe7..72fa9cf342 100644
--- a/contrib/libs/cxxsupp/libcxx/include/memory
+++ b/contrib/libs/cxxsupp/libcxx/include/memory
@@ -805,7 +805,6 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
*/
#include <__config>
-#include <__functional_base>
#include <__memory/addressof.h>
#include <__memory/allocation_guard.h>
#include <__memory/allocator.h>
@@ -838,6 +837,14 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space);
#include <utility>
#include <version>
+// TODO: remove these headers
+#include <__functional/binary_function.h>
+#include <__functional/invoke.h>
+#include <__functional/operations.h>
+#include <__functional/reference_wrapper.h>
+#include <__functional/unary_function.h>
+#include <__functional/weak_result_type.h>
+
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
# include <__memory/auto_ptr.h>
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/module.modulemap b/contrib/libs/cxxsupp/libcxx/include/module.modulemap
index 35c4777f83..6a55bf3f42 100644
--- a/contrib/libs/cxxsupp/libcxx/include/module.modulemap
+++ b/contrib/libs/cxxsupp/libcxx/include/module.modulemap
@@ -2,7 +2,9 @@
// since __config may be included from C headers which may create an
// include cycle.
module std_config [system] [extern_c] {
- header "__config"
+ header "__config"
+ header "__config_site"
+ export *
}
module std [system] {
@@ -246,6 +248,7 @@ module std [system] {
module generate { private header "__algorithm/generate.h" }
module generate_n { private header "__algorithm/generate_n.h" }
module half_positive { private header "__algorithm/half_positive.h" }
+ module in_fun_result { private header "__algorithm/in_fun_result.h" }
module in_in_out_result { private header "__algorithm/in_in_out_result.h" }
module in_in_result { private header "__algorithm/in_in_result.h" }
module in_out_out_result { private header "__algorithm/in_out_out_result.h" }
@@ -283,6 +286,8 @@ module std [system] {
module pop_heap { private header "__algorithm/pop_heap.h" }
module prev_permutation { private header "__algorithm/prev_permutation.h" }
module push_heap { private header "__algorithm/push_heap.h" }
+ module ranges_min_element { private header "__algorithm/ranges_min_element.h" }
+ module ranges_swap_ranges { private header "__algorithm/ranges_swap_ranges.h" }
module remove { private header "__algorithm/remove.h" }
module remove_copy { private header "__algorithm/remove_copy.h" }
module remove_copy_if { private header "__algorithm/remove_copy_if.h" }
@@ -627,6 +632,7 @@ module std [system] {
module next { private header "__iterator/next.h" }
module ostream_iterator { private header "__iterator/ostream_iterator.h" }
module ostreambuf_iterator { private header "__iterator/ostreambuf_iterator.h" }
+ module permutable { private header "__iterator/permutable.h" }
module prev { private header "__iterator/prev.h" }
module projected { private header "__iterator/projected.h" }
module readable_traits { private header "__iterator/readable_traits.h" }
@@ -990,7 +996,6 @@ module std [system] {
module __mbstate_t { private header "__mbstate_t.h" export * }
module __mutex_base { private header "__mutex_base" export * }
module __node_handle { private header "__node_handle" export * }
- module __nullptr { header "__nullptr" export * }
module __split_buffer { private header "__split_buffer" export * }
module __std_stream { private header "__std_stream" export * }
module __string { private header "__string" export * }
diff --git a/contrib/libs/cxxsupp/libcxx/include/optional b/contrib/libs/cxxsupp/libcxx/include/optional
index 428b4f3d0e..21cd695c75 100644
--- a/contrib/libs/cxxsupp/libcxx/include/optional
+++ b/contrib/libs/cxxsupp/libcxx/include/optional
@@ -162,7 +162,6 @@ template<class T>
#include <__concepts/invocable.h>
#include <__config>
#include <__debug>
-#include <__functional_base>
#include <compare>
#include <functional>
#include <initializer_list>
@@ -172,6 +171,11 @@ template<class T>
#include <utility>
#include <version>
+// TODO: remove these headers
+#include <__memory/allocator_arg_t.h>
+#include <__memory/uses_allocator.h>
+#include <typeinfo>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/stddef.h b/contrib/libs/cxxsupp/libcxx/include/stddef.h
index ddf73225a6..de58ac6c94 100644
--- a/contrib/libs/cxxsupp/libcxx/include/stddef.h
+++ b/contrib/libs/cxxsupp/libcxx/include/stddef.h
@@ -54,12 +54,7 @@ typedef double max_align_t;
#endif
#ifdef __cplusplus
-
-extern "C++" {
-#include <__nullptr>
-using std::nullptr_t;
-}
-
+ typedef decltype(nullptr) nullptr_t;
#endif
#endif // _LIBCPP_STDDEF_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/string b/contrib/libs/cxxsupp/libcxx/include/string
index 383918de42..9757b64df4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string
+++ b/contrib/libs/cxxsupp/libcxx/include/string
@@ -520,7 +520,6 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1
#include <__config>
#include <__debug>
-#include <__functional_base>
#include <__ios/fpos.h>
#include <__iterator/wrap_iter.h>
#include <algorithm>
@@ -538,6 +537,16 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); // C++1
#include <utility>
#include <version>
+// TODO: remove these headers
+#include <__functional/binary_function.h>
+#include <__functional/invoke.h>
+#include <__functional/operations.h>
+#include <__functional/reference_wrapper.h>
+#include <__functional/unary_function.h>
+#include <__functional/weak_result_type.h>
+#include <new>
+#include <typeinfo>
+
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
# include <cwchar>
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/system_error b/contrib/libs/cxxsupp/libcxx/include/system_error
index f255c4bf8e..4b23f1cd85 100644
--- a/contrib/libs/cxxsupp/libcxx/include/system_error
+++ b/contrib/libs/cxxsupp/libcxx/include/system_error
@@ -145,7 +145,6 @@ template <> struct hash<std::error_condition>;
#include <__config>
#include <__errc>
#include <__functional/unary_function.h>
-#include <__functional_base>
#include <compare>
#include <stdexcept>
#include <string>
diff --git a/contrib/libs/cxxsupp/libcxx/include/thread b/contrib/libs/cxxsupp/libcxx/include/thread
index 8af1e0f994..5681f9d973 100644
--- a/contrib/libs/cxxsupp/libcxx/include/thread
+++ b/contrib/libs/cxxsupp/libcxx/include/thread
@@ -84,7 +84,6 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <__config>
#include <__debug>
-#include <__functional_base>
#include <__mutex_base>
#include <__thread/poll_with_backoff.h>
#include <__thread/timed_backoff_policy.h>
diff --git a/contrib/libs/cxxsupp/libcxx/include/tuple b/contrib/libs/cxxsupp/libcxx/include/tuple
index a64ffebfda..22cfbaa043 100644
--- a/contrib/libs/cxxsupp/libcxx/include/tuple
+++ b/contrib/libs/cxxsupp/libcxx/include/tuple
@@ -169,7 +169,6 @@ template <class... Types>
#include <__compare/synth_three_way.h>
#include <__config>
#include <__functional/unwrap_ref.h>
-#include <__functional_base>
#include <__memory/allocator_arg_t.h>
#include <__memory/uses_allocator.h>
#include <__tuple>
@@ -182,6 +181,17 @@ template <class... Types>
#include <utility>
#include <version>
+// TODO: remove these headers
+#include <__functional/binary_function.h>
+#include <__functional/invoke.h>
+#include <__functional/operations.h>
+#include <__functional/reference_wrapper.h>
+#include <__functional/unary_function.h>
+#include <__functional/weak_result_type.h>
+#include <exception>
+#include <new>
+#include <typeinfo>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/typeindex b/contrib/libs/cxxsupp/libcxx/include/typeindex
index c018b3c9f8..b5dcd8496a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/typeindex
+++ b/contrib/libs/cxxsupp/libcxx/include/typeindex
@@ -46,11 +46,21 @@ struct hash<type_index>
#include <__config>
#include <__functional/unary_function.h>
-#include <__functional_base>
#include <compare>
#include <typeinfo>
#include <version>
+// TODO: remove these headers
+#include <__functional/binary_function.h>
+#include <__functional/invoke.h>
+#include <__functional/operations.h>
+#include <__functional/reference_wrapper.h>
+#include <__functional/weak_result_type.h>
+#include <__memory/allocator_arg_t.h>
+#include <__memory/uses_allocator.h>
+#include <new>
+#include <utility>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/variant b/contrib/libs/cxxsupp/libcxx/include/variant
index decc6b4703..993248df62 100644
--- a/contrib/libs/cxxsupp/libcxx/include/variant
+++ b/contrib/libs/cxxsupp/libcxx/include/variant
@@ -202,6 +202,8 @@ namespace std {
#include <__availability>
#include <__config>
#include <__functional/hash.h>
+#include <__functional/operations.h>
+#include <__functional/unary_function.h>
#include <__tuple>
#include <__utility/forward.h>
#include <__variant/monostate.h>
@@ -215,6 +217,15 @@ namespace std {
#include <utility>
#include <version>
+// TODO: remove these headers
+#include <__functional/binary_function.h>
+#include <__functional/invoke.h>
+#include <__functional/reference_wrapper.h>
+#include <__functional/weak_result_type.h>
+#include <__memory/allocator_arg_t.h>
+#include <__memory/uses_allocator.h>
+#include <typeinfo>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/vector b/contrib/libs/cxxsupp/libcxx/include/vector
index 4a6b85e2dc..47befbfefd 100644
--- a/contrib/libs/cxxsupp/libcxx/include/vector
+++ b/contrib/libs/cxxsupp/libcxx/include/vector
@@ -274,7 +274,6 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20
#include <__bit_reference>
#include <__config>
#include <__debug>
-#include <__functional_base>
#include <__iterator/iterator_traits.h>
#include <__iterator/wrap_iter.h>
#include <__split_buffer>
@@ -292,6 +291,16 @@ erase_if(vector<T, Allocator>& c, Predicate pred); // C++20
#include <type_traits>
#include <version>
+// TODO: remove these headers
+#include <__functional/binary_function.h>
+#include <__functional/invoke.h>
+#include <__functional/operations.h>
+#include <__functional/reference_wrapper.h>
+#include <__functional/unary_function.h>
+#include <__functional/weak_result_type.h>
+#include <typeinfo>
+#include <utility>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/contrib/libs/cxxsupp/libcxx/include/version b/contrib/libs/cxxsupp/libcxx/include/version
index 8cb860378b..0fd9e0f80e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/version
+++ b/contrib/libs/cxxsupp/libcxx/include/version
@@ -38,6 +38,7 @@ __cpp_lib_atomic_shared_ptr 201711L <atomic>
__cpp_lib_atomic_value_initialization 201911L <atomic> <memory>
__cpp_lib_atomic_wait 201907L <atomic>
__cpp_lib_barrier 201907L <barrier>
+__cpp_lib_bind_back 202202L <functional>
__cpp_lib_bind_front 201907L <functional>
__cpp_lib_bit_cast 201806L <bit>
__cpp_lib_bitops 201907L <bit>
@@ -55,6 +56,7 @@ __cpp_lib_clamp 201603L <algorithm>
__cpp_lib_complex_udls 201309L <complex>
__cpp_lib_concepts 202002L <concepts>
__cpp_lib_constexpr_algorithms 201806L <algorithm>
+__cpp_lib_constexpr_cmath 202202L <cmath> <cstdlib>
__cpp_lib_constexpr_complex 201711L <complex>
__cpp_lib_constexpr_dynamic_alloc 201907L <memory>
__cpp_lib_constexpr_functional 201907L <functional>
@@ -132,9 +134,19 @@ __cpp_lib_polymorphic_allocator 201902L <memory_resource
__cpp_lib_quoted_string_io 201304L <iomanip>
__cpp_lib_ranges 201811L <algorithm> <functional> <iterator>
<memory> <ranges>
+__cpp_lib_ranges_chunk 202202L <ranges>
+__cpp_lib_ranges_chunk_by 202202L <ranges>
+__cpp_lib_ranges_iota 202202L <numeric>
+__cpp_lib_ranges_join_with 202202L <ranges>
+__cpp_lib_ranges_slide 202202L <ranges>
__cpp_lib_ranges_starts_ends_with 202106L <algorithm>
+__cpp_lib_ranges_to_container 202202L <deque> <forward_list> <list>
+ <map> <priority_queue> <queue>
+ <set> <stack> <string>
+ <unordered_map> <unordered_set> <vector>
__cpp_lib_ranges_zip 202110L <ranges> <tuple> <utility>
__cpp_lib_raw_memory_algorithms 201606L <memory>
+__cpp_lib_reference_from_temporary 202202L <type_traits>
__cpp_lib_remove_cvref 201711L <type_traits>
__cpp_lib_result_of_sfinae 201210L <functional> <type_traits>
__cpp_lib_robust_nonmodifying_seq_ops 201304L <algorithm>
@@ -174,6 +186,7 @@ __cpp_lib_type_identity 201806L <type_traits>
__cpp_lib_type_trait_variable_templates 201510L <type_traits>
__cpp_lib_uncaught_exceptions 201411L <exception>
__cpp_lib_unordered_map_try_emplace 201411L <unordered_map>
+__cpp_lib_unreachable 202202L <utility>
__cpp_lib_unwrap_ref 201811L <functional>
__cpp_lib_variant 202102L <variant>
__cpp_lib_void_t 201411L <type_traits>
@@ -371,21 +384,31 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_adaptor_iterator_pair_constructor 202106L
// # define __cpp_lib_allocate_at_least 202106L
// # define __cpp_lib_associative_heterogeneous_erasure 202110L
+// # define __cpp_lib_bind_back 202202L
# define __cpp_lib_byteswap 202110L
+// # define __cpp_lib_constexpr_cmath 202202L
// # define __cpp_lib_constexpr_typeinfo 202106L
// # define __cpp_lib_invoke_r 202106L
# define __cpp_lib_is_scoped_enum 202011L
# define __cpp_lib_monadic_optional 202110L
// # define __cpp_lib_move_only_function 202110L
// # define __cpp_lib_out_ptr 202106L
+// # define __cpp_lib_ranges_chunk 202202L
+// # define __cpp_lib_ranges_chunk_by 202202L
+// # define __cpp_lib_ranges_iota 202202L
+// # define __cpp_lib_ranges_join_with 202202L
+// # define __cpp_lib_ranges_slide 202202L
// # define __cpp_lib_ranges_starts_ends_with 202106L
+// # define __cpp_lib_ranges_to_container 202202L
// # define __cpp_lib_ranges_zip 202110L
+// # define __cpp_lib_reference_from_temporary 202202L
// # define __cpp_lib_spanstream 202106L
// # define __cpp_lib_stacktrace 202011L
// # define __cpp_lib_stdatomic_h 202011L
# define __cpp_lib_string_contains 202011L
# define __cpp_lib_string_resize_and_overwrite 202110L
# define __cpp_lib_to_underlying 202102L
+// # define __cpp_lib_unreachable 202202L
#endif
// clang-format on
diff --git a/contrib/libs/cxxsupp/libcxx/src/support/win32/locale_win32.cpp b/contrib/libs/cxxsupp/libcxx/src/support/win32/locale_win32.cpp
index f10916875d..43e5c9a572 100644
--- a/contrib/libs/cxxsupp/libcxx/src/support/win32/locale_win32.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/support/win32/locale_win32.cpp
@@ -97,7 +97,10 @@ int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...)
ret, n, format, loc, ap);
#else
__libcpp_locale_guard __current(loc);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
int result = vsnprintf( ret, n, format, ap );
+#pragma clang diagnostic pop
#endif
va_end(ap);
return result;
diff --git a/contrib/libs/cxxsupp/libcxx/src/support/win32/support.cpp b/contrib/libs/cxxsupp/libcxx/src/support/win32/support.cpp
index 115d975bbf..6d4b371f3d 100644
--- a/contrib/libs/cxxsupp/libcxx/src/support/win32/support.cpp
+++ b/contrib/libs/cxxsupp/libcxx/src/support/win32/support.cpp
@@ -23,7 +23,10 @@ int __libcpp_vasprintf( char **sptr, const char *__restrict format, va_list ap )
// Query the count required.
va_list ap_copy;
va_copy(ap_copy, ap);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
int count = vsnprintf( NULL, 0, format, ap_copy );
+#pragma clang diagnostic pop
va_end(ap_copy);
if (count < 0)
return count;
@@ -33,7 +36,10 @@ int __libcpp_vasprintf( char **sptr, const char *__restrict format, va_list ap )
return -1;
// If we haven't used exactly what was required, something is wrong.
// Maybe bug in vsnprintf. Report the error and return.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
if (vsnprintf(p, buffer_size, format, ap) != count) {
+#pragma clang diagnostic pop
free(p);
return -1;
}