Yes.
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 apackaged_task<>
(has no associated launch policy), the continuation behaves the same as the third overload with a policy argument oflaunch::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?
You are right. I will fix this soon.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.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 wouldtrigger copy instead of moving the future, bug fixed since then so I'm a bit surprise about this one)
I thought the original standard proposition was moving the future into the callback, or is this point under discussion?