aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2023-09-20 00:17:28 +0300
committermikhnenko <mikhnenko@yandex-team.com>2023-09-20 00:37:19 +0300
commit38d353cb704b884242efe1e8f0d34d2420de4488 (patch)
tree03f4e032f028b493a384b8c9b75f160f81ce6a77 /contrib/libs/cxxsupp/libcxx/include
parent9fe06a35ce2c80f49c89bebe61b09ab4f4213ecf (diff)
downloadydb-38d353cb704b884242efe1e8f0d34d2420de4488.tar.gz
Put libc++ under ym2
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__bit/bit_cast.h6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h1
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/atomic2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/barrier4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/cmath4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/fstream2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/locale6
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/map4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/set4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/string_view3
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/system_error2
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/tuple4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/variant24
16 files changed, 37 insertions, 39 deletions
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 e450a670f71..3e90e9adae5 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/comp_ref_type.h
@@ -55,8 +55,8 @@ struct __debug_less
__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;
+ (void)__l;
+ (void)__r;
}
template <class _LHS, class _RHS>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__bit/bit_cast.h b/contrib/libs/cxxsupp/libcxx/include/__bit/bit_cast.h
index d8a053a1d52..10c2c942812 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__bit/bit_cast.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__bit/bit_cast.h
@@ -40,9 +40,9 @@ template<class _ToType, class _FromType, class = enable_if_t<
>>
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI
constexpr _ToType bit_cast(_FromType const& __from) noexcept {
- _ToType __to;
- ::memcpy(&__to, &__from, sizeof(__from));
- return __to;
+ _ToType __to;
+ ::memcpy(&__to, &__from, sizeof(__from));
+ return __to;
}
#endif // _LIBCPP_STD_VER > 17
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h b/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h
index 831f27e4699..b5c415c25c4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__functional/not_fn.h
@@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
struct __not_fn_op {
- template<class... _Args>
+ template <class... _Args>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_AFTER_CXX17 auto operator()(_Args&&... __args) const
noexcept(noexcept(!_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
@@ -38,7 +38,7 @@ struct __not_fn_t : __perfect_forward<__not_fn_op, _Fn> {
using __perfect_forward<__not_fn_op, _Fn>::__perfect_forward;
};
-template<class _Fn, class = enable_if_t<
+template <class _Fn, class = enable_if_t<
is_constructible_v<decay_t<_Fn>, _Fn> &&
is_move_constructible_v<decay_t<_Fn>>
>>
diff --git a/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h b/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
index 6f81fe3f653..1e49676ce79 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__iterator/advance.h
@@ -149,6 +149,7 @@ public:
"If `n < 0`, then `bidirectional_iterator<I> && same_as<I, S>` must be true.");
// If `S` and `I` model `sized_sentinel_for<S, I>`:
if constexpr (sized_sentinel_for<_Sp, _Ip>) {
+ // If |n| >= |bound - i|, equivalent to `ranges::advance(i, bound)`.
// __magnitude_geq(a, b) returns |a| >= |b|, assuming they have the same sign.
auto __magnitude_geq = [](auto __a, auto __b) {
return __a == 0 ? __b == 0 :
diff --git a/contrib/libs/cxxsupp/libcxx/include/atomic b/contrib/libs/cxxsupp/libcxx/include/atomic
index bdb986fcc38..09e3dd3bb0d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/atomic
+++ b/contrib/libs/cxxsupp/libcxx/include/atomic
@@ -615,7 +615,7 @@ static_assert((is_same<underlying_type<memory_order>::type, __memory_order_under
"unexpected underlying type for std::memory_order");
#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) || \
- defined(_LIBCPP_ATOMIC_ONLY_USE_BUILTINS)
+ defined(_LIBCPP_ATOMIC_ONLY_USE_BUILTINS)
// [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because
// the default operator= in an object is not volatile, a byte-by-byte copy
diff --git a/contrib/libs/cxxsupp/libcxx/include/barrier b/contrib/libs/cxxsupp/libcxx/include/barrier
index 1b917f014a9..b0975a5519a 100644
--- a/contrib/libs/cxxsupp/libcxx/include/barrier
+++ b/contrib/libs/cxxsupp/libcxx/include/barrier
@@ -309,11 +309,11 @@ public:
{
__b.wait(_VSTD::move(__phase));
}
- _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void arrive_and_wait()
{
wait(arrive());
- }
+ }
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
void arrive_and_drop()
{
diff --git a/contrib/libs/cxxsupp/libcxx/include/cmath b/contrib/libs/cxxsupp/libcxx/include/cmath
index 582183edcc4..be5cbe36266 100644
--- a/contrib/libs/cxxsupp/libcxx/include/cmath
+++ b/contrib/libs/cxxsupp/libcxx/include/cmath
@@ -622,9 +622,9 @@ _Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
if (__t == 1) return __b;
const _Fp __x = __a + __t * (__b - __a);
if ((__t > 1) == (__b > __a))
- return __b < __x ? __x : __b;
+ return __b < __x ? __x : __b;
else
- return __x < __b ? __x : __b;
+ return __x < __b ? __x : __b;
}
constexpr float
diff --git a/contrib/libs/cxxsupp/libcxx/include/fstream b/contrib/libs/cxxsupp/libcxx/include/fstream
index eeab0b53980..80bda63755c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/fstream
+++ b/contrib/libs/cxxsupp/libcxx/include/fstream
@@ -192,7 +192,7 @@ typedef basic_fstream<wchar_t> wfstream;
#include <version>
#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-#include <filesystem>
+# include <filesystem>
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/contrib/libs/cxxsupp/libcxx/include/locale b/contrib/libs/cxxsupp/libcxx/include/locale
index ab1a8bf9888..1e437027d46 100644
--- a/contrib/libs/cxxsupp/libcxx/include/locale
+++ b/contrib/libs/cxxsupp/libcxx/include/locale
@@ -213,8 +213,8 @@ template <class charT> class messages_byname;
// Most unix variants have catopen. These are the specific ones that don't.
# if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION)
# define _LIBCPP_HAS_CATOPEN 1
-#include <nl_types.h>
-#endif
+# include <nl_types.h>
+# endif
#endif
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
@@ -1489,7 +1489,7 @@ num_put<_CharT, _OutputIterator>::__do_put_integral(iter_type __s, ios_base& __i
_LIBCPP_CONSTEXPR const unsigned __nbuf
= (numeric_limits<_Unsigned>::digits / 3) // 1 char per 3 bits
+ ((numeric_limits<_Unsigned>::digits % 3) != 0) // round up
- + 2; // base prefix + terminating null character // terminating null character
+ + 2; // base prefix + terminating null character
char __nar[__nbuf];
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
diff --git a/contrib/libs/cxxsupp/libcxx/include/map b/contrib/libs/cxxsupp/libcxx/include/map
index d6a5ad1fa4b..9a9826f4723 100644
--- a/contrib/libs/cxxsupp/libcxx/include/map
+++ b/contrib/libs/cxxsupp/libcxx/include/map
@@ -198,7 +198,7 @@ public:
size_type count(const K& x) const; // C++14
size_type count(const key_type& k) const;
- bool contains(const key_type& x) const; // C++20
+ bool contains(const key_type& x) const; // C++20
template<class K> bool contains(const K& x) const; // C++20
iterator lower_bound(const key_type& k);
@@ -438,7 +438,7 @@ public:
size_type count(const K& x) const; // C++14
size_type count(const key_type& k) const;
- bool contains(const key_type& x) const; // C++20
+ bool contains(const key_type& x) const; // C++20
template<class K> bool contains(const K& x) const; // C++20
iterator lower_bound(const key_type& k);
diff --git a/contrib/libs/cxxsupp/libcxx/include/set b/contrib/libs/cxxsupp/libcxx/include/set
index 99a061a0387..176369e81b3 100644
--- a/contrib/libs/cxxsupp/libcxx/include/set
+++ b/contrib/libs/cxxsupp/libcxx/include/set
@@ -159,7 +159,7 @@ public:
size_type count(const K& x) const; // C++14
size_type count(const key_type& k) const;
- bool contains(const key_type& x) const; // C++20
+ bool contains(const key_type& x) const; // C++20
template<class K> bool contains(const K& x) const; // C++20
iterator lower_bound(const key_type& k);
@@ -383,7 +383,7 @@ public:
size_type count(const K& x) const; // C++14
size_type count(const key_type& k) const;
- bool contains(const key_type& x) const; // C++20
+ bool contains(const key_type& x) const; // C++20
template<class K> bool contains(const K& x) const; // C++20
iterator lower_bound(const key_type& k);
diff --git a/contrib/libs/cxxsupp/libcxx/include/string b/contrib/libs/cxxsupp/libcxx/include/string
index d0df0afd160..a1bfff1f6a2 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string
+++ b/contrib/libs/cxxsupp/libcxx/include/string
@@ -652,7 +652,7 @@ class
#endif
basic_string
{
- static_assert(sizeof(_CharT) <= 4, "libc++ implementation of std::basic_string does not support extra-wide character types");
+ static_assert(sizeof(_CharT) <= 4, "libc++ implementation of std::basic_string does not support extra-wide character types");
public:
typedef basic_string __self;
typedef basic_string_view<_CharT, _Traits> __self_view;
diff --git a/contrib/libs/cxxsupp/libcxx/include/string_view b/contrib/libs/cxxsupp/libcxx/include/string_view
index e0e54a08a0c..81d8c8a2b7d 100644
--- a/contrib/libs/cxxsupp/libcxx/include/string_view
+++ b/contrib/libs/cxxsupp/libcxx/include/string_view
@@ -748,7 +748,7 @@ bool operator==(basic_string_view<_CharT, _Traits> __lhs,
return __lhs.compare(__rhs) == 0;
}
-// The dummy default template parameters are used to work around a MSVC issue with mangling, see VSO-409236 for details.
+// The dummy default template parameters are used to work around a MSVC issue with mangling, see VSO-409326 for details.
// This applies to the other sufficient overloads below for the other comparison operators.
template<class _CharT, class _Traits, int = 1>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
@@ -779,7 +779,6 @@ bool operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_Cha
return __lhs.compare(__rhs) != 0;
}
-
template<class _CharT, class _Traits, int = 1>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
bool operator!=(basic_string_view<_CharT, _Traits> __lhs,
diff --git a/contrib/libs/cxxsupp/libcxx/include/system_error b/contrib/libs/cxxsupp/libcxx/include/system_error
index 4b23f1cd852..66a3f3c1e0b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/system_error
+++ b/contrib/libs/cxxsupp/libcxx/include/system_error
@@ -201,8 +201,6 @@ class _LIBCPP_TYPE_VIS error_category
public:
virtual ~error_category() _NOEXCEPT;
-// ODR violation is used for binary compatibility with older versions of libc++.
-// We don't have old libc++ versions for MSVC, so we don't need it.
#if defined(_LIBCPP_BUILDING_LIBRARY) && \
defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
error_category() _NOEXCEPT;
diff --git a/contrib/libs/cxxsupp/libcxx/include/tuple b/contrib/libs/cxxsupp/libcxx/include/tuple
index ca6024879fe..868b66d2544 100644
--- a/contrib/libs/cxxsupp/libcxx/include/tuple
+++ b/contrib/libs/cxxsupp/libcxx/include/tuple
@@ -483,7 +483,7 @@ template<class _Dest, class _Source, size_t ..._Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
void __memberwise_copy_assign(_Dest& __dest, _Source const& __source, __tuple_indices<_Np...>) {
_VSTD::__swallow(((_VSTD::get<_Np>(__dest) = _VSTD::get<_Np>(__source)), void(), 0)...);
- }
+}
template<class _Dest, class _Source, class ..._Up, size_t ..._Np>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
@@ -491,7 +491,7 @@ void __memberwise_forward_assign(_Dest& __dest, _Source&& __source, __tuple_type
_VSTD::__swallow(((
_VSTD::get<_Np>(__dest) = _VSTD::forward<_Up>(_VSTD::get<_Np>(__source))
), void(), 0)...);
- }
+}
template <class ..._Tp>
class _LIBCPP_TEMPLATE_VIS tuple
diff --git a/contrib/libs/cxxsupp/libcxx/include/variant b/contrib/libs/cxxsupp/libcxx/include/variant
index 993248df62d..be8e44bf3de 100644
--- a/contrib/libs/cxxsupp/libcxx/include/variant
+++ b/contrib/libs/cxxsupp/libcxx/include/variant
@@ -1166,17 +1166,17 @@ public:
if constexpr (__all<is_nothrow_move_constructible_v<_Types>...>::value) {
this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
} else {
- // EXTENSION: When the move construction of `__lhs` into `__rhs` throws
- // and `__tmp` is nothrow move constructible then we move `__tmp` back
- // into `__rhs` and provide the strong exception safety guarantee.
- try {
- this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
- } catch (...) {
- if (__tmp.__move_nothrow()) {
- this->__generic_construct(*__rhs, _VSTD::move(__tmp));
+ // EXTENSION: When the move construction of `__lhs` into `__rhs` throws
+ // and `__tmp` is nothrow move constructible then we move `__tmp` back
+ // into `__rhs` and provide the strong exception safety guarantee.
+ try {
+ this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
+ } catch (...) {
+ if (__tmp.__move_nothrow()) {
+ this->__generic_construct(*__rhs, _VSTD::move(__tmp));
+ }
+ throw;
}
- throw;
- }
}
#else
// this isn't consolidated with the `if constexpr` branch above due to
@@ -1697,9 +1697,9 @@ inline _LIBCPP_INLINE_VISIBILITY
const bool __valueless =
(... || _VSTD::__as_variant(__vs).valueless_by_exception());
if (__valueless) {
- __throw_bad_variant_access();
- }
+ __throw_bad_variant_access();
}
+}
template <
class _Visitor, class... _Vs,