X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/04fa61785ae1ecb5e5233ef0cb6d24145120d95e..04cb8833befbe07b6b94ff0cae98bc17b78724e3:/include/simgrid/kernel/future.hpp diff --git a/include/simgrid/kernel/future.hpp b/include/simgrid/kernel/future.hpp index da5bd080f5..777a9f48b2 100644 --- a/include/simgrid/kernel/future.hpp +++ b/include/simgrid/kernel/future.hpp @@ -61,7 +61,7 @@ public: void set_continuation(simgrid::xbt::Task&& continuation) { - xbt_assert(!continuation_); + xbt_assert(not continuation_); switch (status_) { case FutureStatus::done: // This is not supposed to happen if continuation is set @@ -282,7 +282,7 @@ template class Future { public: Future() = default; - Future(std::shared_ptr> state): state_(std::move(state)) {} + Future(std::shared_ptr> state) : state_(std::move(state)) {} // Move type: Future(Future&) = delete; @@ -369,12 +369,9 @@ public: * the future is ready * @exception std::future_error no state is associated with the future */ - template - auto then(F continuation) - -> typename std::enable_if< - !is_future::value, - Future - >::type + template + auto then(F continuation) -> typename std::enable_if::value, + Future>::type { return this->thenNoUnwrap(std::move(continuation)); }