crimson/common/errorator: construct future<> with a future_state_base

this change is made to adapt
89e801b373

* always use the helpers from `futurize` instead of using
  `::seastar::make_exception_future()` directly. as
  `make_exception_future(future_state_base&& state)` is located in
  `seastar::internal` namespace
* add `noexcept` specifier in both constructors. to match with the
  helpers of `make_exception_future2()` which dispatch the call to
  different constructor variants.

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2020-01-23 15:38:11 +08:00
parent 6857348f64
commit 5a132172dd

View File

@ -388,8 +388,12 @@ private:
: base_t(::seastar::make_ready_future<ValuesT...>(std::forward<A>(a)...)) {
}
[[gnu::always_inline]]
_future(exception_future_marker, std::exception_ptr&& ep)
: base_t(::seastar::make_exception_future<ValuesT...>(std::move(ep))) {
_future(exception_future_marker, ::seastar::future_state_base&& state) noexcept
: base_t(::seastar::futurize<base_t>::make_exception_future(std::move(state))) {
}
[[gnu::always_inline]]
_future(exception_future_marker, std::exception_ptr&& ep) noexcept
: base_t(::seastar::futurize<base_t>::make_exception_future(std::move(ep))) {
}
template <template <class...> class ErroratedFuture,
@ -701,6 +705,11 @@ public:
future<T...> make_exception_future2(std::exception_ptr&& ex) noexcept {
return future<T...>(exception_future_marker(), std::move(ex));
}
template <typename... T>
static
future<T...> make_exception_future2(seastar::future_state_base&& state) noexcept {
return future<T...>(exception_future_marker(), std::move(state));
}
template <typename... T, typename Exception>
static
future<T...> make_exception_future2(Exception&& ex) noexcept {