std::basic_ofstream<CharT,Traits>::operator=
From cppreference.com
 
 
 < cpp | io | basic ofstream 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Input/output library 
 
 
 
 
 
 
 
 
 
 
 
 
 Print functions (C++23)
 Buffers
(C++23)
(C++98/26*)
(C++20)
 Streams
 Abstractions
 File I/O
 String I/O
 Array I/O
(C++23)
(C++23)
(C++23)
(C++98/26*)
(C++98/26*)
(C++98/26*)
 Synchronized Output
(C++20)
 Types
 Error category interface
(C++11)
(C++11)
std::basic_ofstream 
 
 
 
 
 Member functions
basic_ofstream::operator=
(C++11)
(C++11)
(C++26)
 File operations
 Non-member functions
(C++11)
basic_ofstream& operator=( basic_ofstream&& other );
 
 (since C++11) 
Move assigns the file stream other to *this, effectively move-assigning both the std::basic_ostream base class and the associated std::basic_filebuf .
other is left with no associated file. Note that the base class move assignment swaps all stream state variables (except for rdbuf) between *this and other.
Contents
[edit] Parameters
 other
 -
 file stream to move
[edit] Return value
*this
[edit] Example
 This section is incomplete
Reason: no example
Reason: no example
[edit] See also
(C++11)
basic_filebuf object (public member function of
std::basic_filebuf<CharT,Traits>) [edit]