File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,7 @@ using namespace RpcUtils::detail;
99#ifdef HANDLE_RPC_ERRORS
1010#include < stdexcept>
1111#endif
12-
13-
14- template <typename F>
15- class RpcFunctionWrapper ;
12+ #include < functional>
1613
1714class IFunctionWrapper {
1815 public:
@@ -21,7 +18,7 @@ class IFunctionWrapper {
2118 };
2219
2320template <typename R, typename ... Args>
24- class RpcFunctionWrapper <std::function<R(Args...)>> : public IFunctionWrapper {
21+ class RpcFunctionWrapper : public IFunctionWrapper {
2522public:
2623 RpcFunctionWrapper (std::function<R(Args...)> func) : _func(func) {}
2724
@@ -102,9 +99,8 @@ class RpcFunctionWrapper<std::function<R(Args...)>>: public IFunctionWrapper {
10299
103100
104101template <typename F>
105- auto wrap (F&& f) -> RpcFunctionWrapper<typename arx::function_traits<typename std::decay<F>::type>::function_type> {
106- using Signature = typename arx::function_traits<typename std::decay<F>::type>::function_type;
107- return RpcFunctionWrapper<Signature>(std::forward<F>(f));
102+ auto wrap (F&& f) {
103+ return RpcFunctionWrapper (std::function (std::forward<F>(f)));
108104};
109105
110106#endif
You can’t perform that action at this time.
0 commit comments