std::basic_...stream::swap(3)
π NAME π
okay so this page is titled std::basic_...stream::swap(3), and it lives in the C++ Standard Libary (exact spelling from the manual name, bestie β not me being chaotic). The NAME line is literally std::basic_stringstream::swap - std::basic_stringstream::swap, which is the same thing twice, and honestly? main character energy. π
β¨ Synopsis β¨
void swap( basic_stringstream& other ); (since C++11)
Available since C++11, periodt. It exchanges the state of the stream with those of other. β¨
This is done by calling basic_iostream<CharT, Traits>::swap(other) and rdbuf()->swap(*other.rdbuf()). Both calls, no skipping, iykyk.
π«Ά Parameters π«Ά
otherβ stream to exchange the state with.
π Return value π
(none) β literally nothing comes back. no notes. π
π Exceptions π
It may throw implementation-defined exceptions. So like, don't assume it's a no-throw safe space β the implementation gets to decide. π
πΈ Example πΈ
This section is incomplete.
Reason: no example.
No example, bestie. The page is literally giving βtrust meβ and leaving. π
π See also π
operator=β moves the string stream (C++11) (public member function).swapβ swaps twobasic_stringbufobjects (C++11) (public member function ofstd::basic_stringbuf<CharT,Traits,Allocator>).
π Category π
Todo no example
cute sign-off: source is http://cppreference.com, version/date is 2024.06.10, and the footer date is also 2024.06.10 β page title std::basic_...stream::swap(3) included so nobody loses the plot. mwah πππ¦
π¦ 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