One Framework
0.1.0
RoboMaster嵌入式框架“一键”解决方案,为你的“创意”服务。
载入中...
搜索中...
未找到
FunctionTraits.hpp
浏览该文件的文档.
1
// Copyright (c) 2025. MoonFeather
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#ifndef FUNCTIONTRAITS_HPP
5
#define FUNCTIONTRAITS_HPP
6
7
#include <tuple>
8
9
template
<
typename
T>
10
struct
FunctionTraits
;
11
12
template
<
typename
R,
typename
C,
typename
... Args>
13
struct
FunctionTraits
<R(C::*)(Args...)>
14
{
15
using
ClassType
= C;
16
using
ReturnType
= R;
17
using
ArgTuple
= std::tuple<Args...>;
18
static
constexpr
size_t
Arity
=
sizeof
...(Args);
19
};
20
21
22
#endif
//FUNCTIONTRAITS_HPP
FunctionTraits< R(C::*)(Args...)>::Arity
static constexpr size_t Arity
定义
FunctionTraits.hpp:18
FunctionTraits< R(C::*)(Args...)>::ClassType
C ClassType
定义
FunctionTraits.hpp:15
FunctionTraits< R(C::*)(Args...)>::ReturnType
R ReturnType
定义
FunctionTraits.hpp:16
FunctionTraits< R(C::*)(Args...)>::ArgTuple
std::tuple< Args... > ArgTuple
定义
FunctionTraits.hpp:17
FunctionTraits
定义
FunctionTraits.hpp:10
OF
lib
applications
PRTS
FunctionTraits.hpp
制作者
1.13.2