From: Kefu Chai Date: Wed, 28 Oct 2020 09:28:35 +0000 (+0800) Subject: crimson/common: drop variadic future support from errorator X-Git-Tag: v16.1.0~710^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=688b95798bfd88b409abce9b70bb6d2933819bef;p=ceph.git crimson/common: drop variadic future support from errorator this allows us to bump up Seastar_API_LEVEL to 6 which completely ditch variadic future from Seastar. Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5526e469c4a3..19cae95bf026 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -327,7 +327,7 @@ if(WITH_SEASTAR) _find_package(${ARGV}) endif() endmacro () - set(Seastar_API_LEVEL "5" CACHE STRING "" FORCE) + set(Seastar_API_LEVEL "6" CACHE STRING "" FORCE) set(Seastar_HWLOC OFF CACHE BOOL "" FORCE) set(Seastar_STD_OPTIONAL_VARIANT_STRINGVIEW ON CACHE BOOL "" FORCE) if(Seastar_DPDK) diff --git a/src/crimson/common/errorator.h b/src/crimson/common/errorator.h index aef57cb9b375..7c6f9fe20ad3 100644 --- a/src/crimson/common/errorator.h +++ b/src/crimson/common/errorator.h @@ -308,7 +308,7 @@ static constexpr auto composer(FuncHead&& head, FuncTail&&... tail) { }; } -template +template struct errorated_future_marker{}; template @@ -341,10 +341,10 @@ private: // see the comment for `using future = _future` below. template class _future {}; - template - class _future<::crimson::errorated_future_marker> - : private seastar::future { - using base_t = seastar::future; + template + class _future<::crimson::errorated_future_marker> + : private seastar::future { + using base_t = seastar::future; // we need the friendship for the sake of `get_exception() &&` when // `safe_then()` is going to return an errorated future as a result of // chaining. In contrast to `seastar::future`, errorator::future` @@ -424,7 +424,7 @@ private: public: using errorator_type = ::crimson::errorator; - using promise_type = seastar::promise; + using promise_type = seastar::promise; using base_t::available; using base_t::failed; @@ -437,7 +437,7 @@ private: template [[gnu::always_inline]] _future(ready_future_marker, A&&... a) - : base_t(::seastar::make_ready_future(std::forward(a)...)) { + : base_t(::seastar::make_ready_future(std::forward(a)...)) { } [[gnu::always_inline]] _future(exception_future_marker, ::seastar::future_state_base&& state) noexcept @@ -451,11 +451,11 @@ private: template