cpp-btree: Remove trivial operator!= no longer required in C++20

This commit is contained in:
Jonathan G Rennison
2024-01-21 23:53:28 +00:00
parent 606d7cd814
commit 56ac16c10e
3 changed files with 4 additions and 14 deletions

View File

@@ -796,11 +796,8 @@ struct btree_iterator {
} }
void decrement_slow(); void decrement_slow();
bool operator==(const const_iterator &x) const { friend bool operator==(const btree_iterator &a, const btree_iterator &b) noexcept {
return node == x.node && position == x.position; return a.node == b.node && a.position == b.position;
}
bool operator!=(const const_iterator &x) const {
return node != x.node || position != x.position;
} }
// Accessors for the key/value the iterator is pointing at. // Accessors for the key/value the iterator is pointing at.

View File

@@ -133,10 +133,6 @@ class btree_container {
return true; return true;
} }
bool operator!=(const self_type& other) const {
return !operator==(other);
}
// Functor retrieval // Functor retrieval
key_compare key_comp() const { return tree_.key_comp(); } key_compare key_comp() const { return tree_.key_comp(); }

View File

@@ -116,11 +116,8 @@ class safe_btree_iterator {
} }
// Equality/inequality operators. // Equality/inequality operators.
bool operator==(const const_iterator &x) const { friend bool operator==(const safe_btree_iterator &a, const safe_btree_iterator &b) noexcept {
return iter() == x.iter(); return a.iter() == b.iter();
}
bool operator!=(const const_iterator &x) const {
return iter() != x.iter();
} }
// Accessors for the key/value the iterator is pointing at. // Accessors for the key/value the iterator is pointing at.