diff options
| author | Chris Thrasher | 2025-09-21 18:05:21 -0600 |
|---|---|---|
| committer | Chris Thrasher | 2025-09-22 11:50:44 -0600 |
| commit | 8efee9b7632e6dd014b5b041ee326eef7d0b09e6 (patch) | |
| tree | fbc1657a5d7d414fbe93a412990bcf5cfb2df438 /src/catch2/catch_tostring.cpp | |
| parent | a5735af2f7d956600250541d289c552ace7e87ae (diff) | |
| download | catch3-devel-c++17.tar.gz | |
Use std::string_viewdevel-c++17
Diffstat (limited to 'src/catch2/catch_tostring.cpp')
| -rw-r--r-- | src/catch2/catch_tostring.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/catch2/catch_tostring.cpp b/src/catch2/catch_tostring.cpp index cadfdb56..20620488 100644 --- a/src/catch2/catch_tostring.cpp +++ b/src/catch2/catch_tostring.cpp @@ -58,7 +58,7 @@ namespace Detail { } } // end unnamed namespace - std::string convertIntoString(StringRef string, bool escapeInvisibles) { + std::string convertIntoString(std::string_view string, bool escapeInvisibles) { std::string ret; // This is enough for the "don't escape invisibles" case, and a good // lower bound on the "escape invisibles" case. @@ -96,7 +96,7 @@ namespace Detail { return ret; } - std::string convertIntoString(StringRef string) { + std::string convertIntoString(std::string_view string) { return convertIntoString(string, getCurrentContext().getConfig()->showInvisibles()); } @@ -137,7 +137,7 @@ std::string StringMaker<std::string>::convert(const std::string& str) { } std::string StringMaker<std::string_view>::convert(std::string_view str) { - return Detail::convertIntoString( StringRef( str.data(), str.size() ) ); + return Detail::convertIntoString( std::string_view( str.data(), str.size() ) ); } std::string StringMaker<char const*>::convert(char const* str) { |