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

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

πŸ’… std::basic_...tream::swap(3) πŸ’…

okay so bestie, this is the C++ Standard Libary manual page for std::basic_ostringstream::swap, and it's giving β€œtiny but iconic stream-state exchange” energy. ✨


🌸 NAME 🌸

  • std::basic_ostringstream::swap β€” literally std::basic_ostringstream::swap, no cap. That's the whole name, bestie. πŸ’–

πŸ¦‹ Synopsis πŸ¦‹

void swap( basic_ostringstream& other );  (since C++11)

It exchanges the state of the stream with those of other. This is done by calling basic_ostream<CharT, Traits>::swap(other) and rdbuf()->swap(*other.rdbuf()). Slay. πŸ’…

πŸŽ€ Parameters πŸŽ€

  • other β€” stream to exchange the state with. That's it. That's the parameter. 🫢

🌈 Return value 🌈

(none) β€” like, nothing comes back. Zero. Nada. Periodt. πŸ’€

πŸ”₯ Exceptions πŸ”₯

May throw implementation-defined exceptions. So yeah, it's not promising you a totally smooth ride, bestie β€” the implementation gets to decide. πŸ™ˆ

πŸ“ Example πŸ“

This section is incomplete Reason: no example

no example bestie 😭 the page literally says so.

πŸ‘‘ 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

mwah πŸ’‹ β€” source: http://cppreference.com, date: 2024.06.10, page: std::basic_...tream::swap(3)

πŸ“¦ where this page comes from