diff --git a/src/sled/futures/internal/promise.h b/src/sled/futures/internal/promise.h index aa1ad14..b586569 100644 --- a/src/sled/futures/internal/promise.h +++ b/src/sled/futures/internal/promise.h @@ -29,14 +29,14 @@ public: bool IsFilled() const noexcept { return future_.IsCompleted(); } - void Failure(const FailureT &reason) { return future_.FillFailure(reason); } + void Failure(const FailureT &reason) const noexcept { return future_.FillFailure(reason); } - void Success(const T &value) { return future_.FillSuccess(value); } + void Success(const T &value) const noexcept { return future_.FillSuccess(value); } - void Success(T &&value) { return future_.FillSuccess(std::move(value)); } + void Success(T &&value) const noexcept { return future_.FillSuccess(std::move(value)); } private: - Future future_ = Future::Create(); + mutable Future future_ = Future::Create(); }; }// namespace sled