Use *_t and *_v trait helpers from C++17 STL (#731)
This commit is contained in:
@@ -38,11 +38,7 @@ public:
|
||||
template <typename Fn, class... Args>
|
||||
auto ask(Fn fn, Args&&... args) const {
|
||||
// Result type is deduced from the function's return type
|
||||
#if __cplusplus >= 201703L
|
||||
using ResultType = std::invoke_result_t<decltype(fn), Object, Args...>;
|
||||
#else
|
||||
using ResultType = typename std::result_of<decltype(fn)(Object, Args...)>::type;
|
||||
#endif
|
||||
|
||||
std::promise<ResultType> promise;
|
||||
auto future = promise.get_future();
|
||||
|
||||
Reference in New Issue
Block a user