Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
KevinWang-kk opened this issue Nov 30, 2023 · 2 comments

Comments

@KevinWang-kk
Copy link

(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
Copy link

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
Copy link
Contributor

wilx commented Jan 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants