diff --git a/src/catch2/internal/catch_case_insensitive_comparisons.cpp b/src/catch2/internal/catch_case_insensitive_comparisons.cpp index 3081edb3..3f81b219 100644 --- a/src/catch2/internal/catch_case_insensitive_comparisons.cpp +++ b/src/catch2/internal/catch_case_insensitive_comparisons.cpp @@ -14,8 +14,8 @@ namespace Catch { namespace Detail { - bool CaseInsensitiveLess::operator()( std::string const& lhs, - std::string const& rhs ) const { + bool CaseInsensitiveLess::operator()( StringRef lhs, + StringRef rhs ) const { return std::lexicographical_compare( lhs.begin(), lhs.end(), rhs.begin(), rhs.end(), diff --git a/src/catch2/internal/catch_case_insensitive_comparisons.hpp b/src/catch2/internal/catch_case_insensitive_comparisons.hpp index 372809d4..6dfe712b 100644 --- a/src/catch2/internal/catch_case_insensitive_comparisons.hpp +++ b/src/catch2/internal/catch_case_insensitive_comparisons.hpp @@ -8,14 +8,16 @@ #ifndef CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED #define CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED +#include + #include namespace Catch { namespace Detail { //! Provides case-insensitive `op<` semantics when called struct CaseInsensitiveLess { - bool operator()( std::string const& lhs, - std::string const& rhs ) const; + bool operator()( StringRef lhs, + StringRef rhs ) const; }; } // namespace Detail