diff --git a/iterator/referencing.hpp b/iterator/referencing.hpp index bd5cdfdb..beff2428 100644 --- a/iterator/referencing.hpp +++ b/iterator/referencing.hpp @@ -37,12 +37,12 @@ namespace cruft::iterator { referencing_iterator& operator++() { ++m_base; return *this; } referencing_iterator operator++(int) { auto val = *this; ++m_base; return val; } - bool operator== (const referencing_iterator &rhs) { return m_base == rhs.m_base; } - bool operator!= (const referencing_iterator &rhs) { return m_base != rhs.m_base; } - bool operator>= (const referencing_iterator &rhs) { return m_base >= rhs.m_base; } - bool operator<= (const referencing_iterator &rhs) { return m_base <= rhs.m_base; } - bool operator> (const referencing_iterator &rhs) { return m_base > rhs.m_base; } - bool operator< (const referencing_iterator &rhs) { return m_base < rhs.m_base; } + bool operator== (const referencing_iterator &rhs) const { return m_base == rhs.m_base; } + bool operator!= (const referencing_iterator &rhs) const { return m_base != rhs.m_base; } + bool operator>= (const referencing_iterator &rhs) const { return m_base >= rhs.m_base; } + bool operator<= (const referencing_iterator &rhs) const { return m_base <= rhs.m_base; } + bool operator> (const referencing_iterator &rhs) const { return m_base > rhs.m_base; } + bool operator< (const referencing_iterator &rhs) const { return m_base < rhs.m_base; } const value_type& operator*() const { return **m_base; }