14 #ifndef RANGES_V3_FUNCTIONAL_COMPARISONS_HPP
15 #define RANGES_V3_FUNCTIONAL_COMPARISONS_HPP
21 #include <range/v3/detail/prologue.hpp>
29 template(
typename T,
typename U)(
30 requires equality_comparable_with<T, U>)
31 constexpr
bool operator()(T && t, U && u)
const
33 return (T &&) t == (U &&) u;
35 using is_transparent = void;
40 template(
typename T,
typename U)(
41 requires equality_comparable_with<T, U>)
42 constexpr
bool operator()(T && t, U && u)
const
44 return !
equal_to{}((T &&) t, (U &&) u);
46 using is_transparent = void;
51 template(
typename T,
typename U)(
52 requires totally_ordered_with<T, U>)
53 constexpr
bool operator()(T && t, U && u)
const
55 return (T &&) t < (U &&) u;
57 using is_transparent = void;
62 template(
typename T,
typename U)(
63 requires totally_ordered_with<T, U>)
64 constexpr
bool operator()(T && t, U && u)
const
66 return !
less{}((U &&) u, (T &&) t);
68 using is_transparent = void;
73 template(
typename T,
typename U)(
74 requires totally_ordered_with<T, U>)
75 constexpr
bool operator()(T && t, U && u)
const
77 return !
less{}((T &&) t, (U &&) u);
79 using is_transparent = void;
84 template(
typename T,
typename U)(
85 requires totally_ordered_with<T, U>)
86 constexpr
bool operator()(T && t, U && u)
const
88 return less{}((U &&) u, (T &&) t);
90 using is_transparent = void;
93 using ordered_less RANGES_DEPRECATED(
94 "Repace uses of ranges::ordered_less with ranges::less") =
less;
96 #if __cplusplus > 201703L && __has_include(<compare>) && \
97 defined(__cpp_concepts) && defined(__cpp_impl_three_way_comparison)
98 struct compare_three_way
100 template(
typename T,
typename U)(
101 requires three_way_comparable_with<T, U>)
102 constexpr
auto operator()(T && t, U && u)
const
103 -> decltype((T &&) t <=> (U &&) u)
105 return (T &&) t <=> (U &&) u;
108 using is_transparent =
void;
124 #include <range/v3/detail/epilogue.hpp>
bool_<(T::type::value >=U::type::value)> greater_equal
A Boolean integral constant wrapper around true if T::type::value is greater than or equal to U::type...
Definition: meta.hpp:261
bool_< T::type::value !=U::type::value > not_equal_to
A Boolean integral constant wrapper around the result of comparing T::type::value and U::type::value ...
Definition: meta.hpp:243
bool_<(T::type::value<=U::type::value)> less_equal
A Boolean integral constant wrapper around true if T::type::value is less than or equal to U::type::v...
Definition: meta.hpp:267
bool_<(T::type::value< U::type::value)> less
A Boolean integral constant wrapper around true if T::type::value is less than U::type::value; false,...
Definition: meta.hpp:255
bool_< T::type::value==U::type::value > equal_to
A Boolean integral constant wrapper around the result of comparing T::type::value and U::type::value ...
Definition: meta.hpp:237
bool_<(T::type::value > U::type::value)> greater
A Boolean integral constant wrapper around true if T::type::value is greater than U::type::value; fal...
Definition: meta.hpp:249
Definition: comparisons.hpp:28
Definition: comparisons.hpp:72
Definition: comparisons.hpp:83
Definition: comparisons.hpp:61
Definition: comparisons.hpp:50
Definition: comparisons.hpp:39