Arduino Helpers master
Utility library for Arduino
FunctionTraits.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <AH/STL/cstddef>
4#include <AH/STL/tuple>
5
7
9
10template <class T>
12
13template <class Return, class... Args>
14struct function_traits<Return(Args...)> {
15 static constexpr size_t number_arguments = sizeof...(Args);
16
17 using return_t = Return;
18 template <size_t Index>
19 struct argument {
20 using type =
21 typename std::tuple_element<Index, std::tuple<Args...>>::type;
22 };
23
24 template <size_t Index>
26};
27
#define END_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
typename std::tuple_element< Index, std::tuple< Args... > >::type type
typename argument< Index >::type argument_t