[#absl-linked_hash_map-2constructor-031] = xref:absl.adoc[absl]::xref:absl/linked_hash_map.adoc[linked_hash_map]::linked_hash_map :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<absl/container/linked_hash_map.h>` Constructs an empty map. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-03f.adoc[linked_hash_map](); ---- [.small]#xref:absl/linked_hash_map/2constructor-03f.adoc[_» more..._]# Constructs a map by copying another map. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-0e6.adoc[linked_hash_map](xref:absl/linked_hash_map.adoc[linked_hash_map] const& other); ---- [.small]#xref:absl/linked_hash_map/2constructor-0e6.adoc[_» more..._]# Constructs a map by moving from another map. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-0a.adoc[linked_hash_map](xref:absl/linked_hash_map.adoc[linked_hash_map]&& other) noexcept; ---- [.small]#xref:absl/linked_hash_map/2constructor-0a.adoc[_» more..._]# Constructs an empty map with the given allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:absl/linked_hash_map/2constructor-087.adoc[linked_hash_map](xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-087.adoc[_» more..._]# Constructs an empty map with the given capacity and allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-00.adoc[linked_hash_map]( size_t reservation_size, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-00.adoc[_» more..._]# Constructs a map from an initializer list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-06.adoc[linked_hash_map]( std::initializer_list<value_type> init, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-06.adoc[_» more..._]# Constructs a map by copying another map, using the given allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-0fd.adoc[linked_hash_map]( xref:absl/linked_hash_map.adoc[linked_hash_map] const& other, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-0fd.adoc[_» more..._]# Constructs a map by moving from another map, using the given allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-0ff.adoc[linked_hash_map]( xref:absl/linked_hash_map.adoc[linked_hash_map]&& other, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-0ff.adoc[_» more..._]# Constructs an empty map with the given capacity, hash, and allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-08b.adoc[linked_hash_map]( size_t reservation_size, xref:absl/linked_hash_map/hasher.adoc[hasher] const& hash, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-08b.adoc[_» more..._]# Constructs a map from an initializer list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-0fe.adoc[linked_hash_map]( std::initializer_list<value_type> init, size_t reservation_size, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-0fe.adoc[_» more..._]# Constructs a map from the range `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class InputIt> xref:absl/linked_hash_map/2constructor-0b.adoc[linked_hash_map]( InputIt first, InputIt last, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-0b.adoc[_» more..._]# Constructs an empty map with the given capacity, hash, equality, and allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:absl/linked_hash_map/2constructor-0d.adoc[linked_hash_map]( size_t reservation_size, xref:absl/linked_hash_map/hasher.adoc[hasher] const& hash = hasher(), xref:absl/linked_hash_map/key_equal.adoc[key_equal] const& eq = key_equal(), xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc = allocator_type()); ---- [.small]#xref:absl/linked_hash_map/2constructor-0d.adoc[_» more..._]# Constructs a map from an initializer list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-04b.adoc[linked_hash_map]( std::initializer_list<value_type> init, size_t reservation_size, xref:absl/linked_hash_map/hasher.adoc[hasher] const& hash, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-04b.adoc[_» more..._]# Constructs a map from the range `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class InputIt> xref:absl/linked_hash_map/2constructor-080.adoc[linked_hash_map]( InputIt first, InputIt last, size_t reservation_size, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-080.adoc[_» more..._]# Constructs a map from an initializer list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:absl/linked_hash_map/2constructor-0eb.adoc[linked_hash_map]( std::initializer_list<value_type> init, size_t reservation_size = 0, xref:absl/linked_hash_map/hasher.adoc[hasher] const& hash = hasher(), xref:absl/linked_hash_map/key_equal.adoc[key_equal] const& eq = key_equal(), xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc = allocator_type()); ---- [.small]#xref:absl/linked_hash_map/2constructor-0eb.adoc[_» more..._]# Constructs a map from the range `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class InputIt> xref:absl/linked_hash_map/2constructor-041.adoc[linked_hash_map]( InputIt first, InputIt last, size_t reservation_size, xref:absl/linked_hash_map/hasher.adoc[hasher] const& hash, xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc); ---- [.small]#xref:absl/linked_hash_map/2constructor-041.adoc[_» more..._]# Constructs a map from the range `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class InputIt> xref:absl/linked_hash_map/2constructor-02.adoc[linked_hash_map]( InputIt first, InputIt last, size_t reservation_size = 0, xref:absl/linked_hash_map/hasher.adoc[hasher] const& hash = hasher(), xref:absl/linked_hash_map/key_equal.adoc[key_equal] const& eq = key_equal(), xref:absl/linked_hash_map/allocator_type.adoc[allocator_type] const& alloc = allocator_type()); ---- [.small]#xref:absl/linked_hash_map/2constructor-02.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *other* | The map to copy from. | *alloc* | The allocator to use. | *reservation_size* | The number of elements to reserve capacity for. | *init* | The initializer list of elements. | *hash* | The hash function to use. | *first* | Iterator to the first element of the range. | *last* | Iterator past the last element of the range. | *eq* | The key equality comparison to use. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#