std::flat_map::swap(3)

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

🌸 NAME 🌸

Okay bestie, this is the std::flat_map::swap(3) page from the C++ Standard Libary manual. The NAME line is exactly std::flat_map::swap - std::flat_map::swap β€” yes, it’s giving β€œmy name is my name” energy. πŸ˜ŒπŸ’–


✨ Synopsis ✨

Here’s the signature, copied character-for-character because we do not mess with code in this house:

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

It exchanges the contents of the container adaptor with those of other. That’s the whole job. πŸ’…

Effectively calls:

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

πŸ¦‹ Parameters πŸ¦‹

  • other β€” container adaptor to exchange the contents with 🫢

πŸŽ€ Return value πŸŽ€

(none) β€” the page literally says no return value. Clean, minimal, iconic. ✨


πŸ’€ Exceptions πŸ’€

(none) β€” no exceptions listed. No notes. πŸ’€


🌈 Complexity 🌈

Same as underlying container (typically constant). That’s the complexity tea. ⭐


😭 Example 😭

The Example section is literally:

This section is incomplete Reason: no example

Not me waiting for an example like πŸ‘οΈπŸ‘„πŸ‘οΈπŸ“.


πŸ‘‘ See also πŸ‘‘

  • std::swap(std::flat_map) β€” specializes the std::swap algorithm (C++23) (function template) πŸ‘‘

🏷️ Category 🏷️

  • * Todo no example 🏷️

kisses bestie πŸ’– this page came from http://cppreference.com, dated 2024.06.10, and it’s the std::flat_map::swap(3) manual page. bye slay πŸŽ€βœ¨

πŸ“¦ where this page comes from