Skip to content

Commit 17b3302

Browse files
committed
Declare deducted type inside template construct
1 parent 1592a02 commit 17b3302

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/wrapper.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ class RpcFunctionWrapper<std::function<R(Args...)>>: public IFunctionWrapper {
100100
}
101101
};
102102

103-
template<typename F>
104-
auto wrap(F&& f) -> RpcFunctionWrapper<typename arx::function_traits<typename std::decay<F>::type>::function_type>* {
105-
using Signature = typename arx::function_traits<typename std::decay<F>::type>::function_type;
103+
template<typename F, typename Signature = typename arx::function_traits<typename std::decay<F>::type>::function_type>
104+
auto wrap(F&& f) -> RpcFunctionWrapper<Signature>* {
106105
return new RpcFunctionWrapper<Signature>(std::forward<F>(f));
107106
};
108107

0 commit comments

Comments
 (0)