http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59830
Bug ID: 59830 Summary: std::packaged_task throws exception Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: b17c0de at gmail dot com user@domain:~/work/test$ uname -a Linux domain 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux user@domain:~/work/test$ g++ --version g++ (Debian 4.7.2-5) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. user@domain:~/work/test$ cat fut.cc #include <iostream> #include <future> int main() { std::packaged_task<int()> task([]() { return 42; }); std::future<int> result = task.get_future(); task(); std::cout << "task_lambda:\t" << result.get() << '\n'; } user@domain:~/work/test$ g++ -std=c++11 -g fut.cc user@domain:~/work/test$ ./a.out terminate called after throwing an instance of 'std::system_error' what(): Unknown error 18446744073709551615 Abgebrochen