From 180d22ed01b2f5b81d586afdf205a5954524ce3b Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 28 Feb 2019 22:55:04 +0100 Subject: [PATCH] Make capture list explicit. --- include/simgrid/kernel/future.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1