diff --git a/src/catch2/internal/catch_textflow.cpp b/src/catch2/internal/catch_textflow.cpp index 445cdb712c..cae8dd7148 100644 --- a/src/catch2/internal/catch_textflow.cpp +++ b/src/catch2/internal/catch_textflow.cpp @@ -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 ); } diff --git a/src/catch2/internal/catch_textflow.hpp b/src/catch2/internal/catch_textflow.hpp index 510b0516d7..2d9d78a50a 100644 --- a/src/catch2/internal/catch_textflow.hpp +++ b/src/catch2/internal/catch_textflow.hpp @@ -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;