function template
<fstream>

std::swap (basic_filebuf)

template <class charT, class traits>
  void swap (basic_filebuf<charT, traits>& x,
             basic_filebuf<charT, traits>& y);
Swap file buffers
Exchanges the values of the basic_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
basic_filebuf objects of the same type (i.e., having both the same template parameters, charT and traits).

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