31 Input/output library [input.output]

31.11 Synchronized output streams [syncstream]

31.11.2 Class template basic_syncbuf [syncstream.syncbuf]

31.11.2.2 Construction and destruction [syncstream.syncbuf.cons]

basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
Effects: Sets wrapped to obuf.
Postconditions: get_wrapped() == obuf and get_allocator() == allocator are true.
Throws: Nothing unless an exception is thrown by the construction of a mutex or by memory allocation.
Remarks: A copy of allocator is used to allocate memory for internal buffers holding the associated output.
basic_syncbuf(basic_syncbuf&& other);
Postconditions: The value returned by this->get_wrapped() is the value returned by other.get_wrapped() prior to calling this constructor.
Output stored in other prior to calling this constructor will be stored in *this afterwards.
other.pbase() == other.pptr() and other.get_wrapped() == nullptr are true.
Remarks: This constructor disassociates other from its wrapped stream buffer, ensuring destruction of other produces no output.
~basic_syncbuf();
Effects: Calls emit().
Throws: Nothing.
If an exception is thrown from emit(), the destructor catches and ignores that exception.