std::multis...emplace_hint(3)
π NAME π
okay so bestie, this is the manual page for std::multiset::emplace_hint β and yes, the name repeats: std::multiset::emplace_hint - std::multiset::emplace_hint. It lives in the C++ Standard Libary (that spelling is straight from the header, no cap π
).
π Synopsis π
template< class... Args > (since C++11)
iterator emplace_hint( const_iterator hint, Args&&... args );
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)....
No iterators or references are invalidated. Not a one. β¨
π― 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 (strong exception safety guarantee). So like, it's giving strong safety, bestie. π‘οΈ
β±οΈ 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. π (tragic, I know)
π 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 π β this page is from http://cppreference.com, dated 2024.06.10, and filed under std::multis...emplace_hint(3). π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms