18 using namespace std::placeholders;
24 template <
typename ReturnType,
typename... ParamTypes>
25 class Delegate<ReturnType(ParamTypes...)> :
public std::function<ReturnType(ParamTypes...)>
27 using StdFunc = std::function<ReturnType(ParamTypes...)>;
30 using StdFunc::function;
38 template <
class ClassType>
39 Delegate(ReturnType (ClassType::*m)(ParamTypes...), ClassType* c)
40 : StdFunc([m, c](ParamTypes... params) -> ReturnType { return (c->*m)(params...); })
Delegate(ReturnType(ClassType::*m)(ParamTypes...), ClassType *c)
Delegate a class method.
Definition: Delegate.h:39
Definition: Delegate.h:20