mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Allow explicitly setting ReusableStringStream's serialized data
This commit is contained in:
parent
a4ac07d104
commit
9d591f19ff
@ -173,10 +173,14 @@ namespace Detail {
|
||||
Singleton<StringStreams>::getMutable().release( m_index );
|
||||
}
|
||||
|
||||
auto ReusableStringStream::str() const -> std::string {
|
||||
std::string ReusableStringStream::str() const {
|
||||
return static_cast<std::ostringstream*>( m_oss )->str();
|
||||
}
|
||||
|
||||
void ReusableStringStream::str( std::string const& str ) {
|
||||
static_cast<std::ostringstream*>( m_oss )->str( str );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -37,7 +37,10 @@ namespace Catch {
|
||||
ReusableStringStream();
|
||||
~ReusableStringStream();
|
||||
|
||||
auto str() const -> std::string;
|
||||
//! Returns the serialized state
|
||||
std::string str() const;
|
||||
//! Sets internal state to `str`
|
||||
void str(std::string const& str);
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
|
Loading…
Reference in New Issue
Block a user