progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.63k stars 2.21k forks source link

std::result_of and std::result_of_t are deprecated in C++17. They are superseded by std::invoke_result and std::invoke_result_t #109

Open wangkeke1800 opened 7 months ago

wangkeke1800 commented 7 months ago

(1) (since C++14)

template< class T > using result_of_t = typename result_of::type; //(deprecated in C++17)

(2) (since C++17) template< class F, class... ArgTypes> using invoke_result_t = typename invoke_result<F, ArgTypes...>::type;

Light7734 commented 5 months ago

ThreadPool fails to compile on clang16 w/ C++20 because of the use of std::result_of

Also conan center only has the 20140926 version.

wilx commented 5 months ago

This thread pool is a good example but it has limitations. I would suggest using improved ThreadPool that was based on this example implementation that we us in log4cplus: log4cplus/ThreadPool