34 static inline Ret closureImpl(Args... args) {
36 return (self.func)(self.data, std::forward<Args>(args)...);
40 using origin = Ret(uintptr_t, Args...);
41 using closure = Ret(Args...);
48 [[nodiscard]] closure* get()
const {
return reinterpret_cast<closure*
>(storage.executable()); }
59 static inline Ret closureImpl(Args... args) {
61 return (self.func)(std::forward<Args>(args)...);
65 using closure = Ret(Args...);
67 std::function<closure> func;
71 [[nodiscard]] closure* get()
const {
return reinterpret_cast<closure*
>(storage.executable()); }