29 Input/output library [input.output]

29.10 Synchronized output streams [syncstream]

29.10.2 Class template basic_­syncbuf [syncstream.syncbuf] 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]).
  • 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.
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) noexcept;
Preconditions: 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.