cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
less.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_VALUE_FUNCTIONS_LESS_H
4#define pRC_CORE_VALUE_FUNCTIONS_LESS_H
5
8
9namespace pRC
10{
11 template<IsValue TA, IsValue TB>
12 static inline constexpr auto operator<(TA const &a, TB const &b)
13 {
14 return a() < b();
15 }
16
17 template<IsInteger TA, IsInteger TB>
18 static inline constexpr auto operator<(TA const &a, TB const &b)
19 {
20 return a() < b();
21 }
22
23 template<IsSignedInteger TA, IsUnsignedInteger TB>
24 static inline constexpr auto operator<(TA const &a, TB const &b)
25 {
26 return a < zero() ? true : a() < b();
27 }
28
29 template<IsUnsignedInteger TA, IsSignedInteger TB>
30 static inline constexpr auto operator<(TA const &a, TB const &b)
31 {
32 return b < zero() ? false : a() < b();
33 }
34}
35#endif // pRC_CORE_VALUE_FUNCTIONS_LESS_H
Definition cholesky.hpp:10
static constexpr auto operator<(X &&a, T< Void > const)
Definition less.hpp:16
static constexpr auto zero()
Definition zero.hpp:12