protected member function
<ios> <iostream>
std::ios::swap
void swap (ios& x) noexcept;
Swap internals
Exchanges all internal members between x and *this
, except the pointers to the associated stream buffers: rdbuf shall return the same in both objects as before the call.
Derived classes can call this function to implement custom swap functions.
Parameters
- x
- Another stream object of the same type.
Data races
Modifies both stream objects (*this
and x).
Exception safety
No-throw guarantee: this member function never throws exceptions.
See also
- ios::move
- Move internals (protected member function
)