protected member function
void swap (basic_istream& x);
Exchanges all internal members between x and
*this, except the pointer to the associated stream buffers: rdbuf shall return the same in both objects as before the call.
Internally, the function calls basic_ios::swap and then exchanges the values returned by gcount.
Derived classes can call this function to implement custom swap functions.
- Another basic_istream object with the same template parameters (charT and traits).
Modifies both stream objects (
*this and x).
No-throw guarantee: this member function never throws exceptions.