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

support c++17 and c++20 #105

Open
MatchX opened this issue Jun 30, 2023 · 1 comment
Open

support c++17 and c++20 #105

MatchX opened this issue Jun 30, 2023 · 1 comment

Comments

@MatchX
Copy link

MatchX commented Jun 30, 2023

https://github.com/MatchX/cpp_threadpool

@AmanjitPREA
Copy link

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

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

2 participants