mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpiutil] Use invoke_result_t instead of result_of in future.h (#4293)
std::result_of is deprecated in C++17.
This commit is contained in:
committed by
GitHub
parent
e9d1b5c2d0
commit
af7985e46c
@@ -334,7 +334,7 @@ class future final {
|
||||
}
|
||||
}
|
||||
|
||||
template <typename F, typename R = typename std::result_of<F && (T &&)>::type>
|
||||
template <typename F, typename R = typename std::invoke_result_t<F&&, T&&>>
|
||||
future<R> then(F&& func) {
|
||||
return then(PromiseFactory<R>::GetInstance(), std::forward<F>(func));
|
||||
}
|
||||
@@ -457,7 +457,7 @@ class future<void> final {
|
||||
}
|
||||
}
|
||||
|
||||
template <typename F, typename R = typename std::result_of<F && ()>::type>
|
||||
template <typename F, typename R = typename std::invoke_result_t<F&&>>
|
||||
future<R> then(F&& func) {
|
||||
return then(PromiseFactory<R>::GetInstance(), std::forward<F>(func));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user