]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cls/rbd: define SnapshotNamespace's ctor using its parent
authorKefu Chai <tchaikov@gmail.com>
Mon, 7 Mar 2022 16:00:28 +0000 (00:00 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 9 Mar 2022 13:53:17 +0000 (21:53 +0800)
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 <tchaikov@gmail.com>
src/cls/rbd/cls_rbd_types.h

index 645861b2d8fd70353e1a743783ba9fc6605a99fb..e84e691287cf1e53a2ec90086a0f27b39b27959f 100644 (file)
@@ -663,12 +663,7 @@ typedef boost::variant<UserSnapshotNamespace,
                        UnknownSnapshotNamespace> SnapshotNamespaceVariant;
 
 struct SnapshotNamespace : public SnapshotNamespaceVariant {
-  SnapshotNamespace() {
-  }
-
-  template <typename T>
-  SnapshotNamespace(T&& t) : SnapshotNamespaceVariant(std::forward<T>(t)) {
-  }
+  using SnapshotNamespaceVariant::SnapshotNamespaceVariant;
 
   void encode(ceph::buffer::list& bl) const;
   void decode(ceph::buffer::list::const_iterator& it);