lxgui
include
lxgui
utils_meta.hpp
1
#ifndef LXGUI_UTILS_META_HPP
2
#define LXGUI_UTILS_META_HPP
3
4
#include "lxgui/lxgui.hpp"
5
6
#include <type_traits>
7
8
namespace
lxgui::utils
{
9
10
namespace
impl {
11
template
<
typename
T>
12
struct
first_function_argument_
;
13
14
template
<
typename
R,
typename
T,
typename
... Args>
15
struct
first_function_argument_
<R (*)(T, Args...)> {
16
using
type
= T;
17
};
18
19
template
<
typename
R,
typename
F,
typename
T,
typename
... Args>
20
struct
first_function_argument_
<R (F::*)(T, Args...)> {
21
using
type
= T;
22
};
23
24
template
<
typename
R,
typename
F,
typename
T,
typename
... Args>
25
struct
first_function_argument_
<R (F::*)(T, Args...) const> {
26
using
type
= T;
27
};
28
}
// namespace impl
29
30
template
<
typename
T>
31
using
first_function_argument
=
32
typename
impl::first_function_argument_
<decltype(&std::decay_t<T>::operator())>::type;
33
34
}
// namespace lxgui::utils
35
36
#endif
lxgui::utils
Definition:
utils_exception.cpp:3
lxgui::utils::first_function_argument
typename impl::first_function_argument_< decltype(&std::decay_t< T >::operator())>::type first_function_argument
Definition:
utils_meta.hpp:32
lxgui::utils::impl::first_function_argument_< R(F::*)(T, Args...) const >::type
T type
Definition:
utils_meta.hpp:26
lxgui::utils::impl::first_function_argument_< R(F::*)(T, Args...)>::type
T type
Definition:
utils_meta.hpp:21
lxgui::utils::impl::first_function_argument_< R(*)(T, Args...)>::type
T type
Definition:
utils_meta.hpp:16
lxgui::utils::impl::first_function_argument_
Definition:
utils_meta.hpp:12
Generated on Sun Oct 8 2023 09:07:52 for lxgui by
1.9.1