mirror of
https://github.com/catchorg/Catch2.git
synced 2025-10-21 01:15:39 +02:00
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:
@@ -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