31 Input/output library [input.output]

31.11 Synchronized output streams [syncstream]

31.11.2 Class template basic_syncbuf [syncstream.syncbuf] 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]).
  • 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);
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.