summaryrefslogtreecommitdiff
path: root/include/ilist.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ilist.h')
-rw-r--r--include/ilist.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/ilist.h b/include/ilist.h
index 5d0a425a9cc..722677f9057 100644
--- a/include/ilist.h
+++ b/include/ilist.h
@@ -99,8 +99,14 @@ public:
reference operator*() { return *static_cast<pointer>(node_); }
pointer operator->() { return static_cast<pointer>(node_); }
- bool operator==(const Iterator &rhs) { return node_ == rhs.node_; }
- bool operator!=(const Iterator &rhs) { return !(*this == rhs); }
+ friend bool operator==(const Iterator &lhs, const Iterator &rhs)
+ {
+ return lhs.node_ == rhs.node_;
+ }
+ friend bool operator!=(const Iterator &lhs, const Iterator &rhs)
+ {
+ return !(lhs == rhs);
+ }
private:
ListNode *node_;