From 915c9d3ba2107402cb252308838a98e8b5c36e00 Mon Sep 17 00:00:00 2001 From: Senbai Kang Date: Tue, 4 Jun 2024 13:33:20 +0200 Subject: [PATCH] fix problem when compiling with c++20 --- include/z5/util/threadpool.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/z5/util/threadpool.hxx b/include/z5/util/threadpool.hxx index 78ad6f2..190c60a 100644 --- a/include/z5/util/threadpool.hxx +++ b/include/z5/util/threadpool.hxx @@ -163,7 +163,7 @@ class ThreadPool * If the task throws an exception, it will be raised on the call to get(). */ template - std::future::type> enqueueReturning(F&& f) ; + std::future> enqueueReturning(F&& f) ; /** * Enqueue function for tasks without return value. @@ -263,10 +263,10 @@ inline ThreadPool::~ThreadPool() } template -inline std::future::type> +inline std::future> ThreadPool::enqueueReturning(F&& f) { - typedef typename std::result_of::type result_type; + typedef typename std::invoke_result_t result_type; typedef std::packaged_task PackageType; auto task = std::make_shared(f);