crimson: drop as_plain_future() from errorated futures.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
Radoslaw Zarzynski 2019-09-29 15:02:06 +02:00
parent ae83ae6b68
commit dc09e1a130

View File

@ -374,7 +374,7 @@ struct errorator {
typename ErroratedFuture<ValuesT...>::errorator_type;
static_assert(dest_errorator_t::template contains_once_v<errorator_type>,
"conversion is possible to more-or-eq errorated future!");
return std::move(*this).as_plain_future();
return static_cast<base_t&&>(*this);
}
// initialize future as failed without throwing. `make_exception_future()`
@ -506,9 +506,6 @@ struct errorator {
template <class...>
friend class errorator;
base_t&& as_plain_future() && {
return std::move(*this);
}
};
// the visitor that forwards handling of all errors to next continuation
@ -605,7 +602,7 @@ private:
}
template <class Arg>
static decltype(auto) plainify(Arg&& arg) {
return std::forward<Arg>(arg).as_plain_future();
return std::forward<typename Arg::base_t>(arg);
}
template <class T, class = std::void_t<T>>