diff options
author | mikhnenko <mikhnenko@yandex-team.com> | 2023-11-14 21:05:51 +0300 |
---|---|---|
committer | mikhnenko <mikhnenko@yandex-team.com> | 2023-11-14 21:51:40 +0300 |
commit | dc2b631c67243fa71124d24899ed58af28069700 (patch) | |
tree | 22c544e80e8b5bc19778b31be8fd7346beece964 /contrib | |
parent | a8c9782fb7c6454c0afef92c5e5cb16cce719515 (diff) | |
download | ydb-dc2b631c67243fa71124d24899ed58af28069700.tar.gz |
Drop some patches for MSVC compatibility
Diffstat (limited to 'contrib')
22 files changed, 19 insertions, 287 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__bsd_locale_defaults.h b/contrib/libs/cxxsupp/libcxx/include/__bsd_locale_defaults.h index 48cedeaa73..4d990482d4 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__bsd_locale_defaults.h +++ b/contrib/libs/cxxsupp/libcxx/include/__bsd_locale_defaults.h @@ -29,9 +29,8 @@ #define __libcpp_mbrlen_l(s, n, ps, l) mbrlen_l(s, n, ps, l) #define __libcpp_localeconv_l(l) localeconv_l(l) #define __libcpp_mbsrtowcs_l(dest, src, len, ps, l) mbsrtowcs_l(dest, src, len, ps, l) -// Workaround for Visual Studio preprocessor bug - explicitly mention all non-variadic parameters. -#define __libcpp_snprintf_l(__s, __n, __l, __f, ...) snprintf_l(__s, __n, __l, __f, ##__VA_ARGS__) -#define __libcpp_asprintf_l(__ret, __l, __f, ...) asprintf_l(__ret, __l, __f, ##__VA_ARGS__) -#define __libcpp_sscanf_l(__s, __l, __f, ...) sscanf_l(__s, __l, __f, ##__VA_ARGS__) +#define __libcpp_snprintf_l(...) snprintf_l(__VA_ARGS__) +#define __libcpp_asprintf_l(...) asprintf_l(__VA_ARGS__) +#define __libcpp_sscanf_l(...) sscanf_l(__VA_ARGS__) #endif // _LIBCPP___BSD_LOCALE_DEFAULTS_H diff --git a/contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h b/contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h index 452543b069..f520759429 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h +++ b/contrib/libs/cxxsupp/libcxx/include/__chrono/duration.h @@ -528,12 +528,6 @@ operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2 } // namespace chrono #if _LIBCPP_STD_VER > 11 - -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4455) -#endif - // Suffixes for duration literals [time.duration.literals] inline namespace literals { @@ -608,10 +602,6 @@ inline namespace literals } // namespace chrono_literals } // namespace literals -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif - namespace chrono { // hoist the literals into namespace std::chrono using namespace literals::chrono_literals; } // namespace chrono diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h b/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h index a5b0c0e191..7ac44a2d63 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/bind.h @@ -191,11 +191,6 @@ struct __mu_return_impl<_Ti, false, false, false, _TupleUj> typedef _Ti& type; }; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4296 ) -#endif - template <class _Ti, class _TupleUj> struct __mu_return : public __mu_return_impl<_Ti, @@ -207,10 +202,6 @@ struct __mu_return { }; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif - template <class _Fp, class _BoundArgs, class _TupleUj> struct __is_valid_bind_return { @@ -272,11 +263,6 @@ __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, return _VSTD::__invoke(__f, _VSTD::__mu(_VSTD::get<_Indx>(__bound_args), __args)...); } -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4296 ) -#endif - template<class _Fp, class ..._BoundArgs> class __bind #if _LIBCPP_STD_VER <= 17 || !defined(_LIBCPP_ABI_NO_BINDER_BASES) @@ -323,10 +309,6 @@ public: } }; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif - #if defined(__CUDACC__) && defined(_MSC_VER) # define Y_CUDAFE_MSVC_BUG #endif diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/function.h b/contrib/libs/cxxsupp/libcxx/include/__functional/function.h index d1c815bd8a..8951299d39 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/function.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/function.h @@ -969,18 +969,11 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)> __func __f_; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4348 ) -#endif template <class _Fp, bool = _And< _IsNotSame<__uncvref_t<_Fp>, function>, __invokable<_Fp, _ArgTypes...> >::value> struct __callable; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif template <class _Fp> struct __callable<_Fp, true> { diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h b/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h index f39f44ea08..f1d5e27343 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/hash.h @@ -411,20 +411,12 @@ struct _PairT { size_t second; }; -// Disable double inline warning. -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4141 ) -#endif _LIBCPP_INLINE_VISIBILITY inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT { typedef __scalar_hash<_PairT> _HashT; const _PairT __p = {__lhs, __rhs}; return _HashT()(__p); } -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif _LIBCPP_SUPPRESS_DEPRECATED_PUSH template<class _Tp> diff --git a/contrib/libs/cxxsupp/libcxx/include/__hash_table b/contrib/libs/cxxsupp/libcxx/include/__hash_table index 990f5efc74..2022301443 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__hash_table +++ b/contrib/libs/cxxsupp/libcxx/include/__hash_table @@ -91,10 +91,6 @@ struct __hash_node_base _LIBCPP_INLINE_VISIBILITY __hash_node_base() _NOEXCEPT : __next_(nullptr) {} }; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning( push ) -#pragma warning( disable: 4624 ) -#endif // _LIBCPP_COMPILER_MSVC template <class _Tp, class _VoidPtr> struct _LIBCPP_STANDALONE_DEBUG __hash_node : public __hash_node_base @@ -107,9 +103,6 @@ struct _LIBCPP_STANDALONE_DEBUG __hash_node size_t __hash_; __node_value_type __value_; }; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning( pop ) -#endif // _LIBCPP_COMPILER_MSVC inline _LIBCPP_INLINE_VISIBILITY bool diff --git a/contrib/libs/cxxsupp/libcxx/include/__locale b/contrib/libs/cxxsupp/libcxx/include/__locale index 9b973cf5c3..41a53188d6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__locale +++ b/contrib/libs/cxxsupp/libcxx/include/__locale @@ -271,11 +271,6 @@ public: return do_compare(__lo1, __hi1, __lo2, __hi2); } -// Disable double inline warning. -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4141 ) -#endif // FIXME(EricWF): The _LIBCPP_ALWAYS_INLINE is needed on Windows to work // around a dllimport bug that expects an external instantiation. _LIBCPP_INLINE_VISIBILITY @@ -284,9 +279,6 @@ public: { return do_transform(__lo, __hi); } -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif _LIBCPP_INLINE_VISIBILITY long hash(const char_type* __lo, const char_type* __hi) const diff --git a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h index ac7572f770..e2cae92e2b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h +++ b/contrib/libs/cxxsupp/libcxx/include/__memory/shared_ptr.h @@ -102,7 +102,6 @@ _ValueType __libcpp_acquire_load(_ValueType const* __value) { #endif } -#ifndef _LIBCPP_COMPILER_MSVC template <class _Tp> inline _LIBCPP_INLINE_VISIBILITY _Tp __libcpp_atomic_refcount_increment(_Tp& __t) _NOEXCEPT @@ -124,7 +123,6 @@ __libcpp_atomic_refcount_decrement(_Tp& __t) _NOEXCEPT return __t -= 1; #endif } -#endif class _LIBCPP_EXCEPTION_ABI bad_weak_ptr : public std::exception diff --git a/contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h b/contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h index 14d82a0381..9ec7f9a0e6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h +++ b/contrib/libs/cxxsupp/libcxx/include/__string/char_traits.h @@ -207,7 +207,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char> static inline size_t _LIBCPP_CONSTEXPR_AFTER_CXX14 length(const char_type* __s) _NOEXCEPT { // GCC currently does not support __builtin_strlen during constant evaluation. // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70816 -#if defined(_LIBCPP_COMPILER_GCC) || defined(_LIBCPP_COMPILER_MSVC) +#ifdef _LIBCPP_COMPILER_GCC if (__libcpp_is_constant_evaluated()) { size_t __i = 0; for (; __s[__i] != char_type('\0'); ++__i) diff --git a/contrib/libs/cxxsupp/libcxx/include/__tuple b/contrib/libs/cxxsupp/libcxx/include/__tuple index 51ec9a9acd..38a22dbaaf 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__tuple +++ b/contrib/libs/cxxsupp/libcxx/include/__tuple @@ -355,70 +355,6 @@ using __apply_cv_t _LIBCPP_NODEBUG = __apply_cv_mf< // _Sp defaults to 0 and _Ep defaults to tuple_size<_Tuple>. If _Tuple is a // lvalue_reference type, then __tuple_types<_Types&...> is the result. -#ifdef _LIBCPP_COMPILER_MSVC - -template<class _TupleTypes, class _Tp> -struct __make_tuple_types_append_front; - -template<class ..._Types, class _Tp> -struct __make_tuple_types_append_front<__tuple_types<_Types...>, _Tp> { - using type = __tuple_types<_Tp, _Types...>; -}; - -template<class _TupleTypes, class _Apply, size_t _Ep, size_t _Sp, class = void> -struct __make_tuple_types_flat; - -template<class _Tuple, class _Apply> -struct __make_tuple_types_flat<_Tuple, _Apply, 0, 0, void> { - using type = __tuple_types<>; -}; - -template<template<class...> class _Tuple, class _Tp, class ..._Types, class _Apply, size_t _Ep> -struct __make_tuple_types_flat<_Tuple<_Tp, _Types...>, _Apply, _Ep, 0, enable_if_t<(_Ep > 0)>> { - using type = typename __make_tuple_types_append_front< - typename __make_tuple_types_flat<__tuple_types<_Types...>, _Apply, _Ep - 1, 0>::type, - typename _Apply::template __apply<_Tp>>::type; -}; - -template<template <class...> class _Tuple, class _Tp, class ..._Types, class _Apply, size_t _Ep, size_t _Sp> -struct __make_tuple_types_flat<_Tuple<_Tp, _Types...>, _Apply, _Ep, _Sp, enable_if_t<(_Ep > 0 && _Sp > 0)>> { - using type = typename __make_tuple_types_flat<__tuple_types<_Types...>, _Apply, _Ep - 1, _Sp - 1>::type; -}; - -template<class _Tp, size_t _Np, class _Apply, size_t _Ep> -struct __make_tuple_types_flat<array<_Tp, _Np>, _Apply, _Ep, 0, enable_if_t<(_Ep > 0)>> { - using type = typename __make_tuple_types_append_front< - typename __make_tuple_types_flat<array<_Tp, _Np>, _Apply, _Ep - 1, 0>::type, - typename _Apply::template __apply<_Tp>>::type; -}; - -template<class _Tp, size_t _Np, class _Apply, size_t _Ep, size_t _Sp> -struct __make_tuple_types_flat<array<_Tp, _Np>, _Apply, _Ep, _Sp, enable_if_t<(_Sp > 0)>> { - using type = typename __make_tuple_types_flat<array<_Tp, _Np>, _Apply, _Ep - _Sp, 0>::type; -}; - -template<class _Tp, - size_t _Ep = tuple_size<remove_reference_t<_Tp>>::value, - size_t _Sp = 0, - bool _SameSize = (_Ep == tuple_size<typename remove_reference<_Tp>::type>::value)> -struct __make_tuple_types { - static_assert(_Sp <= _Ep, "__make_tuple_types input error"); - using _RawTp = typename remove_cv<typename remove_reference<_Tp>::type>::type; - using type = typename __make_tuple_types_flat<_RawTp, __apply_cv_t<_Tp>, _Ep, _Sp>::type; -}; - -template <class ..._Types, size_t _Ep> -struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> { - typedef __tuple_types<_Types...> type; -}; - -template <class ..._Types, size_t _Ep> -struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> { - typedef __tuple_types<_Types...> type; -}; - -#else - template <class _TupleTypes, class _TupleIndices> struct __make_tuple_types_flat; @@ -462,8 +398,6 @@ struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> { typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type; }; -#endif // _LIBCPP_COMPILER_MSVC - template <bool ..._Preds> struct __all_dummy; @@ -506,14 +440,12 @@ struct __tuple_convertible<_Tp, _Up, true, true, // __tuple_constructible template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value, - bool = __tuple_like<_Up>::value, - class = void> + bool = __tuple_like<_Up>::value> struct __tuple_constructible : public false_type {}; template <class _Tp, class _Up> -struct __tuple_constructible<_Tp, _Up, true, true, - typename enable_if<(tuple_size<typename remove_reference<_Tp>::type>::value == tuple_size<_Up>::value)>::type> +struct __tuple_constructible<_Tp, _Up, true, true> : public __tuple_sfinae_base::__constructible< typename __make_tuple_types<_Tp>::type , typename __make_tuple_types<_Up>::type @@ -523,14 +455,12 @@ struct __tuple_constructible<_Tp, _Up, true, true, // __tuple_assignable template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value, - bool = __tuple_like<_Up>::value, - class = void> + bool = __tuple_like<_Up>::value> struct __tuple_assignable : public false_type {}; template <class _Tp, class _Up> -struct __tuple_assignable<_Tp, _Up, true, true, - typename enable_if<(tuple_size<typename remove_reference<_Tp>::type>::value == tuple_size<_Up>::value)>::type> +struct __tuple_assignable<_Tp, _Up, true, true> : public __tuple_sfinae_base::__assignable< typename __make_tuple_types<_Tp>::type , typename __make_tuple_types<_Up&>::type diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/declval.h b/contrib/libs/cxxsupp/libcxx/include/__utility/declval.h index e2fcf48d36..97fd1eba91 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__utility/declval.h +++ b/contrib/libs/cxxsupp/libcxx/include/__utility/declval.h @@ -26,27 +26,8 @@ template <class _Tp> _Tp __declval(long); _LIBCPP_SUPPRESS_DEPRECATED_POP -#ifdef _LIBCPP_COMPILER_MSVC template <class _Tp> -using __declval_void = void; - -template <class _Tp, class = void> -struct __declval_add_rvalue_reference { - using type = _Tp; -}; -template <class _Tp> -struct __declval_add_rvalue_reference<_Tp, __declval_void<_Tp&>> { - using type = _Tp&&; -}; -#endif - -template <class _Tp> -#ifdef _LIBCPP_COMPILER_MSVC -typename __declval_add_rvalue_reference<_Tp>::type -#else -decltype(__declval<_Tp>(0)) -#endif -declval() _NOEXCEPT; +decltype(__declval<_Tp>(0)) declval() _NOEXCEPT; _LIBCPP_END_NAMESPACE_STD diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h b/contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h index a74b1a0337..00a944dd02 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h +++ b/contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h @@ -61,16 +61,9 @@ struct __make_integer_sequence_checked static_assert(is_integral<_Tp>::value, "std::make_integer_sequence can only be instantiated with an integral type" ); static_assert(0 <= _Ep, "std::make_integer_sequence must have a non-negative sequence length"); -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4296 ) -#endif // Workaround GCC bug by preventing bad installations when 0 <= _Ep // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68929 typedef _LIBCPP_NODEBUG __make_integer_sequence_unchecked<_Tp, 0 <= _Ep ? _Ep : 0> type; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif }; template <class _Tp, _Tp _Ep> diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h b/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h index 8867c6deb6..518c251eaf 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h +++ b/contrib/libs/cxxsupp/libcxx/include/__utility/pair.h @@ -140,24 +140,16 @@ struct _LIBCPP_TEMPLATE_VIS pair _EnableExplicitDefaultConstructor<_Dummy>::value >::type* = nullptr> explicit _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - pair() -// danlark@ if you remove this define, MSVC gets into ICE -#if !defined(_LIBCPP_COMPILER_MSVC) - _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value && - is_nothrow_default_constructible<second_type>::value) -#endif + pair() _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value && + is_nothrow_default_constructible<second_type>::value) : first(), second() {} template<bool _Dummy = true, typename enable_if< _EnableImplicitDefaultConstructor<_Dummy>::value >::type* = nullptr> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - pair() -// danlark@ if you remove this define, MSVC gets into ICE -#if !defined(_LIBCPP_COMPILER_MSVC) - _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value && - is_nothrow_default_constructible<second_type>::value) -#endif + pair() _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value && + is_nothrow_default_constructible<second_type>::value) : first(), second() {} template <bool _Dummy = true, typename enable_if< @@ -319,9 +311,9 @@ private: #ifndef _LIBCPP_CXX03_LANG template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 - pair(piecewise_construct_t, - tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args, - __tuple_indices<_I1...>, __tuple_indices<_I2...>); + pair(piecewise_construct_t, + tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args, + __tuple_indices<_I1...>, __tuple_indices<_I2...>); #endif }; diff --git a/contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h b/contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h index 79e6c3fb42..87e51c0b19 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h +++ b/contrib/libs/cxxsupp/libcxx/include/__utility/transaction.h @@ -76,10 +76,7 @@ struct __transaction { } _LIBCPP_HIDE_FROM_ABI -#if !defined(_LIBCPP_COMPILER_MSVC) - _LIBCPP_CONSTEXPR_AFTER_CXX17 -#endif - ~__transaction() { + _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__transaction() { if (!__completed_) __rollback_(); } diff --git a/contrib/libs/cxxsupp/libcxx/include/atomic b/contrib/libs/cxxsupp/libcxx/include/atomic index 48c358f5ac..3ccc8bc944 100644 --- a/contrib/libs/cxxsupp/libcxx/include/atomic +++ b/contrib/libs/cxxsupp/libcxx/include/atomic @@ -891,13 +891,7 @@ _Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern, #define __cxx_atomic_is_lock_free(__s) __atomic_is_lock_free(__s, 0) -#elif defined(_LIBCPP_HAS_C_ATOMIC_IMP) || defined(_LIBCPP_COMPILER_MSVC) - -#if defined(_LIBCPP_COMPILER_MSVC) -_LIBCPP_END_NAMESPACE_STD -#include <__support/win32/atomic_win32.h> -_LIBCPP_BEGIN_NAMESPACE_STD -#endif +#elif defined(_LIBCPP_HAS_C_ATOMIC_IMP) template <typename _Tp> struct __cxx_atomic_base_impl { @@ -915,10 +909,6 @@ struct __cxx_atomic_base_impl { #define __cxx_atomic_is_lock_free(__s) __c11_atomic_is_lock_free(__s) -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4141 ) -#endif _LIBCPP_INLINE_VISIBILITY inline void __cxx_atomic_thread_fence(memory_order __order) _NOEXCEPT { __c11_atomic_thread_fence(static_cast<__memory_order_underlying_t>(__order)); @@ -928,9 +918,6 @@ _LIBCPP_INLINE_VISIBILITY inline void __cxx_atomic_signal_fence(memory_order __order) _NOEXCEPT { __c11_atomic_signal_fence(static_cast<__memory_order_underlying_t>(__order)); } -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif template<class _Tp> _LIBCPP_INLINE_VISIBILITY @@ -978,20 +965,12 @@ _Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp> * __a, _Tp __value, memory return __c11_atomic_exchange(&__a->__a_value, __value, static_cast<__memory_order_underlying_t>(__order)); } -// Disable double inline warning -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4141 ) -#endif _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR memory_order __to_failure_order(memory_order __order) { // Avoid switch statement to make this a constexpr. return __order == memory_order_release ? memory_order_relaxed: (__order == memory_order_acq_rel ? memory_order_acquire: __order); } -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif template<class _Tp> _LIBCPP_INLINE_VISIBILITY @@ -1674,14 +1653,7 @@ struct __atomic_base // false _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {} -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4522 ) -#endif __atomic_base(const __atomic_base&) = delete; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif }; #if defined(__cpp_lib_atomic_is_always_lock_free) @@ -2463,16 +2435,9 @@ typedef struct atomic_flag _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR atomic_flag(bool __b) _NOEXCEPT : __a_(__b) {} // EXTENSION -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4522 ) -#endif atomic_flag(const atomic_flag&) = delete; atomic_flag& operator=(const atomic_flag&) = delete; atomic_flag& operator=(const atomic_flag&) volatile = delete; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif } atomic_flag; diff --git a/contrib/libs/cxxsupp/libcxx/include/locale b/contrib/libs/cxxsupp/libcxx/include/locale index a98e36f43b..669a6e016c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/locale +++ b/contrib/libs/cxxsupp/libcxx/include/locale @@ -1688,13 +1688,6 @@ public: enum dateorder {no_order, dmy, mdy, ymd, ydm}; }; -#ifdef _LIBCPP_COMPILER_MSVC -// __time_get_c_storage should only be used for private inheritance to avoid -// problems with non-virtual destructor -#pragma warning ( push ) -#pragma warning ( disable : 4265 ) -#endif - template <class _CharT> class _LIBCPP_TEMPLATE_VIS __time_get_c_storage { @@ -1713,10 +1706,6 @@ protected: ~__time_get_c_storage() {} }; -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif - template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__weeks() const; template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__months() const; template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__am_pm() const; diff --git a/contrib/libs/cxxsupp/libcxx/include/optional b/contrib/libs/cxxsupp/libcxx/include/optional index 9d04d2301f..50ce0af5e7 100644 --- a/contrib/libs/cxxsupp/libcxx/include/optional +++ b/contrib/libs/cxxsupp/libcxx/include/optional @@ -733,7 +733,7 @@ public: template <class _InPlaceT, class... _Args, class = enable_if_t< _And< _IsSame<_InPlaceT, in_place_t>, - is_constructible<value_type, _Args...> + is_constructible<value_type, _Args...> >::value > > diff --git a/contrib/libs/cxxsupp/libcxx/include/stdlib.h b/contrib/libs/cxxsupp/libcxx/include/stdlib.h index a5c4986a6a..3edfa228a4 100644 --- a/contrib/libs/cxxsupp/libcxx/include/stdlib.h +++ b/contrib/libs/cxxsupp/libcxx/include/stdlib.h @@ -135,28 +135,16 @@ inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT { #if !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT { -#ifdef _LIBCPP_COMPILER_MSVC - return fabsf(__lcpp_x); -#else return __builtin_fabsf(__lcpp_x); // Use builtins to prevent needing math.h -#endif } inline _LIBCPP_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT { -#ifdef _LIBCPP_COMPILER_MSVC - return fabs(__lcpp_x); -#else return __builtin_fabs(__lcpp_x); -#endif } inline _LIBCPP_INLINE_VISIBILITY long double abs(long double __lcpp_x) _NOEXCEPT { -#ifdef _LIBCPP_COMPILER_MSVC - return fabsl(__lcpp_x); -#else return __builtin_fabsl(__lcpp_x); -#endif } #endif // !defined(__sun__) diff --git a/contrib/libs/cxxsupp/libcxx/include/string b/contrib/libs/cxxsupp/libcxx/include/string index e595fc0960..45708e376a 100644 --- a/contrib/libs/cxxsupp/libcxx/include/string +++ b/contrib/libs/cxxsupp/libcxx/include/string @@ -575,10 +575,6 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len ); _LIBCPP_PUSH_MACROS #include <__undef_macros> -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4455 ) -#endif _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/contrib/libs/cxxsupp/libcxx/include/string_view b/contrib/libs/cxxsupp/libcxx/include/string_view index 1b0ac29ae5..48882b9de2 100644 --- a/contrib/libs/cxxsupp/libcxx/include/string_view +++ b/contrib/libs/cxxsupp/libcxx/include/string_view @@ -234,11 +234,6 @@ namespace std { # pragma GCC system_header #endif -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( push ) -#pragma warning ( disable : 4455 ) -#endif - _LIBCPP_PUSH_MACROS #include <__undef_macros> @@ -975,10 +970,6 @@ inline namespace literals #endif _LIBCPP_END_NAMESPACE_STD -#ifdef _LIBCPP_COMPILER_MSVC -#pragma warning ( pop ) -#endif - _LIBCPP_POP_MACROS #endif // _LIBCPP_STRING_VIEW diff --git a/contrib/libs/cxxsupp/libcxx/include/tuple b/contrib/libs/cxxsupp/libcxx/include/tuple index b434dae753..27a422cb2b 100644 --- a/contrib/libs/cxxsupp/libcxx/include/tuple +++ b/contrib/libs/cxxsupp/libcxx/include/tuple @@ -460,23 +460,6 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp. __tuple_leaf<_Ul, _Tl>()... {} -#if defined(__NVCC__) && defined(_LIBCPP_COMPILER_MSVC) - // Yandex-specific: specialize the preceding constructor for the - // case of empty _Ul and _Tl to work around nvcc+msvc bug - // compiling libcxx std::map<int, int> m; m[1] = 2. - template <size_t ..._Uf, class ..._Tf, - class ..._Up> - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 - explicit - __tuple_impl(__tuple_indices<_Uf...>, __tuple_types<_Tf...>, - __tuple_indices<>, __tuple_types<>, - _Up&&... __u) - _NOEXCEPT_((__all<is_nothrow_constructible<_Tf, _Up>::value...>::value)) : - __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))... - {} - // End of Yandex-specific -#endif - template <class _Alloc, size_t ..._Uf, class ..._Tf, size_t ..._Ul, class ..._Tl, class ..._Up> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 diff --git a/contrib/libs/cxxsupp/libcxx/include/type_traits b/contrib/libs/cxxsupp/libcxx/include/type_traits index 469d82df51..b2be2f6130 100644 --- a/contrib/libs/cxxsupp/libcxx/include/type_traits +++ b/contrib/libs/cxxsupp/libcxx/include/type_traits @@ -761,17 +761,6 @@ template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::valu using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; #endif -// MSVC compiler doesn't support more that 4 byte alignment on the stack on Win32. -// If you try to pass parameter which is aligned by alignas to 8 or more bytes -// on Win32, MSVC throws compile error C2719. -// To avoid this compile error we delete all alignas specializations and use -// union alignment instead. Just like for double, this will mean that 8 bytes -// aligned types will only be aligned to 4 bytes on the stack. -// Larger alignments will generate assert error which is allowed by the standard -// since it is implementation-defined behavior. Default _Align argument will never -// be more than 8 bytes on Win32 and so will not generate assert errors. -#if !(defined(_LIBCPP_COMPILER_MSVC) && defined(_M_IX86)) - #define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \ template <size_t _Len>\ struct _LIBCPP_TEMPLATE_VIS aligned_storage<_Len, n>\ @@ -802,7 +791,6 @@ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000); #endif // !defined(_LIBCPP_OBJECT_FORMAT_COFF) #undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION -#endif // !(defined(_LIBCPP_COMPILER_MSVC) && defined(_M_IX86)) // aligned_union |