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

pull/642/head
Jonathan G Rennison 4 months ago
parent 606d7cd814
commit 56ac16c10e

@ -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.

@ -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(); }

@ -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.

Loading…
Cancel
Save