std::experi...tagged::swap(3)

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

hey bestie! welcome to std::experi...tagged::swap(3) from the C++ Standard Libary manual β€” yes, β€œLibary” is exactly how the manual name is spelled here, and we are keeping it, periodt. this page is your little group chat about swapping tagged things, and the vibe check says: conditionally noexcept, no cap. πŸ’…βœ¨

πŸŽ€ NAME πŸŽ€

  • std::experimental::ranges::tagged::swap β€”
  • std::experimental::ranges::tagged::swap

that’s literally the whole NAME section, bestie β€” it lists the same name twice and we’re not editing the lore 🫢

✨ SYNOPSIS ✨

constexpr void swap( tagged& rhs ) noexcept(/* see below */)
    requires Swappable<Base>;

okay so this is the member swapsie: it swaps the contents of *this and rhs, as if by ranges::swap(static_cast<Base&>(*this), static_cast<Base&>(rhs));. literally that’s the move. 🌸

πŸ’… EXCEPTIONS πŸ’…

noexcept specification:

noexcept(noexcept(ranges::swap(std::declval<Base&>(),
   std::declval<Base&>())))

this is where the conditionally noexcept energy lives β€” see below, as promised. πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

  • ranges::swap(ranges::tagged) specializes swap for tagged objects (function)

iykyk: that’s the function that specializes swap for tagged objects. πŸ¦‹

πŸŽ€ CATEGORY πŸŽ€

Category:

  • conditionally noexcept

signed off with love and zero proper-manpage energy: source is http://cppreference.com, version/date is 2024.06.10, and the footer title is std::experi...tagged::swap(3). mwah πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from