We instantiate directly with the decltype of a function
pointer now, so thereis no need to construct the pointer
via a secondary type anymore.
namespace hooks {
-template<typename SignatureT, typename Base>
+template<typename Signature, typename Base>
struct hook
{
- using Signature = SignatureT*;
Signature original = nullptr;
void init() noexcept
}
};
-#define HOOK(name) struct name ## _t : public hook<decltype(::name), name ## _t> { \
+#define HOOK(name) struct name ## _t : public hook<decltype(&::name), name ## _t> { \
static constexpr const char* identifier = #name; } name
HOOK(malloc);