ae2f_docs
Cmp.hpp
Go to the documentation of this file.
1/**
2 * @file Cmp.hpp
3 * @author ae2f
4 * @brief
5 * @date 2025-02-01
6 *
7 * @copyright Copyright (c) 2025
8 *
9 */
10#if !defined(ae2f_Macro_Compare_hpp)
11#define ae2f_Macro_Compare_hpp
12
13#include "./Cmp.h"
14#include "./Cmp/Fun.hpp"
15
16namespace ae2f {
17 namespace Cmp {
18 /// @warning
19 /// Two parameters must be comparable with operator.
20 /// @return
21 /// One bigger.
22 template<typename T, typename K = T, typename R = T>
23 constexprmethod R TakeGt(T a, K b) { return ae2f_CmpGetGt(a, b); }
24
25 /// @warning
26 /// Two parameters must be comparable with operator.
27 /// @return
28 /// One smaller.
29 template<typename T, typename K = T, typename R = T>
30 constexprmethod R TakeLs(T a, K b) { return ae2f_CmpGetLs(a, b); }
31
32 /// @return
33 /// The absolute different of two.
34 template<typename T, typename K = T, typename R = T>
35 constexprmethod R Diff(T a, K b) { return ae2f_CmpDiff(a, b); }
36 }
37}
38
39#endif // !defined(ae2f_Macro_Compare_hpp)
#define ae2f_CmpGetGt(a, b)
Definition Cmp.h:20
#define ae2f_CmpGetLs(a, b)
Definition Cmp.h:26
#define ae2f_CmpDiff(a, b)
Definition Cmp.h:30
#define constexprmethod
Definition Constexpr.hpp:50
constexprmethod R TakeLs(T a, K b)
Definition Cmp.hpp:30
constexprmethod R TakeGt(T a, K b)
Definition Cmp.hpp:23
constexprmethod R Diff(T a, K b)
Definition Cmp.hpp:35
This namespace contains the class from this library.
Definition BitVec.hpp:23