From: Kefu Chai Date: Wed, 12 May 2021 14:38:15 +0000 (+0800) Subject: crimson/common: use parameter pack for building future<> X-Git-Tag: v17.1.0~1988^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F41303%2Fhead;p=ceph.git 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 --- 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<