---
name: "__gnu_cxx::hashtable"
section: "3"
platform: "linux"
package: "libstdc++5-3.3-doc"
version: "1:3.3.6-15"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::hashtable"
---

# \_\_gnu\_cxx::hashtable(3)

## NAME

\_\_gnu\_cxx::hashtable -

## SYNOPSIS

### Public Types

typedef Key **key\_type**\
 typedef Val **value\_type**\
 typedef HashFcn **hasher**\
 typedef EqualKey **key\_equal**\
 typedef size\_t **size\_type**\
 typedef ptrdiff\_t **difference\_type**\
 typedef **value\_type** \* **pointer**\
 typedef const **value\_type** \* **const\_pointer**\
 typedef **value\_type** & **reference**\
 typedef const **value\_type** & **const\_reference**\
 typedef **Alloc\_traits**\< Val, Alloc \>::**allocator\_type** **allocator\_type**\
 typedef **Hashtable\_iterator**\< Val, Key, HashFcn, ExtractKey, EqualKey, Alloc \> **iterator**\
 typedef **Hashtable\_const\_iterator**\< Val, Key, HashFcn, ExtractKey, EqualKey, Alloc \> **const\_iterator**\

### Public Member Functions

**hasher** **hash\_funct** () const\
 **key\_equal** **key\_eq** () const\
 **allocator\_type** **get\_allocator** () const\
 **hashtable** (**size\_type** n, const HashFcn &\_\_hf, const EqualKey &\_\_eql, const ExtractKey &\_\_ext, const **allocator\_type** &a=**allocator\_type**())\
 **hashtable** (**size\_type** n, const HashFcn &\_\_hf, const EqualKey &\_\_eql, const **allocator\_type** &a=**allocator\_type**())\
 **hashtable** (const **hashtable** &\_\_ht)\
 **hashtable** & **operator=** (const **hashtable** &\_\_ht)\
 **~hashtable** ()\
 **size\_type** **size** () const\
 **size\_type** **max\_size** () const\
 bool **empty** () const\
 void **swap** (**hashtable** &\_\_ht)\
 **iterator** **begin** ()\
 **iterator** **end** ()\
 **const\_iterator** **begin** () const\
 **const\_iterator** **end** () const\
 **size\_type** **bucket\_count** () const\
 **size\_type** **max\_bucket\_count** () const\
 **size\_type** **elems\_in\_bucket** (**size\_type** \_\_bucket) const\
 **pair**\< **iterator**, bool \> **insert\_unique** (const **value\_type** &\_\_obj)\
 **iterator** **insert\_equal** (const **value\_type** &\_\_obj)\
 **pair**\< **iterator**, bool \> **insert\_unique\_noresize** (const **value\_type** &\_\_obj)\
 **iterator** **insert\_equal\_noresize** (const **value\_type** &\_\_obj)\
 template\<class InputIterator\> void **insert\_unique** (InputIterator \_\_f, InputIterator \_\_l)\
 template\<class InputIterator\> void **insert\_equal** (InputIterator \_\_f, InputIterator \_\_l)\
 template\<class InputIterator\> void **insert\_unique** (InputIterator \_\_f, InputIterator \_\_l, **input\_iterator\_tag**)\
 template\<class InputIterator\> void **insert\_equal** (InputIterator \_\_f, InputIterator \_\_l, **input\_iterator\_tag**)\
 template\<class ForwardIterator\> void **insert\_unique** (ForwardIterator \_\_f, ForwardIterator \_\_l, **forward\_iterator\_tag**)\
 template\<class ForwardIterator\> void **insert\_equal** (ForwardIterator \_\_f, ForwardIterator \_\_l, **forward\_iterator\_tag**)\
 **reference** **find\_or\_insert** (const **value\_type** &\_\_obj)\
 **iterator** **find** (const **key\_type** &\_\_key)\
 **const\_iterator** **find** (const **key\_type** &\_\_key) const\
 **size\_type** **count** (const **key\_type** &\_\_key) const\
 **pair**\< **iterator**, **iterator** \> **equal\_range** (const **key\_type** &\_\_key)\
 **pair**\< **const\_iterator**, **const\_iterator** \> **equal\_range** (const **key\_type** &\_\_key) const\
 **size\_type** **erase** (const **key\_type** &\_\_key)\
 void **erase** (const **iterator** &\_\_it)\
 void **erase** (**iterator** first, **iterator** last)\
 void **erase** (const **const\_iterator** &\_\_it)\
 void **erase** (**const\_iterator** first, **const\_iterator** last)\
 void **resize** (**size\_type** num\_elements\_hint)\
 void **clear** ()\

### Private Types

typedef **Hashtable\_node**\< Val \> **Node**\

### Private Member Functions

**Node** \* **M\_get\_node** ()\
 void **M\_put\_node** (**Node** \*\_\_p)\
 **size\_type** **M\_next\_size** (**size\_type** n) const \
 void **M\_initialize\_buckets** (**size\_type** n)\
 **size\_type** **M\_bkt\_num\_key** (const **key\_type** &\_\_key) const\
 **size\_type** **M\_bkt\_num** (const **value\_type** &\_\_obj) const\
 **size\_type** **M\_bkt\_num\_key** (const **key\_type** &\_\_key, size\_t n) const\
 **size\_type** **M\_bkt\_num** (const **value\_type** &\_\_obj, size\_t n) const\
 **Node** \* **M\_new\_node** (const **value\_type** &\_\_obj)\
 void **M\_delete\_node** (**Node** \*n)\
 void **M\_erase\_bucket** (const **size\_type** n, **Node** \*first, **Node** \*last)\
 void **M\_erase\_bucket** (const **size\_type** n, **Node** \*last)\
 void **M\_copy\_from** (const **hashtable** &\_\_ht)\

### Private Attributes

**Alloc\_traits**\< **Node**, Alloc \>::**allocator\_type** **M\_node\_allocator**\
 **hasher** **M\_hash**\
 **key\_equal** **M\_equals**\
 ExtractKey **M\_get\_key**\
 **vector**\< **Node** \*, Alloc \> **M\_buckets**\
 **size\_type** **M\_num\_elements**\

### Friends

struct **Hashtable\_iterator\< Val, Key, HashFcn, ExtractKey, EqualKey, Alloc \>**\
 struct **Hashtable\_const\_iterator\< Val, Key, HashFcn, ExtractKey, EqualKey, Alloc \>**\

## Detailed Description

### template\<class Val, class Key, class HashFcn, class ExtractKey, class EqualKey, class Alloc\> class \_\_gnu\_cxx::hashtable\< Val, Key, HashFcn, ExtractKey, EqualKey, Alloc \>

Definition at line 223 of file stl\_hashtable.h.

## Author

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