std::basic_...m::operator=(3)
π NAME π
std::basic_ispanstream::operator= β std::basic_ispanstream::operator= (yes bestie, the name is literally the name, and we respect the minimalism π
)
okay so this is std::basic_...m::operator=(3) from the C++ Standard Libary manual, and we're about to get into the move-assignment of it all β¨
π¦ SYNOPSIS π¦
basic_ispanstream& operator=( basic_ispanstream&& other );
(1) (since C++23)
basic_ispanstream& operator=( const basic_ispanstream& ) = delete;
(2) (since C++23)
πΈ the actual tea πΈ
- Move assignment (1) β Move assigns
otherto*this, effectively move-assigning both thestd::basic_istreambase class subobject and the wrappedstd::basic_spanbuf. it's giving "both of you are moving, no cap" π«Ά - Copy assignment (2) β Copy assignment operator is deleted.
basic_ispanstreamis not copy assignable. periodt, she does not do copies π
Note that move assignment operator of the base class swaps all stream state variables (except for rdbuf()) between *this and other. the way that rdbuf() is the exception is so specific, iykyk π
It is implementation-defined whether the std::basic_spanbuf wrapped in other still holds an underlying buffer after the move assignment. so like, that part is left up to the implementation bestie, don't come for me π
π PARAMETERS π
otherβ another stream to move from
β RETURN VALUE β
*this β cute, iconic, returns itself π
π EXCEPTIONS π
May throw implementation-defined exceptions. so yeah, implementation-defined again, the mystery of it all π
π EXAMPLE π
This section is incomplete.
Reason: no example π«
π SEE ALSO π
operator=assigns abasic_spanbufobject (C++23) (public member function ofstd::basic_spanbuf<CharT,Traits>)operator=move-assigns from anotherbasic_istream(C++11) (protected member function)
Category: * Todo no example
mwah π source/version/date sign-off: http://cppreference.com, 2024.06.10, page std::basic_...m::operator=(3) β slay and goodbye β¨π
π¦ 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