2.1 KiB
[stringbuf.assign]
31 Input/output library [input.output]
31.8 String-based streams [string.streams]
31.8.2 Class template basic_stringbuf [stringbuf]
31.8.2.3 Assignment and swap [stringbuf.assign]
basic_stringbuf& operator=(basic_stringbuf&& rhs);
Effects: After the move assignment *this has the observable state it would have had if it had been move constructed from rhs (see [stringbuf.cons]).
Returns: *this.
void swap(basic_stringbuf& rhs) noexcept(see below);
Preconditions: allocator_traits::propagate_on_container_swap::value is true orget_allocator() == rhs.get_allocator() is true.
Effects: Exchanges the state of *this and rhs.
Remarks: The exception specification is equivalent to:
allocator_traits::propagate_on_container_swap::value ||
allocator_traits::is_always_equal::value
template<class charT, class traits, class Allocator> void swap(basic_stringbuf<charT, traits, Allocator>& x, basic_stringbuf<charT, traits, Allocator>& y) noexcept(noexcept(x.swap(y)));
Effects: Equivalent to x.swap(y).