std::multim...emplace_hint(3)

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

okay so this is the std::multim...emplace_hint(3) page (aka std::multimap::emplace_hint) from the C++ Standard Libary man pages β€” yes, that's the header's spelling, not a typo I made πŸ˜­πŸ’–

πŸ’– NAME πŸ’–

std::multimap::emplace_hint β€” std::multimap::emplace_hint

🌸 Synopsis 🌸

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

bestie, what this does is insert a new element into the container as close as possible to the position just before hint. that's the whole vibe. ✨

The constructor of the element type (value_type, that is, std::pair<const Key, T>) is called with exactly the same arguments as supplied to the function, forwarded with std::forward<Args>(args)....

No iterators or references are invalidated. periodt. πŸ’…

πŸŽ€ 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, fr fr. 🫢

⭐ Complexity ⭐

Logarithmic in the size of the container in general, but amortized constant if the new element is inserted just before hint.

πŸ“ Example πŸ“

This section is incomplete Reason: no example

✨ See also ✨

  • emplace β€” constructs element in-place (C++11) (public member function)
  • insert β€” inserts elements or nodes (since C++17) (public member function)

πŸ‘‘ Category πŸ‘‘

* Todo no example


mwah πŸ’‹ source: http://cppreference.com; dated 2024.06.10. byeee bestie 🫢

πŸ“¦ where this page comes from