aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/hash_table.h
diff options
context:
space:
mode:
authorpg <pg@yandex-team.com>2023-08-20 03:20:59 +0300
committerpg <pg@yandex-team.com>2023-08-20 04:44:35 +0300
commit5017c0605609840684cdc5e1bcbc83000f24a08c (patch)
tree7b29efcc6e2f710a0bd974b8ad7b26386cd4b961 /util/generic/hash_table.h
parent759857fab05dac463877ff6ef8b8776ff2076f47 (diff)
downloadydb-5017c0605609840684cdc5e1bcbc83000f24a08c.tar.gz
Diffstat (limited to 'util/generic/hash_table.h')
-rw-r--r--util/generic/hash_table.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/generic/hash_table.h b/util/generic/hash_table.h
index 31e245339e..a09c5e73d6 100644
--- a/util/generic/hash_table.h
+++ b/util/generic/hash_table.h
@@ -88,11 +88,11 @@ struct __yhashtable_iterator {
}
iterator& operator++();
iterator operator++(int);
- bool operator==(const iterator& it) const {
- return cur == it.cur;
+ friend bool operator==(const iterator& l, const iterator& r) {
+ return l.cur == r.cur;
}
- bool operator!=(const iterator& it) const {
- return cur != it.cur;
+ friend bool operator!=(const iterator& l, const iterator& r) {
+ return l.cur != r.cur;
}
bool IsEnd() const {
return !cur;
@@ -135,11 +135,11 @@ struct __yhashtable_const_iterator {
}
const_iterator& operator++();
const_iterator operator++(int);
- bool operator==(const const_iterator& it) const {
- return cur == it.cur;
+ friend bool operator==(const const_iterator& l, const const_iterator& r) {
+ return l.cur == r.cur;
}
- bool operator!=(const const_iterator& it) const {
- return cur != it.cur;
+ friend bool operator!=(const const_iterator& l, const const_iterator& r) {
+ return l.cur != r.cur;
}
bool IsEnd() const {
return !cur;