X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/51b29b33ed626d6ceb436353f170371f8cc4f900..180d22ed01b2f5b81d586afdf205a5954524ce3b:/include/simgrid/kernel/future.hpp diff --git a/include/simgrid/kernel/future.hpp b/include/simgrid/kernel/future.hpp index 10ec3e003e..482497a504 100644 --- a/include/simgrid/kernel/future.hpp +++ b/include/simgrid/kernel/future.hpp @@ -357,7 +357,7 @@ public: [](Promise promise, std::shared_ptr> state, F continuation) { // ...set the new future value by running the continuation. Future future(std::move(state)); - simgrid::xbt::fulfill_promise(promise, [&] { return continuation(std::move(future)); }); + simgrid::xbt::fulfill_promise(promise, [&continuation, &future] { return continuation(std::move(future)); }); }, std::move(promise), state, std::move(continuation))); return future;