Arduino Filters
master
Filter library for Arduino
src
AH
Types
FunctionTraits.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <AH/STL/cstddef>
4
#include <AH/STL/tuple>
5
6
#include <
AH/Settings/Warnings.hpp
>
7
AH_DIAGNOSTIC_WERROR
()
// Enable errors on warnings
8
9
#include <AH/Settings/NamespaceSettings.hpp>
10
11
BEGIN_AH_NAMESPACE
12
13
template
<
class
T>
14
struct
function_traits
;
15
16
template
<
class
Return,
class
... Args>
17
struct
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>
28
using
argument_t
=
typename
argument<Index>::type
;
29
};
30
31
END_AH_NAMESPACE
32
33
AH_DIAGNOSTIC_POP
()
END_AH_NAMESPACE
#define END_AH_NAMESPACE
Definition:
NamespaceSettings.hpp:10
BEGIN_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Definition:
NamespaceSettings.hpp:9
Warnings.hpp
AH_DIAGNOSTIC_POP
#define AH_DIAGNOSTIC_POP()
Definition:
Warnings.hpp:36
AH_DIAGNOSTIC_WERROR
#define AH_DIAGNOSTIC_WERROR()
Definition:
Warnings.hpp:35
function_traits< Return(Args...)>::argument::type
typename std::tuple_element< Index, std::tuple< Args... > >::type type
Definition:
FunctionTraits.hpp:24
function_traits< Return(Args...)>::argument_t
typename argument< Index >::type argument_t
Definition:
FunctionTraits.hpp:28
function_traits< Return(Args...)>::return_t
Return return_t
Definition:
FunctionTraits.hpp:20
function_traits
Definition:
FunctionTraits.hpp:14
Generated by
1.9.4