std::basic_...stream::swap(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… 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 two basic_stringbuf objects (C++11) (public member function of std::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