From cppreference.com
basic_streambuf&operator=(constbasic_streambuf&other);(since C++11)Assigns the data members of other to *this.
Parameters
other - stream buffer to assign Return value
*this
Exceptions
May throw implementation-defined exceptions.
Example