std::basic_stringbuf<CharT,Traits,Allocator>::swap (3) - Linux Manuals
std::basic_stringbuf<CharT,Traits,Allocator>::swap: std::basic_stringbuf<CharT,Traits,Allocator>::swap
NAME
std::basic_stringbuf<CharT,Traits,Allocator>::swap - std::basic_stringbuf<CharT,Traits,Allocator>::swap
Synopsis
void swap( std::basic_stringbuf& rhs ) (since C++11)
Swaps the state and the contents of *this and rhs.
Parameters
rhs - another basic_stringbuf
Return value
(none)
Notes
This function is called automatically when swapping std::stringstream objects, it is rarely necessary to call it directly.
Example
// Run this code
Output:
See also
constructor (public member function)
swap swaps two string streams
(C++11)