iterator/referencing: change relation operators to be const
This commit is contained in:
parent
a4d963e00b
commit
37f5d77622
@ -37,12 +37,12 @@ namespace cruft::iterator {
|
|||||||
referencing_iterator& operator++() { ++m_base; return *this; }
|
referencing_iterator& operator++() { ++m_base; return *this; }
|
||||||
referencing_iterator operator++(int) { auto val = *this; ++m_base; return val; }
|
referencing_iterator operator++(int) { auto val = *this; ++m_base; return val; }
|
||||||
|
|
||||||
bool operator== (const referencing_iterator<Base> &rhs) { return m_base == rhs.m_base; }
|
bool operator== (const referencing_iterator<Base> &rhs) const { return m_base == rhs.m_base; }
|
||||||
bool operator!= (const referencing_iterator<Base> &rhs) { return m_base != rhs.m_base; }
|
bool operator!= (const referencing_iterator<Base> &rhs) const { return m_base != rhs.m_base; }
|
||||||
bool operator>= (const referencing_iterator<Base> &rhs) { return m_base >= rhs.m_base; }
|
bool operator>= (const referencing_iterator<Base> &rhs) const { return m_base >= rhs.m_base; }
|
||||||
bool operator<= (const referencing_iterator<Base> &rhs) { return m_base <= rhs.m_base; }
|
bool operator<= (const referencing_iterator<Base> &rhs) const { return m_base <= rhs.m_base; }
|
||||||
bool operator> (const referencing_iterator<Base> &rhs) { return m_base > rhs.m_base; }
|
bool operator> (const referencing_iterator<Base> &rhs) const { return m_base > rhs.m_base; }
|
||||||
bool operator< (const referencing_iterator<Base> &rhs) { return m_base < rhs.m_base; }
|
bool operator< (const referencing_iterator<Base> &rhs) const { return m_base < rhs.m_base; }
|
||||||
|
|
||||||
const value_type& operator*() const
|
const value_type& operator*() const
|
||||||
{ return **m_base; }
|
{ return **m_base; }
|
||||||
|
Loading…
Reference in New Issue
Block a user