Reputation: 27674
I have a simple lambda called inside async. But it gives a system_error.
#include<future>
#include<iostream>
int main()
{
auto a = std::async([]()
{
std::cout << 42 << std::endl;
});
a.get();
return 0;
}
Compiler: C++0x (gcc-4.5.1)
Any ideas?
Upvotes: 1
Views: 205