StringRef appends itself to std::string efficiently
This commit is contained in:
parent
cf4b7eead9
commit
950ccf4749
3 changed files with 9 additions and 2 deletions
|
@ -115,6 +115,11 @@ namespace Catch {
|
|||
return os.write(str.m_start, str.m_size);
|
||||
}
|
||||
|
||||
auto operator+=( std::string& lhs, StringRef const& rhs ) -> std::string& {
|
||||
lhs.append(rhs.m_start, rhs.m_size);
|
||||
return lhs;
|
||||
}
|
||||
|
||||
} // namespace Catch
|
||||
|
||||
#if defined(__clang__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue