std::swap(s...ispanstream)(3)

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

🌸 NAME 🌸

okay so, bestie, welcome to the C++ Standard Library page for std::swap(std::basic_ispanstream) β€” yes, the one indexed as std::swap(s...ispanstream)(3). It’s giving tiny overload, main character energy, and honestly? obsessed πŸ’…βœ¨

✨ Synopsis ✨

Defined in header <spanstream>
template< class CharT, class Traits >

void swap( std::basic_ispanstream<CharT, Traits>& lhs,    (since
C++23)

           std::basic_ispanstream<CharT, Traits>& rhs );

The way this overloads the std::swap algorithm for std::basic_ispanstream is lowkey iconic 🫢. It exchanges the state of lhs with that of rhs β€” no cap β€” and effectively calls lhs.swap(rhs). Periodt.

πŸ’– Parameters πŸ’–

  • lhs, rhs β€” streams whose state to swap. That’s the duo, that’s the vibe check, iykyk.

🌈 Return value 🌈

  • (none) β€” literally no return value, fr fr 😌.

⚠️ Exceptions ⚠️

May throw implementation-defined exceptions. Highkey keep that in mind β€” it is not giving β€œnever throws” energy 😭.

πŸ§ͺ Example πŸ§ͺ

This section is incomplete.

Reason: no example 😭.

πŸ‘€ See also πŸ‘€

  • swap β€” swaps two basic_ispanstream objects (C++23) (public member function).

πŸ—‚οΈ Category πŸ—‚οΈ

  • Todo no example

Cute lil sign-off: source is http://cppreference.com, dated 2024.06.10, and the page is std::swap(s...ispanstream)(3) πŸ’œ. Bye bestie, go swap responsibly ✨.

πŸ“¦ where this page comes from