ae2f_docs
Fun.hpp
Go to the documentation of this file.
1/**
2 * @file Fun.hpp
3 * @author ae2f
4 * @brief
5 * @date 2025-02-01
6 *
7 * @copyright Copyright (c) 2025
8 *
9 */
10#ifndef ae2f_Cmp_Fun_hpp
11#define ae2f_Cmp_Fun_hpp
12
13#include "Fun.h"
14#include "../Cast.h"
15
16namespace ae2f {
17 using fpCmp_t = ae2f_fpCmp_t;
18
19 namespace Cmp {
28 }
29
30 /// @brief
31 /// Sugary type for C++ from @ref fpCmp_t.
32 /// @tparam T Type for
33 template<typename T>
34 using xfpCmp_t = Cmp::Fun::Ret_t(*)(const T*, const T*);
35
36 /// @brief
37 /// Returns itself as @ref fpCmp_t.
38 template<typename T>
40 return ae2f_union_cast(xfpCmp_t<T>, fpCmp_t, a);
41 }
42}
43
44#endif
#define ae2f_union_cast(tThen, tNow, v)
Makes a union that reads a memory in two methods. tThen -> tNow
Definition Cast.h:71
#define constexprmethod
Definition Constexpr.hpp:50
#define ae2f_CmpFunRet_LISLESSER
left is lesser
Definition Fun.h:40
#define ae2f_CmpFunRet_RISLESSER
right is lesser
Definition Fun.h:36
#define ae2f_CmpFunRet_EQUAL
they are same
Definition Fun.h:32
int ae2f_CmpFunRet_t
A predefined returning data type for ae2f_fpCmp_t.
Definition Fun.h:19
constexprmethod Ret_t EQUAL
Definition Fun.hpp:24
constexprmethod Ret_t LISLESSER
Definition Fun.hpp:25
ae2f_CmpFunRet_t Ret_t
Definition Fun.hpp:21
constexprmethod Ret_t RISLESSER
Definition Fun.hpp:26
This namespace contains the class from this library.
Definition BitVec.hpp:23
constexprmethod fpCmp_t xfpCmp(xfpCmp_t< T > a) noexcept
Returns itself as fpCmp_t.
Definition Fun.hpp:39
ae2f_fpCmp_t fpCmp_t
Definition Fun.hpp:17
Cmp::Fun::Ret_t(*)(const T *, const T *) xfpCmp_t
Sugary type for C++ from fpCmp_t.
Definition Fun.hpp:34