std::flat_m...mplace_hint(3)

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

πŸ’– NAME πŸ’–

okay bestie, this page is std::flat_m...mplace_hint, and it lives in the C++ Standard Library (yes, the whole vibe). The actual thing: std::flat_multimap::emplace_hint β€” std::flat_multimap::emplace_hint.

✨ Synopsis ✨

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

So what does it do? It inserts a new element into the container as close as possible to the position just before hint. The element type’s constructor β€” that’s value_type, aka std::pair<const Key, T> β€” gets called with exactly the same arguments you supplied to the function, forwarded with std::forward<Args>(args)....

The info 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. that’s the whole return vibe ✨

πŸ¦‹ Exceptions πŸ¦‹

If an exception is thrown for any reason, this function has no effect β€” it’s giving strong exception safety guarantee. periodt.

🧚 Complexity 🧚

This section is incomplete 😭 (the page literally says so, no cap).

πŸ“ Example πŸ“

This section is incomplete. Reason: no example. πŸ™ˆ

πŸ‘‘ See also πŸ‘‘

  • emplace β€” constructs element in-place (public member function).
  • insert β€” inserts elements (public member function).

🏷️ Categories 🏷️

  • Todo without reason
  • Todo no example

cute sign-off bestie: source is http://cppreference.com, version/date is 2024.06.10, and the page label is std::flat_m...mplace_hint(3). stay slay πŸ’…πŸ’–

πŸ“¦ where this page comes from