Skip to content

Commit

Permalink
RandomAccessIndexIterator: mark some operators const
Browse files Browse the repository at this point in the history
  • Loading branch information
congard committed Sep 1, 2024
1 parent f7f80e6 commit 51c101f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/tulz/container/RandomAccessIndexIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 51c101f

Please sign in to comment.