File indexing completed on 2026-05-03 08:13:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP___COMPARE_COMPARE_THREE_WAY_H
0011 #define _LIBCPP___COMPARE_COMPARE_THREE_WAY_H
0012
0013 #include <__compare/three_way_comparable.h>
0014 #include <__config>
0015 #include <__utility/forward.h>
0016
0017 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0018 # pragma GCC system_header
0019 #endif
0020
0021 _LIBCPP_BEGIN_NAMESPACE_STD
0022
0023 #if _LIBCPP_STD_VER >= 20
0024
0025 struct _LIBCPP_TEMPLATE_VIS compare_three_way {
0026 template <class _T1, class _T2>
0027 requires three_way_comparable_with<_T1, _T2>
0028 constexpr _LIBCPP_HIDE_FROM_ABI auto operator()(_T1&& __t, _T2&& __u) const
0029 noexcept(noexcept(std::forward<_T1>(__t) <=> std::forward<_T2>(__u))) {
0030 return std::forward<_T1>(__t) <=> std::forward<_T2>(__u);
0031 }
0032
0033 using is_transparent = void;
0034 };
0035
0036 #endif
0037
0038 _LIBCPP_END_NAMESPACE_STD
0039
0040 #endif