From: Kefu Chai Date: Wed, 2 Jun 2021 06:15:43 +0000 (+0800) Subject: crimson/common/errorator: mark errorator::future 'nodiscard' X-Git-Tag: v17.1.0~1782^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7b93dc245e030398d741e73463b4d1f164c74be;p=ceph.git crimson/common/errorator: mark errorator::future 'nodiscard' so compiler is able to error out if we discard a future. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/common/errorator.h b/src/crimson/common/errorator.h index efe091c8dedd..518cd8ad203c 100644 --- a/src/crimson/common/errorator.h +++ b/src/crimson/common/errorator.h @@ -351,9 +351,9 @@ struct errorator { private: // see the comment for `using future = _future` below. template - class _future {}; + class [[nodiscard]] _future {}; template - class _future<::crimson::errorated_future_marker> + class [[nodiscard]] _future<::crimson::errorated_future_marker> : private seastar::future { using base_t = seastar::future; // we need the friendship for the sake of `get_exception() &&` when