
On 5/16/2012 3:45 AM, Vicente J. Botet Escriba wrote:
have you tried with
boost::unique_future<T> f() { /// x return boost::detail::thread_move_t<T>(x); }
Writing it as two lines,
boost::detail::thread_move_t<T> shuttle (x);
return shuttle;
it's clear that the error is with the return statement. It insists that the copy
constructor is callable, even though in reality it is optimized out. That is what the
standard says. Perhaps other compilers ignore that fine print.
Yet, packaged_task::get_future seems to be able to return just fine.
Writing it as:
boost::detail::thread_move_t