Open MatchX opened 1 year ago
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
https://github.com/MatchX/cpp_threadpool