---
name: "std::tr1::unordered_map"
section: "3cxx"
platform: "linux"
package: "libstdc++6-4.4-doc"
version: "4.4.5-8"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/std::tr1::unordered_map/3cxx"
---

# std::tr1::unordered\_map(3cxx)

A standard container composed of unique keys (containing at most one of each key value) that associates values of another type with the keys.

## NAME

std::tr1::unordered\_map -

A standard container composed of unique keys (containing at most one of each key value) that associates values of another type with the keys.

## SYNOPSIS

Inherits std::tr1::\_\_unordered\_map\< \_Key, \_Tp, \_Hash, \_Pred, \_Alloc \>.

### Public Types

typedef \_Base::allocator\_type **allocator\_type**\
 typedef \_\_detail::\_Hashtable\_const\_iterator\< value\_type, \_\_constant\_iterators, \_\_cache\_hash\_code \> **const\_iterator**\
 typedef \_\_detail::\_Node\_const\_iterator\< value\_type, \_\_constant\_iterators, \_\_cache\_hash\_code \> **const\_local\_iterator**\
 typedef \_Allocator::const\_pointer **const\_pointer**\
 typedef \_Allocator::const\_reference **const\_reference**\
 typedef \_Allocator::difference\_type **difference\_type**\
 typedef \_Base::hasher **hasher**\
 typedef \_\_detail::\_Hashtable\_iterator\< value\_type, \_\_constant\_iterators, \_\_cache\_hash\_code \> **iterator**\
 typedef \_Base::key\_equal **key\_equal**\
 typedef \_Key **key\_type**\
 typedef \_\_detail::\_Node\_iterator\< value\_type, \_\_constant\_iterators, \_\_cache\_hash\_code \> **local\_iterator**\
 typedef \_Allocator::pointer **pointer**\
 typedef \_Allocator::reference **reference**\
 typedef \_Base::size\_type **size\_type**\
 typedef **\_Base::value\_type** **value\_type**\

### Public Member Functions

const \_RehashPolicy & **\_\_rehash\_policy** () const \
 void **\_\_rehash\_policy** (const \_RehashPolicy &)\
 \_Value\_allocator\_type **\_M\_get\_Value\_allocator** () const \
 iterator **begin** ()\
 const\_iterator **begin** () const \
 local\_iterator **begin** (size\_type \_\_n)\
 const\_local\_iterator **begin** (size\_type \_\_n) const \
 size\_type **bucket** (const key\_type &\_\_k) const \
 size\_type **bucket\_count** () const \
 size\_type **bucket\_size** (size\_type \_\_n) const \
 const\_iterator **cbegin** () const \
 const\_local\_iterator **cbegin** (size\_type \_\_n) const \
 const\_iterator **cend** () const \
 const\_local\_iterator **cend** (size\_type) const \
 void **clear** ()\
 size\_type **count** (const key\_type &\_\_k) const \
 bool **empty** () const \
 iterator **end** ()\
 const\_iterator **end** () const \
 local\_iterator **end** (size\_type)\
 const\_local\_iterator **end** (size\_type) const \
 **std::pair**\< iterator, iterator \> **equal\_range** (const key\_type &\_\_k)\
 **std::pair**\< const\_iterator, const\_iterator \> **equal\_range** (const key\_type &\_\_k) const \
 size\_type **erase** (const key\_type &)\
 iterator **erase** (iterator)\
 iterator **erase** (iterator, iterator)\
 const\_iterator **erase** (const\_iterator)\
 const\_iterator **erase** (const\_iterator, const\_iterator)\
 iterator **find** (const key\_type &\_\_k)\
 const\_iterator **find** (const key\_type &\_\_k) const \
 allocator\_type **get\_allocator** () const \
 iterator **insert** (iterator, const value\_type &\_\_v)\
 \_Insert\_Return\_Type **insert** (const value\_type &\_\_v)\
 const\_iterator **insert** (const\_iterator, const value\_type &\_\_v)\
 template\<typename \_InputIterator \> void **insert** (\_InputIterator \_\_first, \_InputIterator \_\_last)\
 void **insert** (**initializer\_list**\< value\_type \> \_\_l)\
 key\_equal **key\_eq** () const \
 float **load\_factor** () const \
 size\_type **max\_bucket\_count** () const \
 size\_type **max\_size** () const \
 **unordered\_map** & **operator=** (**unordered\_map** &&\_\_x)\
 **unordered\_map** & **operator=** (**initializer\_list**\< value\_type \> \_\_l)\
 void **rehash** (size\_type \_\_n)\
 size\_type **size** () const \
 void **swap** (\_Hashtable &&)\
 **unordered\_map** (**unordered\_map** &&\_\_x)\
 **unordered\_map** (size\_type \_\_n=10, const hasher &\_\_hf=hasher(), const key\_equal &\_\_eql=key\_equal(), const allocator\_type &\_\_a=allocator\_type())\
 template\<typename \_InputIterator \> **unordered\_map** (\_InputIterator \_\_f, \_InputIterator \_\_l, size\_type \_\_n=10, const hasher &\_\_hf=hasher(), const key\_equal &\_\_eql=key\_equal(), const allocator\_type &\_\_a=allocator\_type())\
 **unordered\_map** (**initializer\_list**\< value\_type \> \_\_l, size\_type \_\_n=10, const hasher &\_\_hf=hasher(), const key\_equal &\_\_eql=key\_equal(), const allocator\_type &\_\_a=allocator\_type())\

### Friends

struct **\_\_detail::\_Map\_base**\

## Detailed Description

### template\<class \_Key, class \_Tp, class \_Hash = hash\<\_Key\>, class \_Pred = std::equal\_to\<\_Key\>, class \_Alloc = std::allocator\<std::pair\<const \_Key, \_Tp\> \>\> class std::tr1::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.

Meets the requirements of a `container`, and `unordered associative container`

**Parameters:**

*Key* Type of key objects. \
 *Tp* Type of mapped objects. \
 *Hash* Hashing function object type, defaults to hash\<Value\>. \
 *Pred* Predicate function object type, defaults to equal\_to\<Value\>. \
 *Alloc* Allocator type, defaults to allocator\<Key\>.

The resulting value type of the container is std::pair\<const Key, Tp\>.

Definition at line 188 of file tr1\_impl/unordered\_map.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
