On Thu, Apr 12, 2012 at 5:38 PM, Vicente J. Botet Escriba <vicente.botet@wanadoo.fr> wrote:
Le 13/04/12 01:26, John M. Dlugosz a écrit :
In my earlier note, I figured it should just work.  But it's not.
I think it might be different on Boost 1.47?


Can anyone give me a VERY QUICK answer on how to return a unique_future on a compiler without && using Boost 1.47?

Can you try an undocumented function

       operator boost::detail::thread_move_t<unique_future>()
       {
           return boost::detail::thread_move_t<unique_future>(*this);
       }

   unique_future<int> bar() { return boost::detail::thread_move_t<unique_future<int>>(foo())); }

Please don't forget to post the exact example, the boost version, the compiler, ...

Ack, my mistake, John; I don't believe Boost.Move had been included in Boost by 1.47 yet, so my suggestion in an earlier message wouldn't work. Best to follow Vicente's advice here...

Sorry for the noise,

- Jeff