std::basic_...m::operator=(3)
okay bestie, welcome to the std::basic_fstream::operator=(3) page, straight from the C++ Standard Libary manual β¨ grab a strawberry π and let's move-assign some streams.
πΈ NAME πΈ
std::basic_fstream::operator= β aka std::basic_fstream::operator= π
yes, the same name twice, that's literally the NAME section's whole vibe.
β¨ SYNOPSIS β¨
basic_fstream& operator=( basic_fstream&& other ); (since C++11)
Okay so this one is a C++11 baddie: it move assigns the file stream other to *this, effectively move-assigning both the std::basic_iostream base class and the associated std::basic_filebuf. Slay. π₯
After that, other is left with no associated file. Also note: the base class move assignment swaps all stream state variables (except for rdbuf) between *this and other. That's the tea β.
π PARAMETERS π
otherβ file stream to move π«Ά
π RETURN VALUE π
*thisβ that's the return, periodt. π
π¦ EXAMPLE π¦
This section is incomplete.
Reason: no example.
Not me showing up with an empty example section π but that's literally what the page says.
π SEE ALSO π
swapβ swaps two file streams (C++11) (public member function)operator=β assigns abasic_filebufobject (C++11) (public member function ofstd::basic_filebuf<CharT,Traits>)operator=β move-assigns anotherbasic_iostream(C++11) (protected member function)
π CATEGORY π
* Todo no example
source/version sign-off: http://cppreference.com, dated 2024.06.10, page std::basic_...m::operator=(3) β mwah, bestie π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms