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);