Arduino Filters master
Filter 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
7AH_DIAGNOSTIC_WERROR() // Enable errors on warnings
8
9#include <AH/Settings/NamespaceSettings.hpp>
10
12
13template <class T>
15
16template <class Return, class... Args>
17struct function_traits<Return(Args...)> {
18 static constexpr size_t number_arguments = sizeof...(Args);
19
20 using return_t = Return;
21 template <size_t Index>
22 struct argument {
23 using type =
24 typename std::tuple_element<Index, std::tuple<Args...>>::type;
25 };
26
27 template <size_t Index>
29};
30
32
#define END_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
#define AH_DIAGNOSTIC_POP()
Definition: Warnings.hpp:36
#define AH_DIAGNOSTIC_WERROR()
Definition: Warnings.hpp:35
typename std::tuple_element< Index, std::tuple< Args... > >::type type
typename argument< Index >::type argument_t