File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,7 @@ class ThreadPool {
9
9
public:
10
10
explicit ThreadPool (size_t );
11
11
template <class F , class ... Args>
12
- auto enqueue (F&& f, Args&&... args)
13
- -> std::future<std::invoke_result_t<F, Args...>>;
12
+ decltype (auto ) enqueue(F&& f, Args&&... args);
14
13
~ThreadPool ();
15
14
private:
16
15
// need to keep track of threads so we can join them
@@ -54,8 +53,7 @@ inline ThreadPool::ThreadPool(size_t threads)
54
53
55
54
// add new work item to the pool
56
55
template <class F , class ... Args>
57
- auto ThreadPool::enqueue (F&& f, Args&&... args)
58
- -> std::future<std::invoke_result_t<F, Args...>>
56
+ decltype (auto ) ThreadPool::enqueue(F&& f, Args&&... args)
59
57
{
60
58
using return_type = std::invoke_result_t <F, Args...>;
61
59
You can’t perform that action at this time.
0 commit comments