If you want to have return types, use .call instead of operator().

This commit is contained in:
ThePhD 2013-12-13 23:30:16 -05:00
parent c6f6203ab2
commit 49ad128493

View File

@ -65,11 +65,6 @@ public:
void operator()(Args&&... args) { void operator()(Args&&... args) {
call<>(std::forward<Args>(args)...); call<>(std::forward<Args>(args)...);
} }
template<typename... Ret, typename... Args>
auto operator()(types<Ret...>, Args&&... args) {
return call<Ret...>(std::forward<Args>(args)...);
}
template<typename... Ret, typename... Args> template<typename... Ret, typename... Args>
auto call(Args&&... args) -> decltype(invoke(types<Ret...>(), sizeof...(Args))) { auto call(Args&&... args) -> decltype(invoke(types<Ret...>(), sizeof...(Args))) {