Replace the deprecated std::result_of with std::invoke_result
@@ -38,8 +38,7 @@ template <typename F, typename... T> struct Defer {
Defer(Defer &&o) noexcept : f(std::move(o.f)) {}
~Defer() { f(); }
- using ResultType = typename std::result_of<typename std::decay<F>::type(
- typename std::decay<T>::type...)>::type;
+ using ResultType = std::invoke_result_t<F, T...>;
std::function<ResultType()> f;
};
