std::thread with g++-4.5 / libstdc++6 4.5-20100227-1
Is std::thread (only usable with g++-4.5 I think) known to be broken?
The following program:
#include <iostream>
#include <thread>
int g = 0;
void f ()
{
g++;
}
int main ()
{
std::thread t (f);
t.join ();
std::cout << "after joing, g = " << g << std::endl;
return 0;
}
Dies with an exception:
$ g++-4.5 --version
g++-4.5 (Debian 4.5-20100227-1) 4.5.0 20100227 (experimental) [trunk revision 157109]
$ g++-4.5 -std=c++0x -o t t.cc
$ ./t
terminate called after throwing an instance of 'std::system_error'
what():
Aborted
Thanks,
-Miles
--
Saa, shall we dance? (from a dance-class advertisement)
Reply to: