diff --git a/exercises/7/7.1/thread_pool.hpp b/exercises/7/7.1/thread_pool.hpp index c1e22cbb..72e2f60c 100644 --- a/exercises/7/7.1/thread_pool.hpp +++ b/exercises/7/7.1/thread_pool.hpp @@ -11,6 +11,7 @@ #ifndef THREAD_POOL_H #define THREAD_POOL_H +#include #include // std::vector #include // std::queue #include // std::make_shared @@ -96,7 +97,7 @@ inline ThreadPool::ThreadPool(size_t threads): stop(false) { template decltype(auto) ThreadPool::enqueue(F&& f, Args&&... args) { // deduce return type - using return_type = typename std::result_of::type; + using return_type = typename std::invoke_result::type; // fetch task auto task = std::make_shared>(