diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__compare/compare_three_way_result.h')
-rw-r--r-- | contrib/llvm-project/libcxx/include/__compare/compare_three_way_result.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/contrib/llvm-project/libcxx/include/__compare/compare_three_way_result.h b/contrib/llvm-project/libcxx/include/__compare/compare_three_way_result.h index 632ebdce1bce..d7508073433a 100644 --- a/contrib/llvm-project/libcxx/include/__compare/compare_three_way_result.h +++ b/contrib/llvm-project/libcxx/include/__compare/compare_three_way_result.h @@ -21,20 +21,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD #if _LIBCPP_STD_VER >= 20 -template<class, class, class> -struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result { }; - -template<class _Tp, class _Up> -struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result<_Tp, _Up, decltype( - std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>(), void() -)> { - using type = decltype(std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>()); +template <class, class, class> +struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result {}; + +template <class _Tp, class _Up> +struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result< + _Tp, + _Up, + decltype(std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>(), void())> { + using type = decltype(std::declval<__make_const_lvalue_ref<_Tp>>() <=> std::declval<__make_const_lvalue_ref<_Up>>()); }; -template<class _Tp, class _Up = _Tp> -struct _LIBCPP_TEMPLATE_VIS compare_three_way_result : __compare_three_way_result<_Tp, _Up, void> { }; +template <class _Tp, class _Up = _Tp> +struct _LIBCPP_TEMPLATE_VIS compare_three_way_result : __compare_three_way_result<_Tp, _Up, void> {}; -template<class _Tp, class _Up = _Tp> +template <class _Tp, class _Up = _Tp> using compare_three_way_result_t = typename compare_three_way_result<_Tp, _Up>::type; #endif // _LIBCPP_STD_VER >= 20 |