summaryrefslogtreecommitdiff
path: root/src/util/callback.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/callback.h')
-rw-r--r--src/util/callback.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util/callback.h b/src/util/callback.h
index a2c9477..ef4e815 100644
--- a/src/util/callback.h
+++ b/src/util/callback.h
@@ -1,16 +1,17 @@
#pragma once
#include "typedef.h"
+template <typename T> struct __strip_ref { using type = T; };
+template <typename T> struct __strip_ref<T&> { using type = T; };
+template <typename T> struct __strip_ref<T&&> { using type = T; };
+template <typename R, typename... A> struct __strip_ref<R(A...)> { using type = R(*)(A...); };
+template <typename R, typename... A> struct __strip_ref<R(&)(A...)> { using type = R(*)(A...); };
+
template <typename T>
struct FN;
// voodoo
template <typename RET, typename... ARGS>
struct FN<RET(ARGS...)> {
- template <typename T> struct __strip_ref { using type = T; };
- template <typename T> struct __strip_ref<T&> { using type = T; };
- template <typename T> struct __strip_ref<T&&> { using type = T; };
- template <typename R, typename... A> struct __strip_ref<R(A...)> { using type = R(*)(A...); };
- template <typename R, typename... A> struct __strip_ref<R(&)(A...)> { using type = R(*)(A...); };
static const unsigned int BUF_SIZE = 32;