basic_unordered_map [constructor] | Constructors |
~basic_unordered_map [destructor] | Destructor |
operator= | Assignment operators |
at | |
begin | The first element. Constant time on average: the map keeps a lower bound on its first non-empty bucket, which insertion lowers and erase(iterator) raises, so while (!m.empty()) m.erase(m.begin()); is linear. begin() itself writes nothing, so concurrent calls are safe. |
bucket_count | |
cbegin | |
cend | |
clear | |
contains | |
count | |
emplace | Build the element from args, then insert it unless its key is present; returns the element with that key and whether it was inserted. As for std::unordered_map, the element is built first, even when the key turns out to be present (try_emplace avoids that). If the hash, the key comparison or a rehash throws, the element is destroyed and the map is unchanged. |
emplace_hint | As emplace(). The hint is accepted for compatibility with std::unordered_map and generic code, but not used. |
empty | |
end | |
equal_range | Heterogeneous equal_range(), as in C++20. |
erase | erase overloads |
find | |
hash_function | |
insert | insert overloads |
insert_or_assign | insert_or_assign overloads |
key_eq | |
load_factor | |
max_load_factor | Set the maximum load factor, ignoring values that are not positive, and rehash if the map is now over it. If that rehash throws, the old maximum is kept. |
max_size | |
operator[] | Subscript operators |
rehash | Use at least n buckets, and enough for max_load_factor(). The count is rounded up to a power of two. Throws std::length_error if that is more than max_bucket_count(); iterators are invalidated unless the count stays the same. |
reserve | Make room for n elements without exceeding max_load_factor(). Throws std::length_error if that needs more than max_bucket_count() buckets. |
size | |
swap | |
try_emplace | try_emplace overloads |