Skip to content

Commit

Permalink
Add an operator<= to the ansi string iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Apr 9, 2024
1 parent 7c586ce commit 4883193
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/catch2/internal/catch_textflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ namespace Catch {
}

std::string Column::const_iterator::operator*() const {
assert( m_lineStart != m_parsedTo );
assert( m_lineStart <= m_parsedTo );
return addIndentAndSuffix( m_lineStart, m_lineEnd );
}

Expand Down
3 changes: 3 additions & 0 deletions src/catch2/internal/catch_textflow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ namespace Catch {
bool operator!=( const_iterator const& other ) const {
return !operator==( other );
}
bool operator<=( const_iterator const& other ) const {
return m_it <= other.m_it;
}

const_iterator oneBefore() const {
auto it = *this;
Expand Down

0 comments on commit 4883193

Please sign in to comment.