2.2 KiB
[syncstream.syncbuf.assign]
31 Input/output library [input.output]
31.11 Synchronized output streams [syncstream]
31.11.2 Class template basic_syncbuf [syncstream.syncbuf]
31.11.2.3 Assignment and swap [syncstream.syncbuf.assign]
basic_syncbuf& operator=(basic_syncbuf&& rhs);
Effects: Calls emit() then move assigns from rhs.
After the move assignment *this has the observable state it would have had if it had been move constructed from rhs ([syncstream.syncbuf.cons]).
Postconditions:
rhs.get_wrapped() == nullptr is true.
this->get_allocator() == rhs.get_allocator() is true whenallocator_traits::propagate_on_container_move_assignment::value is true; otherwise, the allocator is unchanged.
Returns: *this.
Remarks: This assignment operator disassociates rhs from its wrapped stream buffer, ensuring destruction of rhs produces no output.
void swap(basic_syncbuf& other);
Preconditions: Eitherallocator_traits::propagate_on_container_swap::value is true orthis->get_allocator() == other.get_allocator() is true.
Effects: Exchanges the state of *this and other.