.TH "std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >" 3cxx "Fri May 28 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > \- A standard container composed of unique keys (containing at most one of each key value) that associates values of another type with the keys\&. .SH SYNOPSIS .br .PP .SS "Public Types" .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "typedef _Hashtable::key_type \fBkey_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef _Hashtable::value_type \fBvalue_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef _Hashtable::mapped_type \fBmapped_type\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef _Hashtable::hasher \fBhasher\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef _Hashtable::key_equal \fBkey_equal\fP" .br .RI "Public typedefs\&. " .ti -1c .RI "typedef _Hashtable::allocator_type \fBallocator_type\fP" .br .RI "Public typedefs\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "typedef _Hashtable::pointer \fBpointer\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::const_pointer \fBconst_pointer\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::reference \fBreference\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::const_reference \fBconst_reference\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::iterator \fBiterator\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::const_iterator \fBconst_iterator\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::local_iterator \fBlocal_iterator\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::const_local_iterator \fBconst_local_iterator\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::size_type \fBsize_type\fP" .br .RI "Iterator-related typedefs\&. " .ti -1c .RI "typedef _Hashtable::difference_type \fBdifference_type\fP" .br .RI "Iterator-related typedefs\&. " .in -1c .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBunordered_map\fP ()=default" .br .RI "Default constructor\&. " .ti -1c .RI "template \fBunordered_map\fP (_InputIterator __first, _InputIterator __last, \fBsize_type\fP __n, const \fBallocator_type\fP &__a)" .br .ti -1c .RI "template \fBunordered_map\fP (_InputIterator __first, _InputIterator __last, \fBsize_type\fP __n, const \fBhasher\fP &__hf, const \fBallocator_type\fP &__a)" .br .ti -1c .RI "template \fBunordered_map\fP (_InputIterator __first, _InputIterator __last, \fBsize_type\fP __n=0, const \fBhasher\fP &__hf=\fBhasher\fP(), const \fBkey_equal\fP &__eql=\fBkey_equal\fP(), const \fBallocator_type\fP &__a=\fBallocator_type\fP())" .br .RI "Builds an unordered_map from a range\&. " .ti -1c .RI "\fBunordered_map\fP (const \fBallocator_type\fP &__a)" .br .RI "Creates an unordered_map with no elements\&. " .ti -1c .RI "\fBunordered_map\fP (const \fBunordered_map\fP &)=default" .br .RI "Copy constructor\&. " .ti -1c .RI "\fBunordered_map\fP (const \fBunordered_map\fP &__umap, const \fBallocator_type\fP &__a)" .br .ti -1c .RI "\fBunordered_map\fP (\fBinitializer_list\fP< \fBvalue_type\fP > __l, \fBsize_type\fP __n, const \fBallocator_type\fP &__a)" .br .ti -1c .RI "\fBunordered_map\fP (\fBinitializer_list\fP< \fBvalue_type\fP > __l, \fBsize_type\fP __n, const \fBhasher\fP &__hf, const \fBallocator_type\fP &__a)" .br .ti -1c .RI "\fBunordered_map\fP (\fBinitializer_list\fP< \fBvalue_type\fP > __l, \fBsize_type\fP __n=0, const \fBhasher\fP &__hf=\fBhasher\fP(), const \fBkey_equal\fP &__eql=\fBkey_equal\fP(), const \fBallocator_type\fP &__a=\fBallocator_type\fP())" .br .RI "Builds an unordered_map from an initializer_list\&. " .ti -1c .RI "\fBunordered_map\fP (\fBsize_type\fP __n, const \fBallocator_type\fP &__a)" .br .ti -1c .RI "\fBunordered_map\fP (\fBsize_type\fP __n, const \fBhasher\fP &__hf, const \fBallocator_type\fP &__a)" .br .ti -1c .RI "\fBunordered_map\fP (\fBsize_type\fP __n, const \fBhasher\fP &__hf=\fBhasher\fP(), const \fBkey_equal\fP &__eql=\fBkey_equal\fP(), const \fBallocator_type\fP &__a=\fBallocator_type\fP())" .br .RI "Default constructor creates no elements\&. " .ti -1c .RI "\fBunordered_map\fP (\fBunordered_map\fP &&)=default" .br .RI "Move constructor\&. " .ti -1c .RI "\fBunordered_map\fP (\fBunordered_map\fP &&__umap, const \fBallocator_type\fP &__a) noexcept(noexcept(\fB_Hashtable\fP(std::move(__umap\&._M_h), __a)))" .br .ti -1c .RI "\fBiterator\fP \fBbegin\fP () noexcept" .br .ti -1c .RI "\fBlocal_iterator\fP \fBbegin\fP (\fBsize_type\fP __n)" .br .RI "Returns a read/write iterator pointing to the first bucket element\&. " .ti -1c .RI "\fBsize_type\fP \fBbucket\fP (const \fBkey_type\fP &__key) const" .br .ti -1c .RI "\fBsize_type\fP \fBbucket_count\fP () const noexcept" .br .RI "Returns the number of buckets of the unordered_map\&. " .ti -1c .RI "\fBsize_type\fP \fBbucket_size\fP (\fBsize_type\fP __n) const" .br .ti -1c .RI "void \fBclear\fP () noexcept" .br .ti -1c .RI "\fBsize_type\fP \fBcount\fP (const \fBkey_type\fP &__x) const" .br .RI "Finds the number of elements\&. " .ti -1c .RI "template \fBstd::pair\fP< \fBiterator\fP, bool > \fBemplace\fP (_Args &&\&.\&.\&. __args)" .br .RI "Attempts to build and insert a std::pair into the unordered_map\&. " .ti -1c .RI "template \fBiterator\fP \fBemplace_hint\fP (\fBconst_iterator\fP __pos, _Args &&\&.\&.\&. __args)" .br .RI "Attempts to build and insert a std::pair into the unordered_map\&. " .ti -1c .RI "_GLIBCXX_NODISCARD bool \fBempty\fP () const noexcept" .br .RI "Returns true if the unordered_map is empty\&. " .ti -1c .RI "\fBiterator\fP \fBend\fP () noexcept" .br .ti -1c .RI "\fBlocal_iterator\fP \fBend\fP (\fBsize_type\fP __n)" .br .RI "Returns a read/write iterator pointing to one past the last bucket elements\&. " .ti -1c .RI "\fBsize_type\fP \fBerase\fP (const \fBkey_type\fP &__x)" .br .RI "Erases elements according to the provided key\&. " .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBconst_iterator\fP __first, \fBconst_iterator\fP __last)" .br .RI "Erases a [__first,__last) range of elements from an unordered_map\&. " .ti -1c .RI "\fBallocator_type\fP \fBget_allocator\fP () const noexcept" .br .RI "Returns the allocator object used by the unordered_map\&. " .ti -1c .RI "\fBhasher\fP \fBhash_function\fP () const" .br .RI "Returns the hash functor object with which the unordered_map was constructed\&. " .ti -1c .RI "template void \fBinsert\fP (_InputIterator __first, _InputIterator __last)" .br .RI "A template function that attempts to insert a range of elements\&. " .ti -1c .RI "void \fBinsert\fP (\fBinitializer_list\fP< \fBvalue_type\fP > __l)" .br .RI "Attempts to insert a list of elements into the unordered_map\&. " .ti -1c .RI "\fBkey_equal\fP \fBkey_eq\fP () const" .br .RI "Returns the key comparison object with which the unordered_map was constructed\&. " .ti -1c .RI "float \fBload_factor\fP () const noexcept" .br .RI "Returns the average number of elements per bucket\&. " .ti -1c .RI "\fBsize_type\fP \fBmax_bucket_count\fP () const noexcept" .br .RI "Returns the maximum number of buckets of the unordered_map\&. " .ti -1c .RI "float \fBmax_load_factor\fP () const noexcept" .br .RI "Returns a positive number that the unordered_map tries to keep the load factor less than or equal to\&. " .ti -1c .RI "void \fBmax_load_factor\fP (float __z)" .br .RI "Change the unordered_map maximum load factor\&. " .ti -1c .RI "\fBsize_type\fP \fBmax_size\fP () const noexcept" .br .RI "Returns the maximum size of the unordered_map\&. " .ti -1c .RI "\fBunordered_map\fP & \fBoperator=\fP (const \fBunordered_map\fP &)=default" .br .RI "Copy assignment operator\&. " .ti -1c .RI "\fBunordered_map\fP & \fBoperator=\fP (\fBinitializer_list\fP< \fBvalue_type\fP > __l)" .br .RI "Unordered_map list assignment operator\&. " .ti -1c .RI "\fBunordered_map\fP & \fBoperator=\fP (\fBunordered_map\fP &&)=default" .br .RI "Move assignment operator\&. " .ti -1c .RI "void \fBrehash\fP (\fBsize_type\fP __n)" .br .RI "May rehash the unordered_map\&. " .ti -1c .RI "void \fBreserve\fP (\fBsize_type\fP __n)" .br .RI "Prepare the unordered_map for a specified number of elements\&. " .ti -1c .RI "\fBsize_type\fP \fBsize\fP () const noexcept" .br .RI "Returns the size of the unordered_map\&. " .ti -1c .RI "void \fBswap\fP (\fBunordered_map\fP &__x) noexcept(noexcept(_M_h\&.swap(__x\&._M_h)))" .br .RI "Swaps data with another unordered_map\&. " .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBconst_iterator\fP \fBbegin\fP () const noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fBcbegin\fP () const noexcept" .br .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBconst_iterator\fP \fBend\fP () const noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fBcend\fP () const noexcept" .br .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBstd::pair\fP< \fBiterator\fP, bool > \fBinsert\fP (const \fBvalue_type\fP &__x)" .br .RI "Attempts to insert a std::pair into the unordered_map\&. " .ti -1c .RI "\fBstd::pair\fP< \fBiterator\fP, bool > \fBinsert\fP (\fBvalue_type\fP &&__x)" .br .RI "Attempts to insert a std::pair into the unordered_map\&. " .ti -1c .RI "template __enable_if_t< \fBis_constructible\fP< \fBvalue_type\fP, _Pair && >::value, \fBpair\fP< \fBiterator\fP, bool > > \fBinsert\fP (_Pair &&__x)" .br .RI "Attempts to insert a std::pair into the unordered_map\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __hint, const \fBvalue_type\fP &__x)" .br .RI "Attempts to insert a std::pair into the unordered_map\&. " .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __hint, \fBvalue_type\fP &&__x)" .br .RI "Attempts to insert a std::pair into the unordered_map\&. " .ti -1c .RI "template __enable_if_t< \fBis_constructible\fP< \fBvalue_type\fP, _Pair && >::value, \fBiterator\fP > \fBinsert\fP (\fBconst_iterator\fP __hint, _Pair &&__x)" .br .RI "Attempts to insert a std::pair into the unordered_map\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBconst_iterator\fP __position)" .br .RI "Erases an element from an unordered_map\&. " .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBiterator\fP __position)" .br .RI "Erases an element from an unordered_map\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBiterator\fP \fBfind\fP (const \fBkey_type\fP &__x)" .br .RI "Tries to locate an element in an unordered_map\&. " .ti -1c .RI "\fBconst_iterator\fP \fBfind\fP (const \fBkey_type\fP &__x) const" .br .RI "Tries to locate an element in an unordered_map\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBstd::pair\fP< \fBiterator\fP, \fBiterator\fP > \fBequal_range\fP (const \fBkey_type\fP &__x)" .br .RI "Finds a subsequence matching given key\&. " .ti -1c .RI "\fBstd::pair\fP< \fBconst_iterator\fP, \fBconst_iterator\fP > \fBequal_range\fP (const \fBkey_type\fP &__x) const" .br .RI "Finds a subsequence matching given key\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBmapped_type\fP & \fBoperator[]\fP (const \fBkey_type\fP &__k)" .br .RI "Subscript ( \fC\fP[] ) access to unordered_map data\&. " .ti -1c .RI "\fBmapped_type\fP & \fBoperator[]\fP (\fBkey_type\fP &&__k)" .br .RI "Subscript ( \fC\fP[] ) access to unordered_map data\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBmapped_type\fP & \fBat\fP (const \fBkey_type\fP &__k)" .br .RI "Access to unordered_map data\&. " .ti -1c .RI "const \fBmapped_type\fP & \fBat\fP (const \fBkey_type\fP &__k) const" .br .RI "Access to unordered_map data\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBconst_local_iterator\fP \fBbegin\fP (\fBsize_type\fP __n) const" .br .RI "Returns a read-only (constant) iterator pointing to the first bucket element\&. " .ti -1c .RI "\fBconst_local_iterator\fP \fBcbegin\fP (\fBsize_type\fP __n) const" .br .RI "Returns a read-only (constant) iterator pointing to the first bucket element\&. " .in -1c .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBconst_local_iterator\fP \fBend\fP (\fBsize_type\fP __n) const" .br .RI "Returns a read-only (constant) iterator pointing to one past the last bucket elements\&. " .ti -1c .RI "\fBconst_local_iterator\fP \fBcend\fP (\fBsize_type\fP __n) const" .br .RI "Returns a read-only (constant) iterator pointing to one past the last bucket elements\&. " .in -1c .in -1c .SS "Friends" .in +1c .ti -1c .RI "template bool \fBoperator==\fP (const \fBunordered_map\fP< _Key1, _Tp1, _Hash1, _Pred1, _Alloc1 > &, const \fBunordered_map\fP< _Key1, _Tp1, _Hash1, _Pred1, _Alloc1 > &)" .br .in -1c .SH "Detailed Description" .PP .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> .br class std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >" A standard container composed of unique keys (containing at most one of each key value) that associates values of another type with the keys\&. .PP \fBTemplate Parameters\fP .RS 4 \fI_Key\fP Type of key objects\&. .br \fI_Tp\fP Type of mapped objects\&. .br \fI_Hash\fP Hashing function object type, defaults to hash<_Value>\&. .br \fI_Pred\fP Predicate function object type, defaults to equal_to<_Value>\&. .br \fI_Alloc\fP Allocator type, defaults to std::allocator>\&. .RE .PP Meets the requirements of a \fCcontainer\fP, and \fCunordered associative container\fP .PP The resulting value type of the container is std::pair\&. .PP Base is _Hashtable, dispatched at compile time via template alias __umap_hashtable\&. .PP Definition at line 102 of file unordered_map\&.h\&. .SH "Member Typedef Documentation" .PP .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::allocator_type \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBallocator_type\fP" .PP Public typedefs\&. .PP Definition at line 116 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::const_iterator \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBconst_iterator\fP" .PP Iterator-related typedefs\&. .PP Definition at line 126 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::const_local_iterator \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBconst_local_iterator\fP" .PP Iterator-related typedefs\&. .PP Definition at line 128 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::const_pointer \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBconst_pointer\fP" .PP Iterator-related typedefs\&. .PP Definition at line 122 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::const_reference \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBconst_reference\fP" .PP Iterator-related typedefs\&. .PP Definition at line 124 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::difference_type \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBdifference_type\fP" .PP Iterator-related typedefs\&. .PP Definition at line 130 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::hasher \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBhasher\fP" .PP Public typedefs\&. .PP Definition at line 114 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::iterator \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBiterator\fP" .PP Iterator-related typedefs\&. .PP Definition at line 125 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::key_equal \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBkey_equal\fP" .PP Public typedefs\&. .PP Definition at line 115 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::key_type \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBkey_type\fP" .PP Public typedefs\&. .PP Definition at line 111 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::local_iterator \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBlocal_iterator\fP" .PP Iterator-related typedefs\&. .PP Definition at line 127 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::mapped_type \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBmapped_type\fP" .PP Public typedefs\&. .PP Definition at line 113 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::pointer \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBpointer\fP" .PP Iterator-related typedefs\&. .PP Definition at line 121 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::reference \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBreference\fP" .PP Iterator-related typedefs\&. .PP Definition at line 123 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::size_type \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBsize_type\fP" .PP Iterator-related typedefs\&. .PP Definition at line 129 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> typedef _Hashtable::value_type \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBvalue_type\fP" .PP Public typedefs\&. .PP Definition at line 112 of file unordered_map\&.h\&. .SH "Constructor & Destructor Documentation" .PP .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBunordered_map\fP ()\fC [default]\fP" .PP Default constructor\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBunordered_map\fP (\fBsize_type\fP __n, const \fBhasher\fP & __hf = \fC\fBhasher\fP()\fP, const \fBkey_equal\fP & __eql = \fC\fBkey_equal\fP()\fP, const \fBallocator_type\fP & __a = \fC\fBallocator_type\fP()\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Default constructor creates no elements\&. .PP \fBParameters\fP .RS 4 \fI__n\fP Minimal initial number of buckets\&. .br \fI__hf\fP A hash functor\&. .br \fI__eql\fP A key equality functor\&. .br \fI__a\fP An allocator object\&. .RE .PP .PP Definition at line 151 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> template \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBunordered_map\fP (_InputIterator __first, _InputIterator __last, \fBsize_type\fP __n = \fC0\fP, const \fBhasher\fP & __hf = \fC\fBhasher\fP()\fP, const \fBkey_equal\fP & __eql = \fC\fBkey_equal\fP()\fP, const \fBallocator_type\fP & __a = \fC\fBallocator_type\fP()\fP)\fC [inline]\fP" .PP Builds an unordered_map from a range\&. .PP \fBParameters\fP .RS 4 \fI__first\fP An input iterator\&. .br \fI__last\fP An input iterator\&. .br \fI__n\fP Minimal initial number of buckets\&. .br \fI__hf\fP A hash functor\&. .br \fI__eql\fP A key equality functor\&. .br \fI__a\fP An allocator object\&. .RE .PP Create an unordered_map consisting of copies of the elements from [__first,__last)\&. This is linear in N (where N is distance(__first,__last))\&. .PP Definition at line 172 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBunordered_map\fP (const \fBunordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc > &)\fC [default]\fP" .PP Copy constructor\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBunordered_map\fP (\fBunordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc > &&)\fC [default]\fP" .PP Move constructor\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBunordered_map\fP (const \fBallocator_type\fP & __a)\fC [inline]\fP, \fC [explicit]\fP" .PP Creates an unordered_map with no elements\&. .PP \fBParameters\fP .RS 4 \fI__a\fP An allocator object\&. .RE .PP .PP Definition at line 191 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::\fBunordered_map\fP (\fBinitializer_list\fP< \fBvalue_type\fP > __l, \fBsize_type\fP __n = \fC0\fP, const \fBhasher\fP & __hf = \fC\fBhasher\fP()\fP, const \fBkey_equal\fP & __eql = \fC\fBkey_equal\fP()\fP, const \fBallocator_type\fP & __a = \fC\fBallocator_type\fP()\fP)\fC [inline]\fP" .PP Builds an unordered_map from an initializer_list\&. .PP \fBParameters\fP .RS 4 \fI__l\fP An initializer_list\&. .br \fI__n\fP Minimal initial number of buckets\&. .br \fI__hf\fP A hash functor\&. .br \fI__eql\fP A key equality functor\&. .br \fI__a\fP An allocator object\&. .RE .PP Create an unordered_map consisting of copies of the elements in the list\&. This is linear in N (where N is \fI__l\&.size()\fP)\&. .PP Definition at line 227 of file unordered_map\&.h\&. .SH "Member Function Documentation" .PP .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBmapped_type\fP& \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::at (const \fBkey_type\fP & __k)\fC [inline]\fP" .PP Access to unordered_map data\&. .PP \fBParameters\fP .RS 4 \fI__k\fP The key for which data should be retrieved\&. .RE .PP \fBReturns\fP .RS 4 A reference to the data whose key is equal to \fI__k\fP, if such a data is present in the unordered_map\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If no such data is present\&. .RE .PP .PP Definition at line 1002 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> const \fBmapped_type\fP& \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::at (const \fBkey_type\fP & __k) const\fC [inline]\fP" .PP Access to unordered_map data\&. .PP \fBParameters\fP .RS 4 \fI__k\fP The key for which data should be retrieved\&. .RE .PP \fBReturns\fP .RS 4 A reference to the data whose key is equal to \fI__k\fP, if such a data is present in the unordered_map\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If no such data is present\&. .RE .PP .PP Definition at line 1006 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::begin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points to the first element in the unordered_map\&. .PP Definition at line 334 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::begin ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write iterator that points to the first element in the unordered_map\&. .PP Definition at line 325 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBlocal_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::begin (\fBsize_type\fP __n)\fC [inline]\fP" .PP Returns a read/write iterator pointing to the first bucket element\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The bucket index\&. .RE .PP \fBReturns\fP .RS 4 A read/write local iterator\&. .RE .PP .PP Definition at line 1047 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_local_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::begin (\fBsize_type\fP __n) const\fC [inline]\fP" .PP Returns a read-only (constant) iterator pointing to the first bucket element\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The bucket index\&. .RE .PP \fBReturns\fP .RS 4 A read-only local iterator\&. .RE .PP .PP Definition at line 1058 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBsize_type\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::bucket_count () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the number of buckets of the unordered_map\&. .PP Definition at line 1014 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::cbegin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points to the first element in the unordered_map\&. .PP Definition at line 338 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_local_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::cbegin (\fBsize_type\fP __n) const\fC [inline]\fP" .PP Returns a read-only (constant) iterator pointing to the first bucket element\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The bucket index\&. .RE .PP \fBReturns\fP .RS 4 A read-only local iterator\&. .RE .PP .PP Definition at line 1062 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::cend () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points one past the last element in the unordered_map\&. .PP Definition at line 360 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_local_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::cend (\fBsize_type\fP __n) const\fC [inline]\fP" .PP Returns a read-only (constant) iterator pointing to one past the last bucket elements\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The bucket index\&. .RE .PP \fBReturns\fP .RS 4 A read-only local iterator\&. .RE .PP .PP Definition at line 1088 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> void \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::clear ()\fC [inline]\fP, \fC [noexcept]\fP" Erases all elements in an unordered_map\&. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line 843 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBsize_type\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::count (const \fBkey_type\fP & __x) const\fC [inline]\fP" .PP Finds the number of elements\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Key to count\&. .RE .PP \fBReturns\fP .RS 4 Number of elements with specified key\&. .RE .PP This function only makes sense for unordered_multimap; for unordered_map the result will either be 0 (not present) or 1 (present)\&. .PP Definition at line 939 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> template \fBstd::pair\fP<\fBiterator\fP, bool> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::emplace (_Args &&\&.\&.\&. __args)\fC [inline]\fP" .PP Attempts to build and insert a std::pair into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__args\fP Arguments used to generate a new pair instance (see std::piecewise_contruct for passing arguments to each part of the pair constructor)\&. .RE .PP \fBReturns\fP .RS 4 A pair, of which the first element is an iterator that points to the possibly inserted pair, and the second is a bool that is true if the pair was actually inserted\&. .RE .PP This function attempts to build and insert a (key, value) pair into the unordered_map\&. An unordered_map relies on unique keys and thus a pair is only inserted if its first element (the key) is not already present in the unordered_map\&. .PP Insertion requires amortized constant time\&. .PP Definition at line 388 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> template \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::emplace_hint (\fBconst_iterator\fP __pos, _Args &&\&.\&.\&. __args)\fC [inline]\fP" .PP Attempts to build and insert a std::pair into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP An iterator that serves as a hint as to where the pair should be inserted\&. .br \fI__args\fP Arguments used to generate a new pair instance (see std::piecewise_contruct for passing arguments to each part of the pair constructor)\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the element with key of the std::pair built from \fI__args\fP (may or may not be that std::pair)\&. .RE .PP This function is not concerned about whether the insertion took place, and thus does not return a boolean like the single-argument emplace() does\&. Note that the first parameter is only a hint and can potentially improve the performance of the insertion process\&. A bad hint would cause no gains in efficiency\&. .PP See https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints for more on \fIhinting\fP\&. .PP Insertion requires amortized constant time\&. .PP Definition at line 419 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> _GLIBCXX_NODISCARD bool \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::empty () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns true if the unordered_map is empty\&. .PP Definition at line 305 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::end () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points one past the last element in the unordered_map\&. .PP Definition at line 356 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::end ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write iterator that points one past the last element in the unordered_map\&. .PP Definition at line 347 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBlocal_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::end (\fBsize_type\fP __n)\fC [inline]\fP" .PP Returns a read/write iterator pointing to one past the last bucket elements\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The bucket index\&. .RE .PP \fBReturns\fP .RS 4 A read/write local iterator\&. .RE .PP .PP Definition at line 1073 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_local_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::end (\fBsize_type\fP __n) const\fC [inline]\fP" .PP Returns a read-only (constant) iterator pointing to one past the last bucket elements\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The bucket index\&. .RE .PP \fBReturns\fP .RS 4 A read-only local iterator\&. .RE .PP .PP Definition at line 1084 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::pair\fP<\fBiterator\fP, \fBiterator\fP> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::equal_range (const \fBkey_type\fP & __x)\fC [inline]\fP" .PP Finds a subsequence matching given key\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Key to be located\&. .RE .PP \fBReturns\fP .RS 4 Pair of iterators that possibly points to the subsequence matching given key\&. .RE .PP This function probably only makes sense for unordered_multimap\&. .PP Definition at line 963 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::pair\fP<\fBconst_iterator\fP, \fBconst_iterator\fP> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::equal_range (const \fBkey_type\fP & __x) const\fC [inline]\fP" .PP Finds a subsequence matching given key\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Key to be located\&. .RE .PP \fBReturns\fP .RS 4 Pair of iterators that possibly points to the subsequence matching given key\&. .RE .PP This function probably only makes sense for unordered_multimap\&. .PP Definition at line 967 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBsize_type\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::erase (const \fBkey_type\fP & __x)\fC [inline]\fP" .PP Erases elements according to the provided key\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Key of element to be erased\&. .RE .PP \fBReturns\fP .RS 4 The number of elements erased\&. .RE .PP This function erases all the elements located by the given key from an unordered_map\&. For an unordered_map the result of this function can only be 0 (not present) or 1 (present)\&. Note that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line 815 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::erase (\fBconst_iterator\fP __first, \fBconst_iterator\fP __last)\fC [inline]\fP" .PP Erases a [__first,__last) range of elements from an unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__first\fP Iterator pointing to the start of the range to be erased\&. .br \fI__last\fP Iterator pointing to the end of the range to be erased\&. .RE .PP \fBReturns\fP .RS 4 The iterator \fI__last\fP\&. .RE .PP This function erases a sequence of elements from an unordered_map\&. Note that this function only erases the elements, and that if the element is itself a pointer, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line 833 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::erase (\fBconst_iterator\fP __position)\fC [inline]\fP" .PP Erases an element from an unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__position\fP An iterator pointing to the element to be erased\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the element immediately following \fI__position\fP prior to the element being erased\&. If no such element exists, end() is returned\&. .RE .PP This function erases an element, pointed to by the given iterator, from an unordered_map\&. Note that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line 793 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::erase (\fBiterator\fP __position)\fC [inline]\fP" .PP Erases an element from an unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__position\fP An iterator pointing to the element to be erased\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the element immediately following \fI__position\fP prior to the element being erased\&. If no such element exists, end() is returned\&. .RE .PP This function erases an element, pointed to by the given iterator, from an unordered_map\&. Note that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line 798 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::find (const \fBkey_type\fP & __x)\fC [inline]\fP" .PP Tries to locate an element in an unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Key to be located\&. .RE .PP \fBReturns\fP .RS 4 Iterator pointing to sought-after element, or end() if not found\&. .RE .PP This function takes a key and tries to locate the element with which the key matches\&. If successful the function returns an iterator pointing to the sought after element\&. If unsuccessful it returns the past-the-end ( \fCend()\fP ) iterator\&. .PP Definition at line 921 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBconst_iterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::find (const \fBkey_type\fP & __x) const\fC [inline]\fP" .PP Tries to locate an element in an unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Key to be located\&. .RE .PP \fBReturns\fP .RS 4 Iterator pointing to sought-after element, or end() if not found\&. .RE .PP This function takes a key and tries to locate the element with which the key matches\&. If successful the function returns an iterator pointing to the sought after element\&. If unsuccessful it returns the past-the-end ( \fCend()\fP ) iterator\&. .PP Definition at line 925 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBallocator_type\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::get_allocator () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the allocator object used by the unordered_map\&. .PP Definition at line 298 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBhasher\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::hash_function () const\fC [inline]\fP" .PP Returns the hash functor object with which the unordered_map was constructed\&. .PP Definition at line 897 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> template void \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::insert (_InputIterator __first, _InputIterator __last)\fC [inline]\fP" .PP A template function that attempts to insert a range of elements\&. .PP \fBParameters\fP .RS 4 \fI__first\fP Iterator pointing to the start of the range to be inserted\&. .br \fI__last\fP Iterator pointing to the end of the range\&. .RE .PP Complexity similar to that of the range constructor\&. .PP Definition at line 645 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> template __enable_if_t<\fBis_constructible\fP<\fBvalue_type\fP, _Pair&&>::value, \fBpair\fP<\fBiterator\fP, bool> > \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::insert (_Pair && __x)\fC [inline]\fP" .PP Attempts to insert a std::pair into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Pair to be inserted (see std::make_pair for easy creation of pairs)\&. .RE .PP \fBReturns\fP .RS 4 A pair, of which the first element is an iterator that points to the possibly inserted pair, and the second is a bool that is true if the pair was actually inserted\&. .RE .PP This function attempts to insert a (key, value) pair into the unordered_map\&. An unordered_map relies on unique keys and thus a pair is only inserted if its first element (the key) is not already present in the unordered_map\&. .PP Insertion requires amortized constant time\&. .PP Definition at line 592 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::pair\fP<\fBiterator\fP, bool> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::insert (const \fBvalue_type\fP & __x)\fC [inline]\fP" .PP Attempts to insert a std::pair into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Pair to be inserted (see std::make_pair for easy creation of pairs)\&. .RE .PP \fBReturns\fP .RS 4 A pair, of which the first element is an iterator that points to the possibly inserted pair, and the second is a bool that is true if the pair was actually inserted\&. .RE .PP This function attempts to insert a (key, value) pair into the unordered_map\&. An unordered_map relies on unique keys and thus a pair is only inserted if its first element (the key) is not already present in the unordered_map\&. .PP Insertion requires amortized constant time\&. .PP Definition at line 580 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> template __enable_if_t<\fBis_constructible\fP<\fBvalue_type\fP, _Pair&&>::value, \fBiterator\fP> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::insert (\fBconst_iterator\fP __hint, _Pair && __x)\fC [inline]\fP" .PP Attempts to insert a std::pair into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__hint\fP An iterator that serves as a hint as to where the pair should be inserted\&. .br \fI__x\fP Pair to be inserted (see std::make_pair for easy creation of pairs)\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the element with key of \fI__x\fP (may or may not be the pair passed in)\&. .RE .PP This function is not concerned about whether the insertion took place, and thus does not return a boolean like the single-argument insert() does\&. Note that the first parameter is only a hint and can potentially improve the performance of the insertion process\&. A bad hint would cause no gains in efficiency\&. .PP See https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints for more on \fIhinting\fP\&. .PP Insertion requires amortized constant time\&. .PP Definition at line 630 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::insert (\fBconst_iterator\fP __hint, const \fBvalue_type\fP & __x)\fC [inline]\fP" .PP Attempts to insert a std::pair into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__hint\fP An iterator that serves as a hint as to where the pair should be inserted\&. .br \fI__x\fP Pair to be inserted (see std::make_pair for easy creation of pairs)\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the element with key of \fI__x\fP (may or may not be the pair passed in)\&. .RE .PP This function is not concerned about whether the insertion took place, and thus does not return a boolean like the single-argument insert() does\&. Note that the first parameter is only a hint and can potentially improve the performance of the insertion process\&. A bad hint would cause no gains in efficiency\&. .PP See https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints for more on \fIhinting\fP\&. .PP Insertion requires amortized constant time\&. .PP Definition at line 619 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBiterator\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::insert (\fBconst_iterator\fP __hint, \fBvalue_type\fP && __x)\fC [inline]\fP" .PP Attempts to insert a std::pair into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__hint\fP An iterator that serves as a hint as to where the pair should be inserted\&. .br \fI__x\fP Pair to be inserted (see std::make_pair for easy creation of pairs)\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the element with key of \fI__x\fP (may or may not be the pair passed in)\&. .RE .PP This function is not concerned about whether the insertion took place, and thus does not return a boolean like the single-argument insert() does\&. Note that the first parameter is only a hint and can potentially improve the performance of the insertion process\&. A bad hint would cause no gains in efficiency\&. .PP See https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints for more on \fIhinting\fP\&. .PP Insertion requires amortized constant time\&. .PP Definition at line 625 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> void \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::insert (\fBinitializer_list\fP< \fBvalue_type\fP > __l)\fC [inline]\fP" .PP Attempts to insert a list of elements into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__l\fP A std::initializer_list of elements to be inserted\&. .RE .PP Complexity similar to that of the range constructor\&. .PP Definition at line 656 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBstd::pair\fP<\fBiterator\fP, bool> \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::insert (\fBvalue_type\fP && __x)\fC [inline]\fP" .PP Attempts to insert a std::pair into the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Pair to be inserted (see std::make_pair for easy creation of pairs)\&. .RE .PP \fBReturns\fP .RS 4 A pair, of which the first element is an iterator that points to the possibly inserted pair, and the second is a bool that is true if the pair was actually inserted\&. .RE .PP This function attempts to insert a (key, value) pair into the unordered_map\&. An unordered_map relies on unique keys and thus a pair is only inserted if its first element (the key) is not already present in the unordered_map\&. .PP Insertion requires amortized constant time\&. .PP Definition at line 586 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBkey_equal\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::key_eq () const\fC [inline]\fP" .PP Returns the key comparison object with which the unordered_map was constructed\&. .PP Definition at line 903 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> float \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::load_factor () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the average number of elements per bucket\&. .PP Definition at line 1096 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBsize_type\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::max_bucket_count () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the maximum number of buckets of the unordered_map\&. .PP Definition at line 1019 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> float \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::max_load_factor () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns a positive number that the unordered_map tries to keep the load factor less than or equal to\&. .PP Definition at line 1102 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> void \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::max_load_factor (float __z)\fC [inline]\fP" .PP Change the unordered_map maximum load factor\&. .PP \fBParameters\fP .RS 4 \fI__z\fP The new maximum load factor\&. .RE .PP .PP Definition at line 1110 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBsize_type\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::max_size () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the maximum size of the unordered_map\&. .PP Definition at line 315 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBunordered_map\fP& \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::operator= (const \fBunordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc > &)\fC [default]\fP" .PP Copy assignment operator\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBunordered_map\fP& \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::operator= (\fBinitializer_list\fP< \fBvalue_type\fP > __l)\fC [inline]\fP" .PP Unordered_map list assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__l\fP An initializer_list\&. .RE .PP This function fills an unordered_map with copies of the elements in the initializer list \fI__l\fP\&. .PP Note that the assignment completely changes the unordered_map and that the resulting unordered_map's size is the same as the number of elements assigned\&. .PP Definition at line 290 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBunordered_map\fP& \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::operator= (\fBunordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc > &&)\fC [default]\fP" .PP Move assignment operator\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBmapped_type\fP& \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::operator[] (const \fBkey_type\fP & __k)\fC [inline]\fP" .PP Subscript ( \fC\fP[] ) access to unordered_map data\&. .PP \fBParameters\fP .RS 4 \fI__k\fP The key for which data should be retrieved\&. .RE .PP \fBReturns\fP .RS 4 A reference to the data of the (key,data) pair\&. .RE .PP Allows for easy lookup with the subscript ( \fC\fP[] )operator\&. Returns data associated with the key specified in subscript\&. If the key does not exist, a pair with that key is created using default values, which is then returned\&. .PP Lookup requires constant time\&. .PP Definition at line 985 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBmapped_type\fP& \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::operator[] (\fBkey_type\fP && __k)\fC [inline]\fP" .PP Subscript ( \fC\fP[] ) access to unordered_map data\&. .PP \fBParameters\fP .RS 4 \fI__k\fP The key for which data should be retrieved\&. .RE .PP \fBReturns\fP .RS 4 A reference to the data of the (key,data) pair\&. .RE .PP Allows for easy lookup with the subscript ( \fC\fP[] )operator\&. Returns data associated with the key specified in subscript\&. If the key does not exist, a pair with that key is created using default values, which is then returned\&. .PP Lookup requires constant time\&. .PP Definition at line 989 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> void \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::rehash (\fBsize_type\fP __n)\fC [inline]\fP" .PP May rehash the unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The new number of buckets\&. .RE .PP Rehash will occur only if the new number of buckets respect the unordered_map maximum load factor\&. .PP Definition at line 1121 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> void \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::reserve (\fBsize_type\fP __n)\fC [inline]\fP" .PP Prepare the unordered_map for a specified number of elements\&. .PP \fBParameters\fP .RS 4 \fI__n\fP Number of elements required\&. .RE .PP Same as rehash(ceil(n / max_load_factor()))\&. .PP Definition at line 1132 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> \fBsize_type\fP \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::size () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Returns the size of the unordered_map\&. .PP Definition at line 310 of file unordered_map\&.h\&. .SS "template, typename _Pred = equal_to<_Key>, typename _Alloc = allocator>> void \fBstd::unordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc >::swap (\fBunordered_map\fP< _Key, _Tp, _Hash, _Pred, _Alloc > & __x)\fC [inline]\fP, \fC [noexcept]\fP" .PP Swaps data with another unordered_map\&. .PP \fBParameters\fP .RS 4 \fI__x\fP An unordered_map of the same element and allocator types\&. .RE .PP This exchanges the elements between two unordered_map in constant time\&. Note that the global std::swap() function is specialized such that std::swap(m1,m2) will feed to this function\&. .PP Definition at line 857 of file unordered_map\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.