From: Kefu Chai Date: Mon, 7 Mar 2022 16:00:28 +0000 (+0800) Subject: cls/rbd: define SnapshotNamespace's ctor using its parent X-Git-Tag: v18.0.0~1261^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b04655645bb3cba7e5c538c1ef349aa81651a56f;p=ceph-ci.git 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 --- 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);