std::basic_osyncstream<CharT,Traits,Allocator>::get_wrapped

Returns a pointer to the wrapped std::basic_streambuf, obtained by calling get_wrapped() on the underlying std::basic_syncbuf.

# Declarations

streambuf_type* get_wrapped() const noexcept;

# Example

#include <iostream>
#include <syncstream>
 
int main()
{
    std::osyncstream bout1(std::cout);
    bout1 << "Hello, ";
    {
        std::osyncstream(bout1.get_wrapped()) << "Goodbye, " << "Planet!" << '\n';
    } // emits the contents of the temporary buffer
    bout1 << "World!" << '\n';
} // emits the contents of bout1

# See also