31#define _RANGES_CMP_H 1
33#if __cplusplus > 201703L
37namespace std _GLIBCXX_VISIBILITY(default)
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
41 struct __is_transparent;
49 template<
typename _Tp>
52 operator()(_Tp&& __t)
const noexcept
53 {
return std::forward<_Tp>(__t); }
55 using is_transparent = __is_transparent;
58#ifdef __cpp_lib_concepts
60#if __cplusplus > 202002L
61#define __cpp_lib_ranges 202202L
63#define __cpp_lib_ranges 202110L
73 template<
typename _Tp,
typename _Up>
74 concept __less_builtin_ptr_cmp
75 =
requires (_Tp&& __t, _Up&& __u) { { __t < __u } -> same_as<bool>; }
76 && convertible_to<_Tp, const volatile void*>
77 && convertible_to<_Up, const volatile void*>
78 && (!
requires(_Tp&& __t, _Up&& __u)
79 { operator<(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
80 && !
requires(_Tp&& __t, _Up&& __u)
81 { std::forward<_Tp>(__t).operator<(std::forward<_Up>(__u)); });
92 template<
typename _Tp,
typename _Up>
93 requires equality_comparable_with<_Tp, _Up>
95 operator()(_Tp&& __t, _Up&& __u)
const
96 noexcept(
noexcept(std::declval<_Tp>() == std::declval<_Up>()))
97 {
return std::forward<_Tp>(__t) == std::forward<_Up>(__u); }
99 using is_transparent = __is_transparent;
105 template<
typename _Tp,
typename _Up>
106 requires equality_comparable_with<_Tp, _Up>
108 operator()(_Tp&& __t, _Up&& __u)
const
109 noexcept(
noexcept(std::declval<_Up>() == std::declval<_Tp>()))
110 {
return !
equal_to{}(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
112 using is_transparent = __is_transparent;
118 template<
typename _Tp,
typename _Up>
119 requires totally_ordered_with<_Tp, _Up>
121 operator()(_Tp&& __t, _Up&& __u)
const
122 noexcept(
noexcept(std::declval<_Tp>() < std::declval<_Up>()))
124 if constexpr (__detail::__less_builtin_ptr_cmp<_Tp, _Up>)
126 if (std::__is_constant_evaluated())
129 auto __x =
reinterpret_cast<__UINTPTR_TYPE__
>(
130 static_cast<const volatile void*
>(std::forward<_Tp>(__t)));
131 auto __y =
reinterpret_cast<__UINTPTR_TYPE__
>(
132 static_cast<const volatile void*
>(std::forward<_Up>(__u)));
136 return std::forward<_Tp>(__t) < std::forward<_Up>(__u);
139 using is_transparent = __is_transparent;
145 template<
typename _Tp,
typename _Up>
146 requires totally_ordered_with<_Tp, _Up>
148 operator()(_Tp&& __t, _Up&& __u)
const
149 noexcept(
noexcept(std::declval<_Up>() < std::declval<_Tp>()))
150 {
return less{}(std::forward<_Up>(__u), std::forward<_Tp>(__t)); }
152 using is_transparent = __is_transparent;
158 template<
typename _Tp,
typename _Up>
159 requires totally_ordered_with<_Tp, _Up>
161 operator()(_Tp&& __t, _Up&& __u)
const
162 noexcept(
noexcept(std::declval<_Tp>() < std::declval<_Up>()))
163 {
return !
less{}(std::forward<_Tp>(__t), std::forward<_Up>(__u)); }
165 using is_transparent = __is_transparent;
171 template<
typename _Tp,
typename _Up>
172 requires totally_ordered_with<_Tp, _Up>
174 operator()(_Tp&& __t, _Up&& __u)
const
175 noexcept(
noexcept(std::declval<_Up>() < std::declval<_Tp>()))
176 {
return !
less{}(std::forward<_Up>(__u), std::forward<_Tp>(__t)); }
178 using is_transparent = __is_transparent;
183_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
[func.identity] The identity function.
ranges::equal_to function object type.
ranges::not_equal_to function object type.
ranges::less function object type.
ranges::greater function object type.
ranges::greater_equal function object type.
ranges::less_equal function object type.