From dc627dcb5e7f64bf58fa282ed990cbac0940ab94 Mon Sep 17 00:00:00 2001 From: xnorai <147757538+xnorai@users.noreply.github.com> Date: Fri, 6 Sep 2024 19:52:57 -0700 Subject: [PATCH] Replace the use of `result_of_t` with `invoke_result_t` (#1397) * Fix C++20 incompatibility * Fix C++20 incompatibility --- mlx/io/threadpool.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mlx/io/threadpool.h b/mlx/io/threadpool.h index cdb3f7faf..0ed985948 100644 --- a/mlx/io/threadpool.h +++ b/mlx/io/threadpool.h @@ -37,7 +37,7 @@ class ThreadPool { ThreadPool(size_t); template auto enqueue(F&& f, Args&&... args) - -> std::future>; + -> std::future>; ~ThreadPool(); private: @@ -71,8 +71,8 @@ inline ThreadPool::ThreadPool(size_t threads) : stop(false) { template auto ThreadPool::enqueue(F&& f, Args&&... args) - -> std::future> { - using return_type = typename std::result_of_t; + -> std::future> { + using return_type = typename std::invoke_result_t; auto task = std::make_shared>( std::bind(std::forward(f), std::forward(args)...));