27 Input/output library [input.output]

27.10 Synchronized output streams [syncstream]

27.10.2 Class template basic_­syncbuf [syncstream.syncbuf]

27.10.2.3 Assignment and swap [syncstream.syncbuf.assign]

basic_syncbuf& operator=(basic_syncbuf&& rhs) noexcept;
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]).
Returns: *this.
Ensures:
  • rhs.get_­wrapped() == nullptr is true.
  • this->get_­allocator() == rhs.get_­allocator() is true when
    allocator_traits<Allocator>::propagate_on_container_move_assignment::value
    
    is true; otherwise, the allocator is unchanged.
Remarks: This assignment operator disassociates rhs from its wrapped stream buffer, ensuring destruction of rhs produces no output.
void swap(basic_syncbuf& other) noexcept;
Requires: Either allocator_­traits<Allocator>::propagate_­on_­container_­swap::value is true or this->get_­allocator() == other.get_­allocator() is true.
Effects: Exchanges the state of *this and other.