progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.63k stars 2.21k forks source link

What does the following code means? #68

Closed hongyx11 closed 5 years ago

hongyx11 commented 5 years ago

auto ThreadPool::enqueue(F&& f, Args&&... args) -> std::future<typename std::result_of<F(Args...)>::type>

in Threadpool.h, what does array(->) means? return value?

https://github.com/progschj/ThreadPool/blob/master/ThreadPool.h#L19

Thank you very much

GeraldLee commented 5 years ago

auto ThreadPool::enqueue(F&& f, Args&&... args) -> std::future<typename std::result_of<F(Args...)>::type>

in Threadpool.h, what does array(->) means? return value?

https://github.com/progschj/ThreadPool/blob/master/ThreadPool.h#L19

Thank you very much

you could find answer here https://stackoverflow.com/questions/22514855/arrow-operator-in-function-heading

hongyx11 commented 5 years ago

Thank you very much.