absl::flat_hash_map

An unordered associative container of unique keys and associated values, optimized for speed and memory footprint.

Synopsis

Declared in <absl/container/flat_hash_map.h>

template<
    class K,
    class V,
    class Hash = /* implementation-defined */::DefaultHash,
    class Eq = /* implementation-defined */::DefaultEq,
    class Allocator = /* implementation-defined */::DefaultAlloc>
class flat_hash_map
    : public /* implementation-defined */::InstantiateRawHashMap</* implementation-defined */, Hash, Eq, Allocator>::type

Description

An absl::flat_hash_map<K, V> is an unordered associative container which has been optimized for both speed and memory footprint in most common use cases. Its interface is similar to that of std::unordered_map<K, V>.

Base Classes

NameDescription
/* implementation-defined */::InstantiateRawHashMap</* implementation-defined */, Hash, Eq, Allocator>::type

Member Functions

NameDescription
flat_hash_map [constructor]Constructs an empty flat_hash_map.

Using Declarations

Name
Unnamed using
at
begin
bucket_count
capacity
cbegin
cend
clear
contains
count
emplace
emplace_hint
empty
end
equal_range
erase
extract
find
get_allocator
hash_function
insert
insert_or_assign
key_eq
load_factor
max_load_factor
max_size
merge
operator[]
rehash
reserve
size
swap
try_emplace

Non-Member Functions

NameDescription
GetAllFlagsReturns current state of the Flags registry in a form of mapping from flag name to a flag reflection handle.
erase_ifErases all elements that satisfy the predicate pred from the container c.
swapSwaps the contents of two flat_hash_map containers.