---
name: "__gnu_cxx::hash_set"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_cxx::hash_set"
---

# \_\_gnu\_cxx::hash\_set(3)

## NAME

\_\_gnu\_cxx::hash\_set\< \_Value, \_HashFcn, \_EqualKey, \_Alloc \>

## SYNOPSIS

\#include \<hash\_set\>

### Public Types

typedef \_Ht::allocator\_type **allocator\_type**\
 typedef \_Ht::const\_iterator **const\_iterator**\
 typedef \_Alloc\_traits::const\_pointer **const\_pointer**\
 typedef \_Alloc\_traits::const\_reference **const\_reference**\
 typedef \_Ht::difference\_type **difference\_type**\
 typedef \_Ht::hasher **hasher**\
 typedef \_Ht::const\_iterator **iterator**\
 typedef \_Ht::key\_equal **key\_equal**\
 typedef \_Ht::key\_type **key\_type**\
 typedef \_Alloc\_traits::pointer **pointer**\
 typedef \_Alloc\_traits::reference **reference**\
 typedef \_Ht::size\_type **size\_type**\
 typedef \_Ht::value\_type **value\_type**\

### Public Member Functions

template\<class \_InputIterator\> **hash\_set** (\_InputIterator \_\_f, \_InputIterator \_\_l)\
 template\<class \_InputIterator\> **hash\_set** (\_InputIterator \_\_f, \_InputIterator \_\_l, size\_type \_\_n)\
 template\<class \_InputIterator\> **hash\_set** (\_InputIterator \_\_f, \_InputIterator \_\_l, size\_type \_\_n, const hasher &\_\_hf)\
 template\<class \_InputIterator\> **hash\_set** (\_InputIterator \_\_f, \_InputIterator \_\_l, size\_type \_\_n, const hasher &\_\_hf, const key\_equal &\_\_eql, const allocator\_type &\_\_a=allocator\_type())\
 **hash\_set** (size\_type \_\_n)\
 **hash\_set** (size\_type \_\_n, const hasher &\_\_hf)\
 **hash\_set** (size\_type \_\_n, const hasher &\_\_hf, const key\_equal &\_\_eql, const allocator\_type &\_\_a=allocator\_type())\
 iterator **begin** () const\
 size\_type **bucket\_count** () const\
 void **clear** ()\
 size\_type **count** (const key\_type &\_\_key) const\
 size\_type **elems\_in\_bucket** (size\_type \_\_n) const\
 bool **empty** () const\
 iterator **end** () const\
 **pair**\< iterator, iterator \> **equal\_range** (const key\_type &\_\_key) const\
 size\_type **erase** (const key\_type &\_\_key)\
 void **erase** (iterator \_\_f, iterator \_\_l)\
 void **erase** (iterator \_\_it)\
 iterator **find** (const key\_type &\_\_key) const\
 allocator\_type **get\_allocator** () const\
 hasher **hash\_funct** () const\
 template\<class \_InputIterator\> void **insert** (\_InputIterator \_\_f, \_InputIterator \_\_l)\
 **pair**\< iterator, bool \> **insert** (const value\_type &\_\_obj)\
 **pair**\< iterator, bool \> **insert\_noresize** (const value\_type &\_\_obj)\
 key\_equal **key\_eq** () const\
 size\_type **max\_bucket\_count** () const\
 size\_type **max\_size** () const\
 void **resize** (size\_type \_\_hint)\
 size\_type **size** () const\
 void **swap** (hash\_set &\_\_hs)\

### Friends

template\<class \_Val, class \_HF, class \_EqK, class \_Al\> bool **operator==** (const hash\_set\< \_Val, \_HF, \_EqK, \_Al \> &, const hash\_set\< \_Val, \_HF, \_EqK, \_Al \> &)\

## Detailed Description

### template\<class \_Value, class \_HashFcn = hash\<\_Value\>, class \_EqualKey = equal\_to\<\_Value\>, class \_Alloc = allocator\<\_Value\>\>

class \_\_gnu\_cxx::hash\_set\< \_Value, \_HashFcn, \_EqualKey, \_Alloc \>"This is an SGI extension.

**Todo**

Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation\_style.html

## Author

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