Class ReusableStringStream

Synopsis

#include <include/internal/catch_stream.h>

class ReusableStringStream : NonCopyable

Description

No description yet.

Inheritance

Ancestors: NonCopyable

Methods

ReusableStringStream
~ReusableStringStream
get
operator<<
str

Source

Lines 33-48 in include/internal/catch_stream.h.

class ReusableStringStream : NonCopyable {
    std::size_t m_index;
    std::ostream* m_oss;
public:
    ReusableStringStream();
    ~ReusableStringStream();
    auto str() const -> std::string;
    template<typename T>
    auto operator << ( T const& value ) -> ReusableStringStream& {
        *m_oss << value;
        return *this;
    }
    auto get() -> std::ostream& { return *m_oss; }
};





Add Discussion as Guest

Log in