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

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

πŸ’… std::swap(std::basic_filebuf) πŸ’…

okay bestie, this one is fresh from the C++ Standard Libary manual, section (3), and the main character is the std::swap overload for std::basic_filebuf. We're gonna get you all caught up, no cap. ✨


πŸ’– NAME πŸ’–

std::swap(std::basic_filebuf) - std::swap(std::basic_filebuf)

yeah, the name and the description are literally the same thing. Minimal, iconic, we respect it. πŸ’…

πŸ¦‹ Synopsis πŸ¦‹

          template< class CharT, class Traits >

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

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

so this overloads the std::swap algorithm for std::basic_filebuf. It exchanges the state of lhs with that of rhs, and effectively calls lhs.swap(rhs). That's the whole tea. πŸ«–βœ¨

πŸŽ€ Parameters πŸŽ€

  • lhs, rhs β€” std::basic_filebuf objects whose states to swap. That's it, that's the parameter list bestie. πŸ’–

🌸 Return value 🌸

(none) β€” no return value, literally nothing comes back. It's giving "I did the swap and left", periodt. πŸ’€

πŸ“ Example πŸ“

This section is incomplete.

Reason: no example.

so yeah, no example here bestie. We're just gonna have to imagine the swap energy 😭✨

πŸ’œ See also πŸ’œ

  • swap β€” swaps two basic_filebuf objects. (C++11) (public member function)
  • swap β€” swaps the values of two objects. (function template)

πŸ’€ Category πŸ’€

  • Todo no example

and that's the page, bestie. slay πŸ’–

xoxo, your fave Unix girly β€” source/version: http://cppreference.com, date: 2024.06.10, page: std::swap(s...sic_filebuf)(3) πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from