From b04655645bb3cba7e5c538c1ef349aa81651a56f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 8 Mar 2022 00:00:28 +0800 Subject: [PATCH] cls/rbd: define SnapshotNamespace's ctor using its parent simpler this way. also this prevent the compiler from trying to convert a random value into SnapshotNamespace just because it has a templated constructor when it tries to lookup a candidate of operator<<(ostream&, Random value). Signed-off-by: Kefu Chai --- src/cls/rbd/cls_rbd_types.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/cls/rbd/cls_rbd_types.h b/src/cls/rbd/cls_rbd_types.h index 645861b2d8f..e84e691287c 100644 --- a/src/cls/rbd/cls_rbd_types.h +++ b/src/cls/rbd/cls_rbd_types.h @@ -663,12 +663,7 @@ typedef boost::variant SnapshotNamespaceVariant; struct SnapshotNamespace : public SnapshotNamespaceVariant { - SnapshotNamespace() { - } - - template - SnapshotNamespace(T&& t) : SnapshotNamespaceVariant(std::forward(t)) { - } + using SnapshotNamespaceVariant::SnapshotNamespaceVariant; void encode(ceph::buffer::list& bl) const; void decode(ceph::buffer::list::const_iterator& it); -- 2.39.5