std::flat_m...mplace_hint(3)

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

πŸ’– NAME πŸ’–

okay bestie, we're in the C++ Standard Libary manual β€” yes, that's the exact spelling in the header, typo and all, iconic β€” and this page is std::flat_m...mplace_hint(3) πŸ’….

The actual name is std::flat_multiset::emplace_hint, and the page's name line literally says std::flat_multiset::emplace_hint β€” std::flat_multiset::emplace_hint (yes, it repeats itself, no notes).

✨ Synopsis ✨

template< class... Args >
iterator emplace_hint( const_iterator hint, Args&&... args );

(since C++23) ✨

What it does: inserts a new element into the container as close as possible to the position just before hint 🫢.

The constructors of the key and mapped value are called with exactly the same arguments as supplied to the function, forwarded with std::forward<Args>(args)... β€” exactly, no extras, no remix πŸ”₯.

Also, a tiny note that literally says: Information on iterator invalidation is copied from here. iykyk.

🌸 Parameters 🌸

  • hint β€” iterator to the position before which the new element will be inserted 🎯
  • args β€” arguments to forward to the constructor of the element 🧚

πŸŽ€ Return value πŸŽ€

An iterator to the inserted element. slay. ✨

πŸ¦‹ Exceptions πŸ¦‹

If an exception is thrown for any reason, this function has no effect β€” that's the strong exception safety guarantee, periodt πŸ’€. Like, any reason at all, bestie.

⭐ Complexity ⭐

This section is incomplete 😭. That's genuinely all it says here.

πŸ’… Example πŸ’…

This section is incomplete 🫠

Reason: no example β€” literally the reason the page gives. no example era, I guess.

🌈 See also 🌈

  • emplace β€” constructs element in-place (public member function) πŸ‘‘
  • insert β€” inserts elements (public member function) 🌟

πŸ“ Categories πŸ“

  • Todo without reason
  • Todo no example

and that's the whole page, bestie πŸ’–! footer vibes: source/version is http://cppreference.com, date is 2024.06.10, and the page name down there is std::flat_m...mplace_hint(3) β€” mwah πŸ’‹.

πŸ“¦ where this page comes from