30 Input/output library [input.output]

30.8 String-based streams [string.streams]

30.8.4 Class template basic_­ostringstream [ostringstream]

30.8.4.2 Assign and swap [ostringstream.assign]

basic_ostringstream& operator=(basic_ostringstream&& rhs);
Effects: Move assigns the base and members of *this from the base and corresponding members of rhs.
Returns: *this.
void swap(basic_ostringstream& rhs);
Effects: Exchanges the state of *this and rhs by calling basic_­ostream<charT, traits>​::​swap(rhs) and sb.swap(rhs.sb).
template <class charT, class traits, class Allocator> void swap(basic_ostringstream<charT, traits, Allocator>& x, basic_ostringstream<charT, traits, Allocator>& y);
Effects: As if by x.swap(y).