]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: drop copy assignment operator
authorKefu Chai <kchai@redhat.com>
Sun, 8 Aug 2021 13:41:34 +0000 (21:41 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 8 Aug 2021 13:41:36 +0000 (21:41 +0800)
because of the const reference member variable of `parent`:

const delta_overlay_t &parent;

we are not allowed to mutate it. so the explicitly defaulted copy assignment
operator is implicitly deleted

this change silences the warnings from Clang like:

 ../src/test/crimson/seastore/test_transaction_manager.cc:159:12: warning: explicitly defaulted copy assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
         iterator &operator=(const iterator &) = default;
                   ^
 ../src/test/crimson/seastore/test_transaction_manager.cc:98:25: note: copy assignment operator of 'iterator' is implicitly deleted because field 'parent' is of reference type 'const transaction_manager_$
         const delta_overlay_t &parent;
                                ^

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/crimson/seastore/test_transaction_manager.cc

index db93baaeb673f75f0e8b27c7767e8abc463570cd..523934ed2ed24b06956e87b1a785805f85a3b63d 100644 (file)
@@ -156,8 +156,6 @@ struct transaction_manager_test_t :
       public:
        iterator(const iterator &) = default;
        iterator(iterator &&) = default;
-       iterator &operator=(const iterator &) = default;
-       iterator &operator=(iterator &&) = default;
 
        iterator &operator++() {
          assert(is_valid());