Open andrevis opened 3 years ago
Did the implementation work? Does it work even with C++11, or is there something preventing that? If it does in fact work with C++11, I would merge it into my fork.
Did the implementation work? Does it work even with C++11, or is there something preventing that? If it does in fact work with C++11, I would merge it into my fork.
Yes, it is. It seems ok with C++11 too. Here is a short demo (check C++11 in options): http://cpp.sh/4rsyb
I merged the concept into my fork in commit https://github.com/zserik/ThreadPool/commit/b7d0acb9b3ab3f4746a1d151525d1201bc29eea7. I don't think this PR itself is going to be merged bc the repository seems to be abandoned since the beginning of 2015.
For anyone looking for a C++17 fix for this that doesn't use decltype
(which didn't work in all cases for me), check this commit: https://github.com/Qix-/ThreadPool/commit/113efd5e29858e571cd7586552032aab272d2d79
result_of and its helper type result_of_t are deprecated as of C++17