std::basic_...::operator=(3)
π¦ std::basic_...::operator=(3) π¦
okay bestie, this page is from the C++ Standard Libary manual, and the manual name is folded in right here near the top like a lil sticker. Weβre talking about std::basic_iostream::operator=, and yes, itβs giving stream-assignment main character energy. π
β¨ NAME β¨
std::basic_iostream::operator= β std::basic_iostream::operator=
πΈ Synopsis πΈ
Hereβs the exact signature situation, no cap:
basic_iostream& operator=( const basic_iostream& other ) = delete;
(1)
protected:
(2) (since C++11)
basic_iostream& operator=( basic_iostream&& other );
Assigns another stream object.
- Copy assignment is not allowed. π«
- Move assigns another stream object. Effectively calls
swap(rhs). π
This move assignment operator is protected: it is called by the move assignment operators of the derived stream classes std::basic_stringstream and std::basic_fstream which know how to properly move-assign the associated stream buffers. Like, itβs protected for a reason, bestie β those derived classes are the ones who know the move-assign choreography for the stream buffers. π«Ά
π Parameters π
otherβ another stream to assign state of.
π Return value π
*this β yes bestie, it returns itself, iconic behavior.
π See also π
- constructor β constructs the object (public member function).
Cute lil sign-off: this pageβs source is http://cppreference.com, its version/date is 2024.06.10, and its footer tag is std::basic_...::operator=(3). bye bestie, go slay some streams ππ¦π
π¦ 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