17#ifndef TOOLBOX_UTIL_SLOT_HPP
18#define TOOLBOX_UTIL_SLOT_HPP
23inline namespace util {
25template <
typename...
ArgsT>
47 void invoke(
ArgsT... args)
const { fn_(obj_, std::forward<ArgsT>(args)...); }
57 fn_ = [](
void* ,
ArgsT... args) {
FnT(std::forward<ArgsT>(args)...); };
61 template <
typename ClassT>
66 (*
static_cast<ClassT*
>(
obj))(std::forward<ArgsT>(args)...);
71 template <auto MemFnT,
typename ClassT =
typename FunctionTraits<decltype(MemFnT)>::ClassType>
99template <
typename ClassT>
104 return Slot{}.bind(
obj);
107template <auto MemFnT,
typename ClassT =
typename FunctionTraits<decltype(MemFnT)>::ClassType>