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
9template <typename T>
11
12template <typename R, typename C, typename... Args>
13struct 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
static constexpr size_t Arity
定义 FunctionTraits.hpp:18
C ClassType
定义 FunctionTraits.hpp:15
R ReturnType
定义 FunctionTraits.hpp:16
std::tuple< Args... > ArgTuple
定义 FunctionTraits.hpp:17
定义 FunctionTraits.hpp:10