Skip to content

Commit

Permalink
Add alternative overload for btree:operator==
Browse files Browse the repository at this point in the history
Silence Clang's C++20 -Wambiguous-reversed-operator.
  • Loading branch information
adolfogc authored and Kronuz committed Jan 8, 2021
1 parent f38e229 commit 3e9f417
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions btree/btree.h
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,12 @@ class btree_iterator {
bool operator!=(const const_iterator& x) const {
return node != x.node || position != x.position;
}
bool operator==(const iterator& x) const {
return node == x.node && position == x.position;
}
bool operator!=(const iterator& x) const {
return node != x.node || position != x.position;
}

// Accessors for the key/value the iterator is pointing at.
const key_type& key() const {
Expand Down

0 comments on commit 3e9f417

Please sign in to comment.