Files
2025-10-25 03:02:53 +03:00

2.2 KiB
Raw Permalink Blame History

[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);

1

#

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]).

2

#

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.

3

#

Returns: *this.

4

#

Remarks: This assignment operator disassociates rhs from its wrapped stream buffer, ensuring destruction of rhs produces no output.

🔗

void swap(basic_syncbuf& other);

5

#

Preconditions: Eitherallocator_traits::propagate_on_container_swap::value is true orthis->get_allocator() == other.get_allocator() is true.

6

#

Effects: Exchanges the state of *this and other.