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:
parent
5a8f9c84dd
commit
4e57661919
6 changed files with 71 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue