From 95dd1c0b55d1ea1ea47b4cb8739c61eaf0ab237a Mon Sep 17 00:00:00 2001 From: Siyuan Zhang Date: Thu, 8 Aug 2024 20:52:07 +0800 Subject: [PATCH] fix inconsistent return type in thread pool class (#167) --- grape/utils/thread_pool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grape/utils/thread_pool.h b/grape/utils/thread_pool.h index b5d2d510..66a57655 100644 --- a/grape/utils/thread_pool.h +++ b/grape/utils/thread_pool.h @@ -124,8 +124,8 @@ inline void ThreadPool::WaitEnd(std::vector>& results) { // add new task to the pool template auto ThreadPool::enqueue(F&& f, Args&&... args) - -> std::future::type> { - using return_type = typename std::result_of::type; + -> std::future> { + using return_type = grape::result_of_t; auto task = std::make_shared>( std::bind(std::forward(f), std::forward(args)...));