-
Notifications
You must be signed in to change notification settings - Fork 362
Open
Description
Error C2672: "CTPL ::thread_pool::push" : no matching overloaded function found
Error C2780: "STD ::future : CTPL ::thread_pool::push(F &&)" : one parameter should be input, but two are provided
Error C2893: function template "STD ::future CTPL ::thread_pool::push(F &&,Rest &&...) "specialty
Error C2672: "STD ::vector< STD ::future, STD ::allocator<_Ty> : >::emplace_back" : overloaded function not found
#include "ctpl_stl.h"
#include "iostream"
#include "string"
void f(int j)
{
std::cout << j << std::endl;
}
int main(int argc, char **argv) {
ctpl::thread_pool p(8 /* two threads in the pool */);
std::vector< std::future<int> > results;
for (int i = 0; i < 8; ++i) {
results.emplace_back(
p.push(f, i));
}
for (auto && result : results)
std::cout << result.get() << ' ';
std::cout << std::endl;
getchar();
return 0;
}
Metadata
Metadata
Assignees
Labels
No labels