ThreadPool icon indicating copy to clipboard operation
ThreadPool copied to clipboard

support c++17 and c++20

Open MatchX opened this issue 2 years ago • 1 comments

https://github.com/MatchX/cpp_threadpool

MatchX avatar Jun 30 '23 08:06 MatchX

As @MatchX already mentioned...

#include <type_traits> ... decltype( auto ) enqueue( F&& f, Args&& ... args ); ... decltype( auto ) ThreadPool::enqueue( F&& f, Args&& ... args ) { using return_type = std::invoke_result_t<std::decay_t<F>, std::decay_t<Args>...>;

seems to do the trick

AmanjitPREA avatar Dec 19 '23 11:12 AmanjitPREA