std::basic_filebuf<CharT,Traits>::operator= (3) - Linux Manuals
std::basic_filebuf<CharT,Traits>::operator=: std::basic_filebuf<CharT,Traits>::operator=
NAME
std::basic_filebuf<CharT,Traits>::operator= - std::basic_filebuf<CharT,Traits>::operator=
Synopsis
std::basic_filebuf& operator=( std::basic_filebuf&& rhs ); (since C++11)
std::basic_filebuf& operator=( const std::basic_filebuf& rhs ) = delete;
Assigns another basic_filebuf object.
1) First calls close() to close the associated file, then moves the contents of rhs into *this: the put and get buffers, the associated file, the locale, the openmode, the is_open flag, and any other state. After the move, rhs is not associated with a file and rhs.is_open() == false.
2) The copy assignment operator is deleted; basic_filebuf is not CopyAssignable.
Parameters
rhs - another basic_filebuf that will be moved from
Return value
*this
Example
// Run this code
See also
constructor (public member function)
swap swaps two basic_filebuf objects
(C++11)