aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-11-11 06:14:14 -0500
committerJack Lloyd <[email protected]>2020-11-11 06:14:14 -0500
commit716f19325eba7487f747ca3b986af08d3927649c (patch)
treea188dfb33e956ea2bb4b688474d89819951d9a9e
parentc1289e0c2e9c2da4105c82b990a922e0d8c65d9a (diff)
Switch to invoke_result
As std::result_of is deprecated in C++17 and removed in C++20
-rw-r--r--src/lib/utils/thread_utils/thread_pool.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils/thread_utils/thread_pool.h b/src/lib/utils/thread_utils/thread_pool.h
index 34f4f26db..8f818d1b7 100644
--- a/src/lib/utils/thread_utils/thread_pool.h
+++ b/src/lib/utils/thread_utils/thread_pool.h
@@ -54,9 +54,9 @@ class BOTAN_TEST_API Thread_Pool
void queue_thunk(std::function<void ()>);
template<class F, class... Args>
- auto run(F&& f, Args&&... args) -> std::future<typename std::result_of<F(Args...)>::type>
+ auto run(F&& f, Args&&... args) -> std::future<typename std::invoke_result<F, Args...>::type>
{
- typedef typename std::result_of<F(Args...)>::type return_type;
+ typedef typename std::invoke_result<F, Args...>::type return_type;
auto future_work = std::bind(std::forward<F>(f), std::forward<Args>(args)...);
auto task = std::make_shared<std::packaged_task<return_type ()>>(future_work);