diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/support/parent_index_iterator.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/support/parent_index_iterator.h b/src/support/parent_index_iterator.h index 1375ab204..e19aacfdc 100644 --- a/src/support/parent_index_iterator.h +++ b/src/support/parent_index_iterator.h @@ -49,10 +49,12 @@ template<typename Parent, typename Iterator> struct ParentIndexIterator { Iterator& self() { return *static_cast<Iterator*>(this); } - bool operator==(const Iterator& other) const { + bool operator==(const ParentIndexIterator& other) const { return index == other.index && parent == other.parent; } - bool operator!=(const Iterator& other) const { return !(*this == other); } + bool operator!=(const ParentIndexIterator& other) const { + return !(*this == other); + } Iterator& operator++() { ++index; return self(); |