X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/180d22ed01b2f5b81d586afdf205a5954524ce3b..65beede857f93e33c96e544f76b93793c973dc10:/include/simgrid/kernel/future.hpp?ds=sidebyside diff --git a/include/simgrid/kernel/future.hpp b/include/simgrid/kernel/future.hpp index 482497a504..fea70d43f0 100644 --- a/include/simgrid/kernel/future.hpp +++ b/include/simgrid/kernel/future.hpp @@ -157,7 +157,7 @@ public: xbt_assert(this->value_); auto result = std::move(this->value_.get()); this->value_ = boost::optional(); - return std::move(result); + return result; } private: @@ -204,11 +204,11 @@ public: } }; -template void bind_promise(Promise promise, Future future) +template void bind_promise(Promise&& promise, Future future) { class PromiseBinder { public: - explicit PromiseBinder(Promise promise) : promise_(std::move(promise)) {} + explicit PromiseBinder(Promise&& promise) : promise_(std::move(promise)) {} void operator()(Future future) { simgrid::xbt::set_promise(promise_, future); } private: @@ -219,17 +219,6 @@ template void bind_promise(Promise promise, Future future) template Future unwrap_future(Future> future); -template -XBT_ATTRIB_DEPRECATED_v323("Please use bind_promise") void bindPromise(Promise promise, Future future) -{ - bind_promise(promise, future); -} -template -XBT_ATTRIB_DEPRECATED_v323("Please use unwrap_future") Future unwrapFuture(Future> future) -{ - unwrap_future(future); -} - /** Result of some (probably) asynchronous operation in the SimGrid kernel * * @ref simgrid::simix::Future and @ref simgrid::simix::Future provide an @@ -363,13 +352,6 @@ public: return future; } - template - XBT_ATTRIB_DEPRECATED_v323("Please use then_no_unwrap") auto thenNoUnwrap(F continuation) - -> Future - { - then_no_unwrap(continuation); - } - /** Attach a continuation to this future * * The future must be valid in order to make this call. @@ -426,7 +408,7 @@ template Future unwrap_future(Future> future) Promise promise; Future result = promise.get_future(); bind_promise(std::move(promise), std::move(future)); - return std::move(result); + return result; } /** Producer side of a @ref simgrid::kernel::Future