aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__utility
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-11-20 17:37:57 +0000
committerGitHub <noreply@github.com>2024-11-20 17:37:57 +0000
commitf76323e9b295c15751e51e3443aa47a36bee8023 (patch)
tree4113c8cad473a33e0f746966e0cf087252fa1d7a /contrib/libs/cxxsupp/libcxx/include/__utility
parent753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff)
parenta7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff)
downloadydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 241120-1113
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__utility')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/empty.h24
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/pair.h3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__utility/terminate_on_exception.h48
3 files changed, 26 insertions, 49 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/empty.h b/contrib/libs/cxxsupp/libcxx/include/__utility/empty.h
new file mode 100644
index 0000000000..8cca197145
--- /dev/null
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/empty.h
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// 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___UTILITY_EMPTY_H
+#define _LIBCPP___UTILITY_EMPTY_H
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+struct __empty {};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___UTILITY_EMPTY_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h b/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
index 62dac6dd1d..535344eb1e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h
@@ -284,7 +284,8 @@ struct _LIBCPP_TEMPLATE_VIS pair
}
template <__pair_like _PairLike>
- requires(is_constructible_v<first_type, decltype(std::get<0>(std::declval<_PairLike&&>()))> &&
+ requires(!__is_specialization_of_subrange<remove_cvref_t<_PairLike>>::value &&
+ is_constructible_v<first_type, decltype(std::get<0>(std::declval<_PairLike&&>()))> &&
is_constructible_v<second_type, decltype(std::get<1>(std::declval<_PairLike&&>()))>)
_LIBCPP_HIDE_FROM_ABI constexpr explicit(__pair_like_explicit_wknd<_PairLike>())
pair(_PairLike&& __p)
diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/terminate_on_exception.h b/contrib/libs/cxxsupp/libcxx/include/__utility/terminate_on_exception.h
deleted file mode 100644
index e035ec3409..0000000000
--- a/contrib/libs/cxxsupp/libcxx/include/__utility/terminate_on_exception.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// 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___UTILITY_TERMINATE_ON_EXCEPTION_H
-#define _LIBCPP___UTILITY_TERMINATE_ON_EXCEPTION_H
-
-#include <__config>
-#include <__exception/terminate.h>
-#include <new>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-#endif
-
-#if _LIBCPP_STD_VER >= 17
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
-
-template <class _Func>
-_LIBCPP_HIDE_FROM_ABI auto __terminate_on_exception(_Func __func) {
- try {
- return __func();
- } catch (...) {
- std::terminate();
- }
-}
-
-# else // _LIBCPP_HAS_NO_EXCEPTIONS
-
-template <class _Func>
-_LIBCPP_HIDE_FROM_ABI auto __terminate_on_exception(_Func __func) {
- return __func();
-}
-
-# endif // _LIBCPP_HAS_NO_EXCEPTIONS
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // _LIBCPP_STD_VER >= 17
-
-#endif // _LIBCPP___UTILITY_TERMINATE_ON_EXCEPTION_H