12 struct function_info_impl;
14 template <
typename Ret,
typename... Args>
15 struct function_info_impl<Ret(Args...)> {
16 using return_type = Ret;
17 using argument_types = tmpl::list<Args...>;
18 using class_type = void;
21 template <
typename Ret,
typename... Args>
22 struct function_info_impl<Ret(Args...) noexcept> {
23 using return_type = Ret;
24 using argument_types = tmpl::list<Args...>;
25 using class_type = void;
28 #define FUNCTION_INFO_IMPL_FUNCTION_PTR(MODIFIERS, NOEXCEPT_STATUS) \
29 template <typename Ret, \
31 struct function_info_impl<Ret (*MODIFIERS)(Args...) NOEXCEPT_STATUS> { \
32 using return_type = Ret; \
33 using argument_types = tmpl::list<Args...>; \
34 using class_type = void; \
37 FUNCTION_INFO_IMPL_FUNCTION_PTR(, );
38 FUNCTION_INFO_IMPL_FUNCTION_PTR(, noexcept);
39 FUNCTION_INFO_IMPL_FUNCTION_PTR(
const, );
40 FUNCTION_INFO_IMPL_FUNCTION_PTR(
const, noexcept);
41 FUNCTION_INFO_IMPL_FUNCTION_PTR(
volatile, );
42 FUNCTION_INFO_IMPL_FUNCTION_PTR(
volatile, noexcept);
43 FUNCTION_INFO_IMPL_FUNCTION_PTR(
const volatile, );
44 FUNCTION_INFO_IMPL_FUNCTION_PTR(
const volatile, noexcept);
45 #undef FUNCTION_INFO_IMPL_FUNCTION_PTR
47 #define FUNCTION_INFO_IMPL_CLASS(MODIFIERS) \
48 template <typename Ret, typename Class, \
50 struct function_info_impl<Ret (Class::*)(Args...) MODIFIERS> { \
51 using return_type = Ret; \
52 using argument_types = tmpl::list<Args...>; \
53 using class_type = Class; \
56 FUNCTION_INFO_IMPL_CLASS();
57 FUNCTION_INFO_IMPL_CLASS(
const);
58 FUNCTION_INFO_IMPL_CLASS(noexcept);
59 FUNCTION_INFO_IMPL_CLASS(
volatile);
60 FUNCTION_INFO_IMPL_CLASS(
const noexcept);
61 FUNCTION_INFO_IMPL_CLASS(
const volatile);
62 FUNCTION_INFO_IMPL_CLASS(
const volatile noexcept);
63 FUNCTION_INFO_IMPL_CLASS(
volatile noexcept);
64 #undef FUNCTION_INFO_IMPL_CLASS