From ddf19bbf07d4e65b6b0f6705e4c69663fcb6a2be Mon Sep 17 00:00:00 2001 From: sascha Date: Thu, 21 May 2026 12:39:25 +0200 Subject: [PATCH] updated return type --- include/matador/utils/thread_pool.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/matador/utils/thread_pool.hpp b/include/matador/utils/thread_pool.hpp index 7754ff6..894283b 100644 --- a/include/matador/utils/thread_pool.hpp +++ b/include/matador/utils/thread_pool.hpp @@ -59,8 +59,8 @@ public: * @param args Passed arguments */ template - auto schedule(F&& func, Args&&... args) -> result_fut> { - using return_type = std::result_of_t; + auto schedule(F&& func, Args&&... args) -> result_fut> { + using return_type = std::invoke_result_t; const auto token = std::make_shared(); auto task_ptr = std::make_shared>( @@ -73,7 +73,7 @@ public: if (!running_) { return failure(std::string("Thread pool is shut down, cannot schedule new tasks.")); } - tasks_.emplace_back([task_ptr, token] { + tasks_.emplace_back([task_ptr] { try { (*task_ptr)(); } catch (...) { /* Prevent exception escape */ } }, token);