diff --git a/src/buffer.cc b/src/buffer.cc index d37a154e..d59977fe 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -61,6 +61,18 @@ bool BufferIterator::operator<=(const BufferIterator& iterator) const return (m_position <= iterator.m_position); } +bool BufferIterator::operator>(const BufferIterator& iterator) const +{ + assert(m_buffer == iterator.m_buffer); + return (m_position > iterator.m_position); +} + +bool BufferIterator::operator>=(const BufferIterator& iterator) const +{ + assert(m_buffer == iterator.m_buffer); + return (m_position >= iterator.m_position); +} + BufferChar BufferIterator::operator*() const { assert(m_buffer); diff --git a/src/buffer.hh b/src/buffer.hh index 542a8349..565dfea5 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -42,6 +42,8 @@ public: bool operator!= (const BufferIterator& iterator) const; bool operator< (const BufferIterator& iterator) const; bool operator<= (const BufferIterator& iterator) const; + bool operator> (const BufferIterator& iterator) const; + bool operator>= (const BufferIterator& iterator) const; BufferChar operator* () const; BufferSize operator- (const BufferIterator& iterator) const;