17#ifndef TOOLBOX_UTIL_SLOT_HPP
18#define TOOLBOX_UTIL_SLOT_HPP
23inline namespace util {
25template <
typename Sig>
28template <
typename RetT,
typename...
ArgsT>
50 RetT invoke(
ArgsT... args)
const {
return fn_(obj_, std::forward<ArgsT>(args)...); }
61 return FnT(std::forward<ArgsT>(args)...);
66 template <
typename ClassT>
71 return (*
static_cast<ClassT*
>(
obj))(std::forward<ArgsT>(args)...);
76 template <auto MemFnT,
typename ClassT =
typename FunctionTraits<decltype(MemFnT)>::ClassType>
81 return (
static_cast<ClassT*
>(
obj)->*
MemFnT)(std::forward<ArgsT>(args)...);
104template <
typename ClassT>
109 return Slot{}.bind(
obj);
112template <auto MemFnT,
typename ClassT =
typename FunctionTraits<decltype(MemFnT)>::ClassType>