diff options
| author | arcadia-devtools <[email protected]> | 2022-02-17 14:08:52 +0300 | 
|---|---|---|
| committer | arcadia-devtools <[email protected]> | 2022-02-17 14:08:52 +0300 | 
| commit | 3dba88133a0e2bf63394fdba2affc51a771eff03 (patch) | |
| tree | d9eb307b57b580fca9129fd335395da3ecde090c /contrib/libs/cxxsupp/libcxx | |
| parent | 7db3dbedca2bc003b50e7cb8854706857eff1880 (diff) | |
intermediate changes
ref:73d3ea9a7c192b4410fcc6adf2c7999b376ed281
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx')
| -rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/tuple | 42 | 
1 files changed, 37 insertions, 5 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/tuple b/contrib/libs/cxxsupp/libcxx/include/tuple index 9b127953b3b..be57f984dd6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/tuple +++ b/contrib/libs/cxxsupp/libcxx/include/tuple @@ -132,11 +132,14 @@ template <class T1, class... T>  // 20.4.1.6, relational operators:  template<class... T, class... U> bool operator==(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14 -template<class... T, class... U> bool operator<(const tuple<T...>&, const tuple<U...>&);  // constexpr in C++14 -template<class... T, class... U> bool operator!=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14 -template<class... T, class... U> bool operator>(const tuple<T...>&, const tuple<U...>&);  // constexpr in C++14 -template<class... T, class... U> bool operator<=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14 -template<class... T, class... U> bool operator>=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14 +template<class... T, class... U> bool operator<(const tuple<T...>&, const tuple<U...>&);  // constexpr in C++14, removed in C++20 +template<class... T, class... U> bool operator!=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14, removed in C++20 +template<class... T, class... U> bool operator>(const tuple<T...>&, const tuple<U...>&);  // constexpr in C++14, removed in C++20 +template<class... T, class... U> bool operator<=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14, removed in C++20 +template<class... T, class... U> bool operator>=(const tuple<T...>&, const tuple<U...>&); // constexpr in C++14, removed in C++20 +template<class... T, class... U> +  constexpr common_comparison_category_t<synth-three-way-result<T, U>...> +    operator<=>(const tuple<T...>&, const tuple<U...>&);                                  // since C++20  template <class... Types, class Alloc>    struct uses_allocator<tuple<Types...>, Alloc>; @@ -149,6 +152,8 @@ template <class... Types>  */ +#include <__compare/common_comparison_category.h> +#include <__compare/synth_three_way.h>  #include <__config>  #include <__functional/unwrap_ref.h>  #include <__functional_base> @@ -156,6 +161,7 @@ template <class... Types>  #include <__memory/uses_allocator.h>  #include <__tuple>  #include <__utility/forward.h> +#include <__utility/integer_sequence.h>  #include <__utility/move.h>  #include <compare>  #include <cstddef> @@ -1317,6 +1323,30 @@ operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)      return __tuple_equal<sizeof...(_Tp)>()(__x, __y);  } +#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_SPACESHIP_OPERATOR) && !defined(_LIBCPP_HAS_NO_CONCEPTS) + +// operator<=> + +template <class ..._Tp, class ..._Up, size_t ..._Is> +_LIBCPP_HIDE_FROM_ABI constexpr +auto +__tuple_compare_three_way(const tuple<_Tp...>& __x, const tuple<_Up...>& __y, index_sequence<_Is...>) { +    common_comparison_category_t<__synth_three_way_result<_Tp, _Up>...> __result = strong_ordering::equal; +    static_cast<void>(((__result = _VSTD::__synth_three_way(_VSTD::get<_Is>(__x), _VSTD::get<_Is>(__y)), __result != 0) || ...)); +    return __result; +} + +template <class ..._Tp, class ..._Up> +requires (sizeof...(_Tp) == sizeof...(_Up)) +_LIBCPP_HIDE_FROM_ABI constexpr +common_comparison_category_t<__synth_three_way_result<_Tp, _Up>...> +operator<=>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y) +{ +    return _VSTD::__tuple_compare_three_way(__x, __y, index_sequence_for<_Tp...>{}); +} + +#else // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_SPACESHIP_OPERATOR) && !defined(_LIBCPP_HAS_NO_CONCEPTS) +  template <class ..._Tp, class ..._Up>  inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11  bool @@ -1385,6 +1415,8 @@ operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)      return !(__y < __x);  } +#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_SPACESHIP_OPERATOR) && !defined(_LIBCPP_HAS_NO_CONCEPTS) +  // tuple_cat  template <class _Tp, class _Up> struct __tuple_cat_type;  | 
