From 6a1f3136178a3a02f8d2743643fb46950224140c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 12 May 2021 22:38:15 +0800 Subject: [PATCH] crimson/common: use parameter pack for building future<> it mirrors the way how seastar::make_ready_future() works. and more importantly, it allows us to build interruptible_future in the same way as we build plain seastar::future<> in-place. so we can, for instance, create a future> using: make_ready_future>(1, 2) instead of using make_ready_future>(make_tuple(1, 2)) Signed-off-by: Kefu Chai --- src/crimson/common/interruptible_future.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crimson/common/interruptible_future.h b/src/crimson/common/interruptible_future.h index 5c154f2e086e3..e2cb8b541026c 100644 --- a/src/crimson/common/interruptible_future.h +++ b/src/crimson/common/interruptible_future.h @@ -487,15 +487,15 @@ struct interruptible_errorator { using future = interruptible_future_detail>; - template + template static interruptible_future_detail< InterruptCond, typename Errorator::template future> - make_ready_future(A&& value) { + make_ready_future(A&&... value) { return interruptible_future_detail< InterruptCond, typename Errorator::template future>( Errorator::template make_ready_future( - std::forward(value))); + std::forward(value)...)); } template static interruptible_future_detail< -- 2.39.5