FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 04-01-2010, 05:00 AM
Miles Bader
 
Default 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)


--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: buoaatnbwco.fsf@dhlpc061.dev.necel.com">http://lists.debian.org/buoaatnbwco.fsf@dhlpc061.dev.necel.com
 

Thread Tools




All times are GMT. The time now is 08:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org