diff --git a/include/tulz/container/RandomAccessIndexIterator.h b/include/tulz/container/RandomAccessIndexIterator.h index 98fa58c..858d061 100644 --- a/include/tulz/container/RandomAccessIndexIterator.h +++ b/include/tulz/container/RandomAccessIndexIterator.h @@ -52,19 +52,19 @@ class RandomAccessIndexIterator { return *this; } - RandomAccessIndexIterator operator+(difference_type i) { + RandomAccessIndexIterator operator+(difference_type i) const { RandomAccessIndexIterator it = *this; it += i; return it; } - RandomAccessIndexIterator operator-(difference_type i) { + RandomAccessIndexIterator operator-(difference_type i) const { RandomAccessIndexIterator it = *this; it -= i; return it; } - difference_type operator-(RandomAccessIndexIterator other) { + difference_type operator-(RandomAccessIndexIterator other) const { return m_index - other.m_index; }