C++ basic_streambuf Library - swap
Description
It is used to swap internals.
Declaration
Following is the declaration for std::basic_streambuf::swap.
void swap (basic_istream& x);
Parameters
x − Another basic_istream object with the same template parameters (charT and traits).
Return Value
none
Exceptions
No-throw guarantee − this member function never throws exceptions.
Data races
Modifies both stream objects (*this and x).
streambuf.htm