31 static_assert(std::is_default_constructible_v<Ret>,
"a hooked return type must default-construct");
45 const Ret&
Value() const& noexcept {
return _value; }
46 Ret
Value() && {
return std::move(_value); }
static HookResult Block()
HookAction Action() const noexcept
static HookResult Replace(Ret value)
HookAction Action() const noexcept
static HookResult Block(Ret value)
const Ret & Value() const &noexcept
@ Replace
Let it run, but return this value instead of its own.
@ Allow
Let the engine's own handler run and keep its return value.
@ Block
Skip it entirely and return this value.