std::basic_iostream::swap(3)
π NAME π
Okay so this is std::basic_iostream::swap(3) from the C++ Standard Libary manual, and the official NAME line is literally:
std::basic_iostream::swap - std::basic_iostream::swap
...yes, itβs the same thing twice, and we respect the commitment. π
β¨ Synopsis β¨
Starting in C++11, this one is protected β signature time:
protected: (since C++11)
void swap( basic_iostream& other );
It exchanges the state with another input/output stream object. Effectively calls basic_istream<CharT,Traits>::swap(other).
This member function is protected: it is called by the swap member functions of the derived stream classes std::basic_stringstream and std::basic_fstream, which know how to correctly swap the associated stream buffers. Slay. π¦
π«Ά Parameters π«Ά
otherβ another stream to exchange the state with.
π Return value π
*thisβ yep, it returns*this, and thatβs the whole answer. Periodt. β¨
π Thatβs the tea from the std::basic_iostream::swap(3) page β source: http://cppreference.com, date: 2024.06.10. Byeee, 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