Le 28/06/13 20:39, Klaim - Joël Lamotte a écrit :

On Fri, Jun 28, 2013 at 7:48 PM, Vicente J. Botet Escriba <vicente.botet@wanadoo.fr> wrote:
When I fix it, the continuation would not be called immediately but as the doc states it should

"- If the parent was created with promise<< or with a packaged_task<> (has no associated launch policy), the continuation behaves the same as the third overload with a policy argument of launch::async | launch::deferred and the same argument for func.
"



Ah yes, ok, so it will be called at least when future.get() will be called, if I understood correctly?
Yes.
 
1.

   ft.then( []( future<T> f ) { return 42; } ); 

This will not compile (VS2012U3) because there is an attempt to copy future<T> (which looks like a bug I reported where returning a future would
trigger copy instead of moving the future, bug fixed since then so I'm a bit surprise about this one)

Currently the prototype of a continuation takes a future by reference, but I could change it to by value (which need to move the future.


I thought the original standard proposition was moving the future into the callback, or is this point under discussion?


You are right. I will fix this soon.

best,
Vicente