std::basic_ios::move(3)
π std::basic_ios::move(3)
okay bestie, this page is from the C++ Standard Libary manual, and it's giving protected-member-function realness for std::basic_ios::move. no cap, it's literally the move member function, and the vibe is very "internal plumbing but make it iconic." π
πΈ NAME πΈ
std::basic_ios::moveβ literallystd::basic_ios::move, bestie, that's the whole name.
β¨ Synopsis β¨
okay so there are two protected overloads, both since C++11, and they look exactly like this:
protected: (since C++11)
void move( basic_ios& other );
protected: (since C++11)
void move( basic_ios&& other );
What they do: replace the current state with that of other, except for the associated rdbuf. that exception is the whole vibe check β the rdbuf is not part of the state being swapped in with everything else. π
After the call, other is in a valid, but unspecified state. And after the call to this function, these three things are true, fr fr:
rdbuf()returns a null pointerother.rdbuf()returns the same value as before the callother.tie()returns a null pointer
This member function is protected: it is called by the protected move constructors of the derived stream classes std::basic_ostream and std::basic_istream, which, in turn, are called by the public move constructors of the further derived stream classes such as std::basic_ofstream, which know how to correctly move the associated streambuffer. so yeah, it's backstage main-character energy, not something you just call directly from the group chat. π«Ά
π¦ Parameters π¦
otherβ thebasic_iosobject to transfer the state from.
π Return value π
(none)β no return value, bestie. it's a void situation. π
π See also π
swapβ swaps with anotherstd::basic_iosexceptrdbuf(C++11) (protected member function).
xoxo, bestie π β source http://cppreference.com, version/date 2024.06.10, page std::basic_ios::move(3).
π¦ 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