progschj / ThreadPool

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

compile error #73

Closed link-duan closed 4 years ago

link-duan commented 4 years ago

thread_pool.h:22:10: error: ‘std::future<typename std::result_of<_Functor(_ArgTypes ...)>::type> ThreadPool::enqueue(F&&, Args&& ...) [with F = main(int, char)::<lambda()>; Args = {}; typename std::result_of<_Functor(_ArgTypes ...)>::type = void]’, declared using local type ‘main(int, char)::<lambda()>’, is used but never defined [-fpermissive] auto enqueue(F &&f, Args &&... args) ^~~

peakjun commented 3 years ago

how to resolve it ?