Skip to content

Commit 2f2ba14

Browse files
committed
Fix callable Function<> class
1 parent 8a4f166 commit 2f2ba14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

util/callable.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,19 @@ public:
104104

105105
Ret call(Args... args) {
106106
if (m_callback)
107-
return m_callback(&m_data[0], std::forward<Args...>(args)...);
107+
return m_callback(&m_data[0], std::forward<Args>(args)...);
108108
return Ret();
109109
}
110110

111111
Ret operator()(Args... args) {
112-
return call(std::forward<Args...>(args)...);
112+
return call(std::forward<Args>(args)...);
113113
}
114114

115115
private:
116116
template<typename Callable>
117117
static Ret invoke(void *object, Args... args) {
118118
Callable &callable = *reinterpret_cast<Callable *>(object);
119-
callable(std::forward<Args...>(args)...);
119+
return callable(std::forward<Args>(args)...);
120120
}
121121

122122
template<typename Callable>

0 commit comments

Comments
 (0)