function
<fstream>

std::swap (filebuf)

void swap (filebuf& x, filebuf& y);
Swap file buffers
Exchanges the values of the filebuf objects x and y.

This is an overload of the generic function swap that behaves as if x.swap(y) was called.

Parameters

x,y
filebuf objects to swap.

Return value

none

Data races

Both objects, x and y, are modified.

Exception safety

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

See also