On 1 November 2011 15:12, Lars Gullik Bjønnes wrote: >> >> Aha, this is http://lwg.github.com/issues/lwg-active.html#2067 >> >> Although it's only in READY status I'll apply the fix to libstdc++ tonight. > > Thanks a lot for having a look at this. I've fixed it in the svn trunk by implementing LWG 2067, and working around some new issues I found in <future>. N.B. your example is still broken, because the std::thread is not explicitly joined or detached so will call std::terminate in its destructor. That's due to a change to std::thread that was made after the packaged_task paper you got the example from. It can be fixed by detaching the thread (which is safe in this specific case because the thread doesn't refer to anything that will go out of scope before it finishes): std::thread(std::move(task)).detach();