std::basic_filebuf<CharT,Traits>::swap (3) - Linux Manuals
std::basic_filebuf<CharT,Traits>::swap: std::basic_filebuf<CharT,Traits>::swap
NAME
std::basic_filebuf<CharT,Traits>::swap - std::basic_filebuf<CharT,Traits>::swap
Synopsis
void swap( std::basic_filebuf& rhs ); (since C++11)
Swaps the state and the contents of *this and rhs.
Parameters
rhs - another basic_filebuf
Return value
(none)
Notes
This function is called automatically when swapping std::fstream objects, it is rarely necessary to call it directly.
Example
// Run this code
See also
operator= assigns a basic_filebuf object
(C++11)
std::swap(std::basic_filebuf) specializes the std::swap algorithm
(C++11)
swap swaps two file streams
(C++11)