diff --git a/src/3rdparty/cpp-btree/btree.h b/src/3rdparty/cpp-btree/btree.h index 772ad02bc5..1e9ad95745 100644 --- a/src/3rdparty/cpp-btree/btree.h +++ b/src/3rdparty/cpp-btree/btree.h @@ -796,11 +796,8 @@ struct btree_iterator { } void decrement_slow(); - bool operator==(const const_iterator &x) const { - return node == x.node && position == x.position; - } - bool operator!=(const const_iterator &x) const { - return node != x.node || position != x.position; + friend bool operator==(const btree_iterator &a, const btree_iterator &b) noexcept { + return a.node == b.node && a.position == b.position; } // Accessors for the key/value the iterator is pointing at. diff --git a/src/3rdparty/cpp-btree/btree_container.h b/src/3rdparty/cpp-btree/btree_container.h index 5a429b5823..f80bf876d2 100644 --- a/src/3rdparty/cpp-btree/btree_container.h +++ b/src/3rdparty/cpp-btree/btree_container.h @@ -133,10 +133,6 @@ class btree_container { return true; } - bool operator!=(const self_type& other) const { - return !operator==(other); - } - // Functor retrieval key_compare key_comp() const { return tree_.key_comp(); } diff --git a/src/3rdparty/cpp-btree/safe_btree.h b/src/3rdparty/cpp-btree/safe_btree.h index d19e454816..903e84f7f5 100644 --- a/src/3rdparty/cpp-btree/safe_btree.h +++ b/src/3rdparty/cpp-btree/safe_btree.h @@ -116,11 +116,8 @@ class safe_btree_iterator { } // Equality/inequality operators. - bool operator==(const const_iterator &x) const { - return iter() == x.iter(); - } - bool operator!=(const const_iterator &x) const { - return iter() != x.iter(); + friend bool operator==(const safe_btree_iterator &a, const safe_btree_iterator &b) noexcept { + return a.iter() == b.iter(); } // Accessors for the key/value the iterator is pointing at.