std::unorde...load_factor(3)

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

✨ NAME ✨

okay bestie, this is the C++ Standard Libary manual, and today's main character is std::unordered_multimap::max_load_factor πŸ’… the NAME entry is literally std::unordered_multimap::max_load_factor β€” dash β€” std::unordered_multimap::max_load_factor, which is very "I said what I said" of it, and we respect it 🫢


🌸 Synopsis 🌸

it's giving two overloads, both since C++11:

float max_load_factor() const;    (1) (since C++11)
void max_load_factor( float ml ); (2) (since C++11)

so what does it do? it manages the maximum load factor β€” that's the number of elements per bucket, bestie πŸͺ£ and the container automatically increases the number of buckets if the load factor exceeds this threshold. no cap, that's the whole vibe.

  1. Returns current maximum load factor.
  2. Sets the maximum load factor to ml.

πŸŽ€ Parameters πŸŽ€

  • ml β€” new maximum load factor setting.

πŸ’– Return value πŸ’–

  1. Current maximum load factor.
  2. (none)

πŸ”₯ Complexity πŸ”₯

Constant. periodt ⭐

πŸ‘‘ See also πŸ‘‘

  • load_factor β€” returns average number of elements per bucket (public member function) πŸ¦‹

k bye bestie πŸ’œ this page came from http://cppreference.com, dated 2024.06.10, and the footer tag is the very truncated std::unorde...load_factor(3) β€” slay and goodbye πŸŽ€

πŸ“¦ where this page comes from