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