Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_stringref.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2018-02-17 20:41:50 +0100
committerMartin Hořeňovský2018-02-17 20:41:50 +0100
commit4e57661919e07d8f9e7fcefe73db31a96ab18867 (patch)
tree48081c9df1ca617478e97aa0a5af6a76870d9f59 /include/internal/catch_stringref.cpp
parent5a8f9c84dd01293eee7008097b2b29c3f9784753 (diff)
downloadcatch3-4e57661919e07d8f9e7fcefe73db31a96ab18867.tar.gz
StringRef will not take ownership when writing itself to stream
This also fixes some tests that were previously failing unnoticed - WTF?
Diffstat (limited to 'include/internal/catch_stringref.cpp')
-rw-r--r--include/internal/catch_stringref.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/internal/catch_stringref.cpp b/include/internal/catch_stringref.cpp
index b0b2f8e1..604e8465 100644
--- a/include/internal/catch_stringref.cpp
+++ b/include/internal/catch_stringref.cpp
@@ -112,7 +112,7 @@ namespace Catch {
}
auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& {
- return os << str.c_str();
+ return os.write(str.m_start, str.m_size);
}
} // namespace Catch