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.
"
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)