4 ms·
Maybe in this context they shouldn't, either. using return_type = decltype(f(args...)); seems easier to read and "more C++11". Also the "> >" is a pre-C+
by knorker 7y ago
Maybe in this context they shouldn't, either.
using return_type = decltype(f(args...));
seems easier to read and "more C++11".
Also the "> >" is a pre-C++11 pattern.
- JakobProgsch 7y agoEarlier versions did use decltype but that causes issues with pointers to member functions. See: https://github.com/progschj/ThreadPool/commit/ac2a77d5cc04361d341f63b1d19706a4d1b4943e https://github.com/progschj/ThreadPool/commit/ac2a77d5cc0436... result_of has now been deprecated in newer C++ versions but since this advertises itself as C++11 thread pool I intend to leave it as is.