diff --git a/src/IRequest.h b/src/IRequest.h index 1818b516effdba6841ddaacf470022996f306eb6..ae46bc458ecc23abb32c16045fcd24314422efac 100644 --- a/src/IRequest.h +++ b/src/IRequest.h @@ -230,6 +230,12 @@ class GenericCallback { void operator()(Arguments... d) const { functor_->done(d...); } + template + static typename IGenericCallback::Pointer make( + CallbackArguments&&... args) { + return std::make_shared(std::forward(args)...); + } + private: class Functor : public IGenericCallback { public: