[syncstream.osyncstream.cons] (original) (raw)

31 Input/output library [input.output]

31.11 Synchronized output streams [syncstream]

31.11.3 Class template basic_osyncstream [syncstream.osyncstream]

31.11.3.2 Construction and destruction [syncstream.osyncstream.cons]

basic_osyncstream(streambuf_type* buf, const Allocator& allocator);

Effects: Initializes sb from buf and allocator.

Initializes the base class with basic_ostream<charT, traits>(addressof(sb)).

[Note 1:

The member functions of the provided stream buffer can be called from emit() while a lock is held, which might result in a deadlock if used incautiously.

— _end note_]

Postconditions: get_wrapped() == buf is true.

basic_osyncstream(basic_osyncstream&& other) noexcept;

Effects: Move constructs the base class and sb from the corresponding subobjects of other, and calls basic_ostream<charT, traits>​::​set_rdbuf(addressof(sb)).

Postconditions: The value returned by get_wrapped()is the value returned by other.get_wrapped()prior to calling this constructor.

nullptr == other.get_wrapped() is true.