12#if !defined(_INCLUDE_MM_TYPE_HPP_)
13#define _INCLUDE_MM_TYPE_HPP_ 1
69 static constexpr size_t NArgs =
sizeof...(Args);
83template <
typename Ret,
typename...
Args>
90template <
typename Ret,
typename Cl,
typename...
Args>
97template <
typename Ret,
typename Cl,
typename...
Args>
148template <
template <
typename...>
typename Tt,
typename Ti>
151 static constexpr bool value =
false;
155template <
template <
typename...>
typename Tt,
typename...
Ti>
174template <
typename F, std::
size_t N,
typename T>
177 static constexpr bool value = std::is_same<
179 typename std::tuple_element<N, function_arg_tuple_t<F>>::type,
192 using Targs = std::tuple<typename std::decay<T>::type...>;
196 std::is_same<_Ret, R>::value &&
197 std::is_same<_Args, Targs>::value;
204template <
bool cond,
typename T>
215 static constexpr size_t value =
A1;
218template <std::size_t
A1, std::size_t
A2, std::size_t...
An>
221 static constexpr size_t value =
A1 >=
A2 ?
236 static constexpr bool value =
A1;
239template <
bool A1,
bool A2,
bool...
An>
结果类
Definition mm_result.hpp:415
typename function_trait< F >::return_type_t function_return_type_t
取得函数的返回值类型
Definition mm_type.hpp:126
typename function_trait< F >::arg_tuple_t function_arg_tuple_t
取得函数的参数类型
Definition mm_type.hpp:133
typename std::enable_if< cond, T >::type enable_if_t
enable_if_t, 和cpp14一样(但是这里是cpp11呜呜呜)
Definition mm_type.hpp:205
Definition mm_parser.hpp:17
取得and
Definition mm_type.hpp:232
取得函数的参数的个数
Definition mm_type.hpp:140
static constexpr std::size_t N
Definition mm_type.hpp:141
表示第n个参数应该拥有类型T
Definition mm_type.hpp:176
static constexpr bool value
Definition mm_type.hpp:177
表示检查函数参数有多少个
Definition mm_type.hpp:166
static constexpr bool value
Definition mm_type.hpp:167
Definition mm_type.hpp:107
取得函数的各种细节
Definition mm_type.hpp:117
用于存放函数类型信息的东东
Definition mm_type.hpp:65
std::tuple< Args... > arg_tuple_t
参数(元组)
Definition mm_type.hpp:71
static constexpr size_t NArgs
参数数目
Definition mm_type.hpp:69
检查函数F的类型为 ( T1, T2 ...) -> R
Definition mm_type.hpp:189
static constexpr bool value
Definition mm_type.hpp:194
std::tuple< typename std::decay< T >::type... > Targs
Definition mm_type.hpp:192
details::function_return_type_t< F > _Ret
Definition mm_type.hpp:190
details::function_arg_tuple_t< F > _Args
Definition mm_type.hpp:191
判断Ti是否为模板Tt的实例化
Definition mm_type.hpp:150
static constexpr bool value
Definition mm_type.hpp:151
取得最大值
Definition mm_type.hpp:211
单位类型
Definition mm_type.hpp:29
constexpr bool operator!=(unit_t) noexcept
Definition mm_type.hpp:35
constexpr bool operator>=(unit_t) noexcept
Definition mm_type.hpp:55
constexpr bool operator<=(unit_t) noexcept
Definition mm_type.hpp:50
constexpr bool operator==(unit_t) noexcept
Definition mm_type.hpp:30
constexpr bool operator>(unit_t) noexcept
Definition mm_type.hpp:45
constexpr bool operator<(unit_t) noexcept
Definition mm_type.hpp:40