#include #include SafetyHookInline hook0, hook1, hook2, hook3; SAFETYHOOK_NOINLINE void say_hi(const std::string& name) { std::println("hello {}", name); } void hook0_fn(const std::string& name) { hook0.call(name + " and bob"); } void hook1_fn(const std::string& name) { hook1.call(name + " and alice"); } void hook2_fn(const std::string& name) { hook2.call(name + " and eve"); } void hook3_fn(const std::string& name) { hook3.call(name + " and carol"); } int main() { hook0 = safetyhook::create_inline(reinterpret_cast(say_hi), reinterpret_cast(hook0_fn)); hook1 = safetyhook::create_inline(reinterpret_cast(say_hi), reinterpret_cast(hook1_fn)); hook2 = safetyhook::create_inline(reinterpret_cast(say_hi), reinterpret_cast(hook2_fn)); hook3 = safetyhook::create_inline(reinterpret_cast(say_hi), reinterpret_cast(hook3_fn)); say_hi("world"); return 0; }