std::unorde...et::reserve(3)
π NAME π
okay bestie, this is the std::unordered_multiset::reserve page from the C++ Standard Libary manual π
std::unordered_multiset::reserveβ yep, the original NAME line says it twice, and honestly? iconic π.
π Synopsis π
void reserve( size_type count ); (since C++11)
Sets the number of buckets to the number needed to accommodate at least count elements without exceeding the maximum load factor, and rehashes the container β i.e., puts the elements into appropriate buckets considering that the total number of buckets has changed. Effectively calls rehash(std::ceil(count / max_load_factor())). β¨
π Parameters π
countβ new capacity of the container.
π«Ά Return value π«Ά
(none)β no return value, bestie. She gives you nothing back π
π₯ Complexity π₯
- Average case: linear in the size of the container.
- Worst case: quadratic.
π See also π
rehashβ reserves at least the specified number of buckets and regenerates the hash table (public member function).
thatβs the std::unorde...et::reserve(3) page, source/version: http://cppreference.com, dated 2024.06.10 β mwah ππ«Άβ¨
π¦ 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