We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66605f4 commit b3177c0Copy full SHA for b3177c0
util/callable.hh
@@ -51,7 +51,10 @@ private:
51
template<typename Callable>
52
static Ret invoke(void *object, Args... args) {
53
Callable &callable = *reinterpret_cast<Callable *>(object);
54
- return callable(std::forward<Args>(args)...);
+ if constexpr (std::is_same_v<void, Ret>)
55
+ callable(std::forward<Args>(args)...);
56
+ else
57
+ return callable(std::forward<Args>(args)...);
58
}
59
60
0 commit comments