[#absl-linked_hash_map]
= xref:absl.adoc[absl]::linked&lowbar;hash&lowbar;map
:relfileprefix: ../
:mrdocs:

An insertion&hyphen;ordered map&period;

== Synopsis

Declared in `&lt;absl&sol;container&sol;linked&lowbar;hash&lowbar;map&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Key,
    typename Value,
    typename KeyHash = absl::flat&lowbar;hash&lowbar;set&lt;Key&gt;::hasher,
    typename KeyEq = absl::flat&lowbar;hash&lowbar;set&lt;Key, KeyHash&gt;::key&lowbar;equal,
    typename Alloc = std::allocator&lt;std::pair&lt;Key const, Value&gt;&gt;&gt;
class linked&lowbar;hash&lowbar;map;
----

== Description

Provides O(1) amortized insertions and lookups, as well as iteration over the map in the insertion order&period; This class is thread&hyphen;compatible, but not exception&hyphen;safe&period; It supports heterogeneous lookups&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:absl/linked_hash_map/allocator_type.adoc[`allocator&lowbar;type`] 
| The allocator type&period;
| xref:absl/linked_hash_map/const_iterator.adoc[`const&lowbar;iterator`] 
| The const iterator type, iterating in insertion order&period;
| xref:absl/linked_hash_map/const_pointer.adoc[`const&lowbar;pointer`] 
| A const pointer to an element&period;
| xref:absl/linked_hash_map/const_reference.adoc[`const&lowbar;reference`] 
| A const reference to an element&period;
| xref:absl/linked_hash_map/const_reverse_iterator.adoc[`const&lowbar;reverse&lowbar;iterator`] 
| The const reverse iterator type&period;
| xref:absl/linked_hash_map/difference_type.adoc[`difference&lowbar;type`] 
| The signed integer type for iterator differences&period;
| xref:absl/linked_hash_map/hasher.adoc[`hasher`] 
| The hash function type for keys&period;
| xref:absl/linked_hash_map/insert_return_type.adoc[`insert&lowbar;return&lowbar;type`] 
| The return type of node&hyphen;handle insertions&period;
| xref:absl/linked_hash_map/iterator.adoc[`iterator`] 
| The iterator type, iterating in insertion order&period;
| xref:absl/linked_hash_map/key_equal.adoc[`key&lowbar;equal`] 
| The equality comparison type for keys&period;
| xref:absl/linked_hash_map/key_type.adoc[`key&lowbar;type`] 
| The key type&period;
| xref:absl/linked_hash_map/mapped_type.adoc[`mapped&lowbar;type`] 
| The mapped value type&period;
| xref:absl/linked_hash_map/node_type.adoc[`node&lowbar;type`] 
| The node handle type used to extract and reinsert elements&period;
| xref:absl/linked_hash_map/pointer.adoc[`pointer`] 
| A pointer to an element&period;
| xref:absl/linked_hash_map/reference.adoc[`reference`] 
| A reference to an element&period;
| xref:absl/linked_hash_map/reverse_iterator.adoc[`reverse&lowbar;iterator`] 
| The reverse iterator type&period;
| xref:absl/linked_hash_map/size_type.adoc[`size&lowbar;type`] 
| The unsigned integer type for sizes&period;
| xref:absl/linked_hash_map/value_type.adoc[`value&lowbar;type`] 
| The stored element type, a key&sol;value pair&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:absl/linked_hash_map/2constructor-031.adoc[`linked&lowbar;hash&lowbar;map`]         [.small]#[constructor]#
| Constructors
| xref:absl/linked_hash_map/operator_assign-04.adoc[`operator&equals;`] 
| Assignment operators
| xref:absl/linked_hash_map/at-07.adoc[`at`] 
| `at` overloads
| xref:absl/linked_hash_map/back-0d.adoc[`back`] 
| `back` overloads
| xref:absl/linked_hash_map/begin-06.adoc[`begin`] 
| `begin` overloads
| xref:absl/linked_hash_map/bucket_count.adoc[`bucket&lowbar;count`] 
| Returns the number of buckets in the underlying hash set&period;
| xref:absl/linked_hash_map/capacity.adoc[`capacity`] 
| Returns the number of elements the map can hold without rehashing&period;
| xref:absl/linked_hash_map/cbegin.adoc[`cbegin`] 
| Returns a const iterator to the first element&period;
| xref:absl/linked_hash_map/cend.adoc[`cend`] 
| Returns a const iterator past the last element&period;
| xref:absl/linked_hash_map/clear.adoc[`clear`] 
| Removes all elements from the map&period;
| xref:absl/linked_hash_map/contains.adoc[`contains`] 
| Returns whether the map contains an element with the given key&period;
| xref:absl/linked_hash_map/count.adoc[`count`] 
| Returns the number of elements with the given key&period;
| xref:absl/linked_hash_map/crbegin.adoc[`crbegin`] 
| Returns a const reverse iterator to the last element&period;
| xref:absl/linked_hash_map/crend.adoc[`crend`] 
| Returns a const reverse iterator before the first element&period;
| xref:absl/linked_hash_map/emplace.adoc[`emplace`] 
| Constructs an element in place if the key is not already present&period;
| xref:absl/linked_hash_map/emplace_hint.adoc[`emplace&lowbar;hint`] 
| Constructs an element in place if the key is not present, ignoring the position hint&period;
| xref:absl/linked_hash_map/empty.adoc[`empty`] 
| Returns whether the map is empty&period;
| xref:absl/linked_hash_map/end-0f.adoc[`end`] 
| `end` overloads
| xref:absl/linked_hash_map/equal_range-034.adoc[`equal&lowbar;range`] 
| Returns the range of elements matching the given key&period;
| xref:absl/linked_hash_map/erase-01.adoc[`erase`] 
| `erase` overloads
| xref:absl/linked_hash_map/extract-01.adoc[`extract`] 
| `extract` overloads
| xref:absl/linked_hash_map/find-04.adoc[`find`] 
| Finds the element with the given key&period;
| xref:absl/linked_hash_map/front-00.adoc[`front`] 
| `front` overloads
| xref:absl/linked_hash_map/get_allocator.adoc[`get&lowbar;allocator`] 
| Returns the allocator used by the map&period;
| xref:absl/linked_hash_map/hash_function.adoc[`hash&lowbar;function`] 
| Returns the hash function used by the map&period;
| xref:absl/linked_hash_map/insert-00.adoc[`insert`] 
| `insert` overloads
| xref:absl/linked_hash_map/insert_or_assign-0c.adoc[`insert&lowbar;or&lowbar;assign`] 
| `insert&lowbar;or&lowbar;assign` overloads
| xref:absl/linked_hash_map/key_eq.adoc[`key&lowbar;eq`] 
| Returns the key equality comparison used by the map&period;
| xref:absl/linked_hash_map/load_factor.adoc[`load&lowbar;factor`] 
| Returns the current load factor of the underlying hash set&period;
| xref:absl/linked_hash_map/max_size.adoc[`max&lowbar;size`] 
| Returns the maximum number of elements the map can hold&period;
| xref:absl/linked_hash_map/merge-03.adoc[`merge`] 
| Merges the elements of another map into this one&period;
| xref:absl/linked_hash_map/operator_subs-0a.adoc[`operator&lsqb;&rsqb;`] 
| Returns a reference to the value mapped to the given key, inserting a default&hyphen;constructed value if the key is not present&period;
| xref:absl/linked_hash_map/pop_back.adoc[`pop&lowbar;back`] 
| Removes the last element from the map&period;
| xref:absl/linked_hash_map/pop_front.adoc[`pop&lowbar;front`] 
| Removes the first element from the map&period;
| xref:absl/linked_hash_map/rbegin-0a.adoc[`rbegin`] 
| `rbegin` overloads
| xref:absl/linked_hash_map/rehash.adoc[`rehash`] 
| Rehashes the map so it can hold at least `n` elements without rehashing&period;
| xref:absl/linked_hash_map/rend-0f.adoc[`rend`] 
| `rend` overloads
| xref:absl/linked_hash_map/reserve.adoc[`reserve`] 
| Reserves capacity for at least `n` elements&period;
| xref:absl/linked_hash_map/size.adoc[`size`] 
| Returns the number of elements in the map&period;
| xref:absl/linked_hash_map/splice.adoc[`splice`] 
| Moves an element from another map into this one at the given position&period;
| xref:absl/linked_hash_map/swap.adoc[`swap`] 
| Swaps the contents of this map with another&period;
| xref:absl/linked_hash_map/try_emplace-0f.adoc[`try&lowbar;emplace`] 
| `try&lowbar;emplace` overloads
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:absl/operator_not_eq-069.adoc[absl::operator!&equals;]`
| Returns whether two maps differ in their key&sol;value pairs&period;
| `xref:absl/operator_eq-040.adoc[absl::operator&equals;&equals;]`
| Returns whether two maps contain the same key&sol;value pairs&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
