ThreadPool icon indicating copy to clipboard operation
ThreadPool copied to clipboard

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

Open KevinWang-kk opened this issue 1 year ago • 2 comments

(1) (since C++14)

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

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

KevinWang-kk avatar Nov 30 '23 09:11 KevinWang-kk

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.

Light7734 avatar Jan 10 '24 12:01 Light7734

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

wilx avatar Jan 10 '24 13:01 wilx