Iros
 
Loading...
Searching...
No Matches
compare.h
Go to the documentation of this file.
1#pragma once
2
5#include "di/meta/compare.h"
6
7namespace di::function {
8struct Compare {
9 template<typename T, concepts::ThreeWayComparableWith<T> U>
10 constexpr auto operator()(T const& a, U const& b) const -> meta::CompareThreeWayResult<T, U> {
12 return math::cmp_three_way(a, b);
13 } else {
14 return a <=> b;
15 }
16 }
17};
18
20}
21
22namespace di {
24using function::Compare;
25}
Definition language.h:215
Definition as_bool.h:8
constexpr auto compare
Definition compare.h:19
constexpr auto curry_back
Definition curry_back.h:141
constexpr auto cmp_three_way
Definition cmp_three_way.h:24
meta::Type< detail::CompareThreeWayResultHelper< T, U > > CompareThreeWayResult
Definition compare.h:133
constexpr auto c_
A value of type Constexpr<val>.
Definition constexpr.h:252
Definition zstring_parser.h:9
Definition compare.h:8
constexpr auto operator()(T const &a, U const &b) const -> meta::CompareThreeWayResult< T, U >
Definition compare.h:10