Skip to content

Commit

Permalink
COMP: Declare operator<(const SliceIterator &) member function const
Browse files Browse the repository at this point in the history
The original code erroneously disallowed evaluating the expression `lhs < rhs`
when `lhs` would be a `const` reference to a SliceIterator.
  • Loading branch information
N-Dekker authored and dzenanz committed Mar 29, 2023
1 parent 8bd6099 commit f60dc98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkSliceIterator.h
Expand Up @@ -116,7 +116,7 @@ class SliceIterator
* is only true if the slice iterators have the same stride and
* start location. */
bool
operator<(const SliceIterator & orig)
operator<(const SliceIterator & orig) const
{
return this->m_Pos < orig.m_Pos && this->m_Slice.stride() == orig.m_Slice.stride() &&
this->m_Slice.start() == orig.m_Slice.start();
Expand Down

0 comments on commit f60dc98

Please sign in to comment.