Reference

public member function
<fstream>

std::filebuf::operator=

filebuf& operator= (const filebuf& rhs);
Move-assignment
Closes the file buffer (as if member close was called), and then acquires the contents of rhs.

rhs is a closed buffer after the call with an otherwise unspecified but valid state.
It is unspecified whether the internal sequence is the one in rhs before the call, or a copy of it. In any case, both objects use independent sequences after the call (if any).

Parameters

rhs
A filebuf object of the same type (with the same class template parameters charT and traits), whose internals are moved.

Return Value

*this

Data races

Modifies both filebuf objects (*this and rhs).
Concurrent access to the same file stream buffer objects may introduce data races.

Exception safety

Basic guarantee: if an exception is thrown, the file stream buffer is in a valid state.

See also

filebuf::filebuf
Construct object (public member function)
filebuf::swap
Swap file buffers (public member function)

AltStyle によって変換されたページ (->オリジナル) /