File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -20,18 +20,16 @@ using namespace RpcUtils::detail;
2020#ifdef HANDLE_RPC_ERRORS
2121#include < stdexcept>
2222#endif
23+ #include < functional>
2324
2425class IFunctionWrapper {
2526public:
2627 virtual ~IFunctionWrapper () {}
2728 virtual bool operator ()(MsgPack::Unpacker& unpacker, MsgPack::Packer& packer) = 0;
2829};
2930
30- template <typename F>
31- class RpcFunctionWrapper ;
32-
3331template <typename R, typename ... Args>
34- class RpcFunctionWrapper <std::function<R(Args...)>> : public IFunctionWrapper {
32+ class RpcFunctionWrapper : public IFunctionWrapper {
3533public:
3634 RpcFunctionWrapper (std::function<R(Args...)> func) : _func(func) {}
3735
@@ -110,9 +108,9 @@ class RpcFunctionWrapper<std::function<R(Args...)>>: public IFunctionWrapper {
110108 }
111109};
112110
113- template <typename F, typename Signature = typename arx::function_traits< typename std::decay<F>::type>::function_type >
114- auto wrap (F&& f) -> RpcFunctionWrapper<Signature>* {
115- return new RpcFunctionWrapper<Signature> (std::forward<F>(f));
111+ template <typename F>
112+ auto wrap (F&& f) {
113+ return new RpcFunctionWrapper (std::function (std:: forward<F>(f) ));
116114};
117115
118116#endif
You can’t perform that action at this time.
0 commit comments