summaryrefslogtreecommitdiff
path: root/src/util/callback.h
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-07-26 02:58:07 +0200
committeraura <nw@moneybot.cc>2026-07-26 02:58:07 +0200
commit5f2c7110a1880fde47317cb920db978d6995638f (patch)
treec8ca6674194d7a522408af8cfe5b2f96e2e68f84 /src/util/callback.h
parent2cd0e46e450c89db5e7eac1a02e28000256db1d8 (diff)
list utils
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;