basic_osyncstream( streambuf_type* buf, const Allocator& a );
explicit basic_osyncstream( streambuf_type* buf );
basic_osyncstream( std::basic_ostream<CharT, Traits>& os, const Allocator& a );
explicit basic_osyncstream( std::basic_ostream<CharT, Traits>& os );
basic_osyncstream( std::basic_osyncstream&& other ) noexcept;

Constructs new synchronized output stream

1-4) constructs the private member std::basic_syncbuf using the buffer and the allocator provided, and initializes the base class with a pointer to the member std::basic_streambuf.
5) Move constructor. Move-constructs the std::basic_ostream base and the std::basic_syncbuf member from the corresponding subobjects of other, then calls set_rdbuf with the pointer to the newly-constructed underlying std::basic_syncbuf to complete the initialization of the base. After this move constructor, other.get_wrapped() returns nullptr and destruction of other produces no output.

[edit] Parameters

buf - pointer to the std::basic_streambuf that will be wrapped
os - reference to a std::basic_ostream, whose rdbuf() will be wrapped
a - the allocator to pass to the constructor of the member std::basic_syncbuf
other - another osyncstream to move from

[edit] Example

[edit] See also

constructs a basic_syncbuf object
(public member function of std::basic_syncbuf<CharT,Traits,Allocator>) [edit]