protected member function
<istream> <iostream>

std::iostream::swap

void swap (iostream& x);
Swap internals
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 istream::swap.

Derived classes can call this function to implement custom swap functions.

Parameters

x
Another istream object.

Return Value

none

Data races

Modifies both stream objects (*this and x).

Exception safety

No-throw guarantee: this member function never throws exceptions.

See also