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

2.1 KiB
Raw Permalink Blame History

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

1

#

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

2

#

Returns: *this.

🔗

void swap(basic_stringbuf& rhs) noexcept(see below);

3

#

Preconditions: allocator_traits::propagate_on_container_swap::value is true orget_allocator() == rhs.get_allocator() is true.

4

#

Effects: Exchanges the state of *this and rhs.

5

#

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

6

#

Effects: Equivalent to x.swap(y).