Browse Source

Remove more old patches

mikhnenko 1 year ago
parent
commit
0d259c4e4b

+ 0 - 3
contrib/libs/cxxsupp/libcxx/include/__config

@@ -41,9 +41,6 @@
 #  else
 #    define _LIBCPP_STD_VER 14
 #  endif
-
-#  define Y_UCRT_INCLUDE_NEXT(x) <Y_UCRT_INCLUDE/x>
-#  define Y_MSVC_INCLUDE_NEXT(x) <Y_MSVC_INCLUDE/x>
 #endif
 
 #ifdef __cplusplus

+ 5 - 2
contrib/libs/cxxsupp/libcxx/include/__tuple

@@ -87,6 +87,9 @@ template <size_t...> struct __tuple_indices {};
 
 template <class _IdxType, _IdxType... _Values>
 struct __integer_sequence {
+  template <template <class _OIdxType, _OIdxType...> class _ToIndexSeq, class _ToIndexType>
+  using __convert = _ToIndexSeq<_ToIndexType, _Values...>;
+
   template <size_t _Sp>
   using __to_tuple_indices = __tuple_indices<(_Values + _Sp)...>;
 };
@@ -402,13 +405,13 @@ template <bool ..._Preds>
 struct __all_dummy;
 
 template <bool ..._Pred>
-struct __all : _IsSame<__all_dummy<_Pred...>, __all_dummy<(_Pred, true)...>>{};
+struct __all : _IsSame<__all_dummy<_Pred...>, __all_dummy<((void)_Pred, true)...>> {};
 
 struct __tuple_sfinae_base {
   template <template <class, class...> class _Trait,
             class ..._LArgs, class ..._RArgs>
   static auto __do_test(__tuple_types<_LArgs...>, __tuple_types<_RArgs...>)
-    -> __all<_Trait<_LArgs, _RArgs>::value...>;
+    -> __all<__enable_if_t<_Trait<_LArgs, _RArgs>::value, bool>{true}...>;
   template <template <class...> class>
   static auto __do_test(...) -> false_type;
 

+ 1 - 10
contrib/libs/cxxsupp/libcxx/include/__utility/integer_sequence.h

@@ -43,17 +43,8 @@ using __make_integer_sequence _LIBCPP_NODEBUG = __make_integer_seq<integer_seque
 
 #else
 
-template <class _Tp, class _T> struct __integer_sequence_convert {
-    using type = integer_sequence<_Tp>;
-};
-
-template<class _Tp, class _Tp2, _Tp... _Values>
-struct __integer_sequence_convert<_Tp, __integer_sequence<_Tp2, _Values...>> {
-    using type = integer_sequence<_Tp, _Values...>;
-};
-
 template<typename _Tp, _Tp _Np> using __make_integer_sequence_unchecked _LIBCPP_NODEBUG =
-  typename __integer_sequence_convert<_Tp, typename __detail::__make<_Np>::type>::type;
+  typename __detail::__make<_Np>::type::template __convert<integer_sequence, _Tp>;
 
 template <class _Tp, _Tp _Ep>
 struct __make_integer_sequence_checked

+ 0 - 4
contrib/libs/cxxsupp/libcxx/include/cstddef

@@ -45,10 +45,6 @@ Types:
 #  pragma GCC system_header
 #endif
 
-#ifdef _LIBCPP_ABI_VCRUNTIME
-typedef double max_align_t;
-#endif
-
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 using ::nullptr_t;

+ 2 - 2
contrib/libs/cxxsupp/libcxx/include/deque

@@ -2431,7 +2431,7 @@ void
 deque<_Tp, _Allocator>::__add_front_capacity()
 {
     allocator_type& __a = __base::__alloc();
-    if (__back_spare() >= size_type(__base::__block_size))
+    if (__back_spare() >= __base::__block_size)
     {
         __base::__start_ += __base::__block_size;
         pointer __pt = __base::__map_.back();
@@ -2576,7 +2576,7 @@ void
 deque<_Tp, _Allocator>::__add_back_capacity()
 {
     allocator_type& __a = __base::__alloc();
-    if (__front_spare() >= size_type(__base::__block_size))
+    if (__front_spare() >= __base::__block_size)
     {
         __base::__start_ -= __base::__block_size;
         pointer __pt = __base::__map_.front();

+ 1 - 1
contrib/libs/cxxsupp/libcxx/include/mutex

@@ -717,7 +717,7 @@ call_once(once_flag& __flag, const _Callable& __func)
 #if defined(_LIBCPP_ABI_MICROSOFT)
     if (__flag.__state_.load(memory_order_relaxed) != ~once_flag::_State_type(0))
 #else
-    if (__flag.__state_ != ~once_flag::_State_type(0))
+    if (__libcpp_acquire_load(&__flag.__state_) != ~once_flag::_State_type(0))
 #endif
     {
         __call_once_param<const _Callable> __p(__func);

+ 13 - 13
contrib/libs/cxxsupp/libcxx/include/numbers

@@ -97,19 +97,19 @@ template <class _Tp> inline constexpr _Tp inv_sqrt3_v =  __illformed<_Tp>{};
 template <class _Tp> inline constexpr _Tp egamma_v =     __illformed<_Tp>{};
 template <class _Tp> inline constexpr _Tp phi_v =        __illformed<_Tp>{};
 
-template <floating_point _Tp> inline constexpr _Tp e_v<_Tp>          = 2.718281828459045235360287471352662L;
-template <floating_point _Tp> inline constexpr _Tp log2e_v<_Tp>      = 1.442695040888963407359924681001892L;
-template <floating_point _Tp> inline constexpr _Tp log10e_v<_Tp>     = 0.434294481903251827651128918916605L;
-template <floating_point _Tp> inline constexpr _Tp pi_v<_Tp>         = 3.141592653589793238462643383279502L;
-template <floating_point _Tp> inline constexpr _Tp inv_pi_v<_Tp>     = 0.318309886183790671537767526745028L;
-template <floating_point _Tp> inline constexpr _Tp inv_sqrtpi_v<_Tp> = 0.564189583547756286948079451560772L;
-template <floating_point _Tp> inline constexpr _Tp ln2_v<_Tp>        = 0.693147180559945309417232121458176L;
-template <floating_point _Tp> inline constexpr _Tp ln10_v<_Tp>       = 2.302585092994045684017991454684364L;
-template <floating_point _Tp> inline constexpr _Tp sqrt2_v<_Tp>      = 1.414213562373095048801688724209698L;
-template <floating_point _Tp> inline constexpr _Tp sqrt3_v<_Tp>      = 1.732050807568877293527446341505872L;
-template <floating_point _Tp> inline constexpr _Tp inv_sqrt3_v<_Tp>  = 0.577350269189625764509148780501957L;
-template <floating_point _Tp> inline constexpr _Tp egamma_v<_Tp>     = 0.577215664901532860606512090082402L;
-template <floating_point _Tp> inline constexpr _Tp phi_v<_Tp>        = 1.618033988749894848204586834365638L;
+template <floating_point _Tp> inline constexpr _Tp e_v<_Tp>          = 2.718281828459045235360287471352662;
+template <floating_point _Tp> inline constexpr _Tp log2e_v<_Tp>      = 1.442695040888963407359924681001892;
+template <floating_point _Tp> inline constexpr _Tp log10e_v<_Tp>     = 0.434294481903251827651128918916605;
+template <floating_point _Tp> inline constexpr _Tp pi_v<_Tp>         = 3.141592653589793238462643383279502;
+template <floating_point _Tp> inline constexpr _Tp inv_pi_v<_Tp>     = 0.318309886183790671537767526745028;
+template <floating_point _Tp> inline constexpr _Tp inv_sqrtpi_v<_Tp> = 0.564189583547756286948079451560772;
+template <floating_point _Tp> inline constexpr _Tp ln2_v<_Tp>        = 0.693147180559945309417232121458176;
+template <floating_point _Tp> inline constexpr _Tp ln10_v<_Tp>       = 2.302585092994045684017991454684364;
+template <floating_point _Tp> inline constexpr _Tp sqrt2_v<_Tp>      = 1.414213562373095048801688724209698;
+template <floating_point _Tp> inline constexpr _Tp sqrt3_v<_Tp>      = 1.732050807568877293527446341505872;
+template <floating_point _Tp> inline constexpr _Tp inv_sqrt3_v<_Tp>  = 0.577350269189625764509148780501957;
+template <floating_point _Tp> inline constexpr _Tp egamma_v<_Tp>     = 0.577215664901532860606512090082402;
+template <floating_point _Tp> inline constexpr _Tp phi_v<_Tp>        = 1.618033988749894848204586834365638;
 
 inline constexpr double e          = e_v<double>;
 inline constexpr double log2e      = log2e_v<double>;

+ 0 - 8
contrib/libs/cxxsupp/libcxx/include/type_traits

@@ -553,14 +553,6 @@ struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {};
 
 // is_same
 
-// Workaround for MSVC. Sometimes compiler thinks that sizeof...(Type) is parameter pack rather than the number.
-// So it doesn't allow sizeof...(Type) in expression that goes into the boolean template parameter of _MetaBase.
-// This simple wrapper allows us to hide sizeof... from the compiler.
-template<class... _Pack>
-struct _Sizeof {
-    static constexpr size_t value = sizeof...(_Pack);
-};
-
 template <class _Tp>
 using __test_for_primary_template = __enable_if_t<
     _IsSame<_Tp, typename _Tp::__primary_template>::value

+ 1 - 1
contrib/libs/cxxsupp/libcxx/include/valarray

@@ -2795,7 +2795,7 @@ public:
 };
 
 template<class _ValExpr>
-__val_expr<_ValExpr>::operator valarray<typename __val_expr<_ValExpr>::__result_type>() const
+__val_expr<_ValExpr>::operator valarray<__val_expr::__result_type>() const
 {
     valarray<__result_type> __r;
     size_t __n = __expr_.size();

+ 5 - 8
contrib/libs/cxxsupp/libcxx/include/variant

@@ -1250,21 +1250,18 @@ struct __all_overloads : _Bases... {
   using _Bases::operator()...;
 };
 
-// Change metaprogramming to satisfy MSVC. It doesn't like expression
-// __overload<_Types, _Idx>... when _Types comes from using parameter but
-// _Idx comes from structure template parameter. So I made them both
-// structure template parameters.
-template <class _IdxSeq, class ..._Types>
+template <class IdxSeq>
 struct __make_overloads_imp;
 
-template <size_t ..._Idx, class ..._Types>
-struct __make_overloads_imp<__tuple_indices<_Idx...>, _Types... > {
+template <size_t ..._Idx>
+struct __make_overloads_imp<__tuple_indices<_Idx...> > {
+  template <class ..._Types>
   using _Apply _LIBCPP_NODEBUG = __all_overloads<__overload<_Types, _Idx>...>;
 };
 
 template <class ..._Types>
 using _MakeOverloads _LIBCPP_NODEBUG = typename __make_overloads_imp<
-    __make_indices_imp<_Sizeof<_Types...>::value, 0>, _Types...>::_Apply;
+    __make_indices_imp<sizeof...(_Types), 0> >::template _Apply<_Types...>;
 
 template <class _Tp, class... _Types>
 using __best_match_t =

Some files were not shown because too many files changed in this diff