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 {
99public:
1010 explicit ThreadPool (size_t );
1111 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);
1413 ~ThreadPool ();
1514private:
1615 // need to keep track of threads so we can join them
@@ -54,8 +53,7 @@ inline ThreadPool::ThreadPool(size_t threads)
5453
5554// add new work item to the pool
5655template <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)
5957{
6058 using return_type = std::invoke_result_t <F, Args...>;
6159
You can’t perform that action at this time.
0 commit comments