Skip to content

Commit

Permalink
fix inconsistent return type in thread pool class (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuan0322 authored Aug 8, 2024
1 parent 8cb5b42 commit 95dd1c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grape/utils/thread_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ inline void ThreadPool::WaitEnd(std::vector<std::future<void>>& results) {
// add new task to the pool
template <class F, class... Args>
auto ThreadPool::enqueue(F&& f, Args&&... args)
-> std::future<typename std::result_of<F(Args...)>::type> {
using return_type = typename std::result_of<F(Args...)>::type;
-> std::future<grape::result_of_t<F, Args...>> {
using return_type = grape::result_of_t<F, Args...>;

auto task = std::make_shared<std::packaged_task<return_type()>>(
std::bind(std::forward<F>(f), std::forward<Args>(args)...));
Expand Down

0 comments on commit 95dd1c0

Please sign in to comment.