C++20 is able to create != from == operator. so drop the != overload.
this helps to address following FTBFS:
/var/ssd/ceph/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc:141:19: error: use of overloaded operator '!=' is ambiguous (with operand types 'crimson::os::seastore::omap_manager::StringKVInnerN$
assert(child_pt != iter_end());
~~~~~~~~ ^ ~~~~~~~~~~
/usr/include/assert.h:93:27: note: expanded from macro 'assert'
(static_cast <bool> (expr) \
^~~~
/var/ssd/ceph/src/crimson/os/seastore/omap_manager/btree/string_kv_node_layout.h:380:10: note: candidate function
bool operator==(const iter_t &rhs) const {
^
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
return index > rhs.index;
}
- bool operator==(const iter_t &rhs) const {
- assert(node == rhs.node);
- return rhs.index == index;
- }
-
- bool operator!=(const iter_t &rhs) const {
- return !(*this == rhs);
+ friend bool operator==(const iter_t &lhs, const iter_t &rhs) {
+ assert(lhs.node == rhs.node);
+ return lhs.index == rhs.index;
}
private: