std::flat_multimap::swap(3)

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

πŸ¦‹ std::flat_multimap::swap(3) πŸ¦‹

πŸ’– NAME πŸ’–

std::flat_multimap::swap - std::flat_multimap::swap β€” yes bestie, that's literally the name, and this page is chilling in the C++ Standard Libary manual. No cap πŸ’…


✨ Synopsis ✨

void swap( flat_multimap& other ) noexcept;  (since C++23)

Okay so what does it do? It exchanges the contents of the container adaptor with those of other. Simple, iconic, done. πŸ’–

It effectively calls:

ranges::swap(compare, other.compare);
ranges::swap(c.keys, other.c.keys);
ranges::swap(c.values, other.c.values);

🌸 Parameters 🌸

  • other β€” the container adaptor to exchange the contents with. That's the one, bestie 🫢

🌟 Return value 🌟

(none) β€” literally nothing comes back. It's giving void energy 😌


πŸŽ€ Exceptions πŸŽ€

(none) β€” no exceptions here, we stay unbothered πŸ’…


πŸ”₯ Complexity πŸ”₯

Same as underlying container (typically constant). So usually constant β€” slay ⭐


πŸ¦‹ Example πŸ¦‹

This section is incomplete Reason: no example

Not me finding an incomplete example section 😭 β€” but that's exactly what it says.


πŸ‘€ See also πŸ‘€

  • std::swap(std::flat_multimap) β€” specializes the std::swap algorithm (C++23) (function template)

🧚 Category 🧚

  • Todo no example

Byeee bestie πŸ’– β€” source: http://cppreference.com, version/date: 2024.06.10, page: std::flat_multimap::swap(3). Mwah 🫢✨

πŸ“¦ where this page comes from