StringRef will not take ownership when writing itself to stream
This also fixes some tests that were previously failing unnoticed - WTF?
This commit is contained in:
1 parent
5a8f9c84dd
commit
4e57661919
6 files changed
+71
-28
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user