---
name: "std::__debug::unordered_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/std::__debug::unordered_set"
---

# std::\_\_debug::unordered\_set(3)

Class std::unordered\_set with safety/checking/debug instrumentation.

## NAME

std::\_\_debug::unordered\_set\< \_Value, \_Hash, \_Pred, \_Alloc \> - Class std::unordered\_set with safety/checking/debug instrumentation.

## SYNOPSIS

\#include \<unordered\_set\>

Inherits **\_\_gnu\_debug::\_Safe\_container\< \_SafeContainer, \_Alloc, \_SafeBase, \_IsCxx11AllocatorAware \>**.

### Public Types

typedef \_Base::allocator\_type **allocator\_type**\
 typedef **\_\_gnu\_debug::\_Safe\_iterator**\< \_Base\_const\_iterator, unordered\_set \> **const\_iterator**\
 typedef **\_\_gnu\_debug::\_Safe\_local\_iterator**\< \_Base\_const\_local\_iterator, unordered\_set \> **const\_local\_iterator**\
 typedef \_Base::const\_pointer **const\_pointer**\
 typedef \_Base::const\_reference **const\_reference**\
 typedef \_Base::difference\_type **difference\_type**\
 typedef \_Base::hasher **hasher**\
 typedef **\_\_gnu\_debug::\_Safe\_iterator**\< \_Base\_iterator, unordered\_set \> **iterator**\
 typedef \_Base::key\_equal **key\_equal**\
 typedef \_Base::key\_type **key\_type**\
 typedef **\_\_gnu\_debug::\_Safe\_local\_iterator**\< \_Base\_local\_iterator, unordered\_set \> **local\_iterator**\
 typedef \_Base::pointer **pointer**\
 typedef \_Base::reference **reference**\
 typedef \_Base::size\_type **size\_type**\
 typedef \_Base::value\_type **value\_type**\

### Public Member Functions

**unordered\_set** (\_Base\_ref \_\_x)\
 template\<typename \_InputIterator\> **unordered\_set** (\_InputIterator \_\_first, \_InputIterator \_\_last, const allocator\_type &\_\_a)\
 template\<typename \_InputIterator\> **unordered\_set** (\_InputIterator \_\_first, \_InputIterator \_\_last, size\_type \_\_n, const allocator\_type &\_\_a)\
 template\<typename \_InputIterator\> **unordered\_set** (\_InputIterator \_\_first, \_InputIterator \_\_last, size\_type \_\_n, const hasher &\_\_hf, const allocator\_type &\_\_a)\
 template\<typename \_InputIterator\> **unordered\_set** (\_InputIterator \_\_first, \_InputIterator \_\_last, size\_type \_\_n=0, const hasher &\_\_hf=hasher(), const key\_equal &\_\_eql=key\_equal(), const allocator\_type &\_\_a=allocator\_type())\
 **unordered\_set** (const allocator\_type &\_\_a)\
 **unordered\_set** (const unordered\_set &)=default\
 **unordered\_set** (const unordered\_set &\_\_uset, const allocator\_type &\_\_a)\
 **unordered\_set** (**initializer\_list**\< value\_type \> \_\_l, const allocator\_type &\_\_a)\
 **unordered\_set** (**initializer\_list**\< value\_type \> \_\_l, size\_type \_\_n, const allocator\_type &\_\_a)\
 **unordered\_set** (**initializer\_list**\< value\_type \> \_\_l, size\_type \_\_n, const hasher &\_\_hf, const allocator\_type &\_\_a)\
 **unordered\_set** (**initializer\_list**\< value\_type \> \_\_l, size\_type \_\_n=0, const hasher &\_\_hf=hasher(), const key\_equal &\_\_eql=key\_equal(), const allocator\_type &\_\_a=allocator\_type())\
 **unordered\_set** (size\_type \_\_n, const allocator\_type &\_\_a)\
 **unordered\_set** (size\_type \_\_n, const hasher &\_\_hf, const allocator\_type &\_\_a)\
 **unordered\_set** (size\_type \_\_n, const hasher &\_\_hf=hasher(), const key\_equal &\_\_eql=key\_equal(), const allocator\_type &\_\_a=allocator\_type())\
 **unordered\_set** (unordered\_set &&)=default\
 **unordered\_set** (unordered\_set &&\_\_uset, const allocator\_type &\_\_a) noexcept(noexcept(\_Base(**std::move**(\_\_uset), \_\_a)))\
 const \_Base & **\_M\_base** () const noexcept\
 \_Base & **\_M\_base** () noexcept\
 const\_iterator **begin** () const noexcept\
 iterator **begin** () noexcept\
 local\_iterator **begin** (size\_type \_\_b)\
 const\_local\_iterator **begin** (size\_type \_\_b) const\
 size\_type **bucket\_size** (size\_type \_\_b) const\
 const\_iterator **cbegin** () const noexcept\
 const\_local\_iterator **cbegin** (size\_type \_\_b) const\
 const\_iterator **cend** () const noexcept\
 const\_local\_iterator **cend** (size\_type \_\_b) const\
 void **clear** () noexcept\
 template\<typename... \_Args\> **std::pair**\< iterator, bool \> **emplace** (\_Args &&... \_\_args)\
 template\<typename... \_Args\> iterator **emplace\_hint** (const\_iterator \_\_hint, \_Args &&... \_\_args)\
 const\_iterator **end** () const noexcept\
 iterator **end** () noexcept\
 local\_iterator **end** (size\_type \_\_b)\
 const\_local\_iterator **end** (size\_type \_\_b) const\
 **std::pair**\< iterator, iterator \> **equal\_range** (const key\_type &\_\_key)\
 **std::pair**\< const\_iterator, const\_iterator \> **equal\_range** (const key\_type &\_\_key) const\
 \_Base\_iterator **erase** (\_Base\_const\_iterator \_\_it)\
 template\<\_\_heterogeneous\_hash\_key\< unordered\_set \> \_Kt\> size\_type **erase** (\_Kt &&\_\_key)\
 size\_type **erase** (const key\_type &\_\_key)\
 iterator **erase** (const\_iterator \_\_first, const\_iterator \_\_last)\
 iterator **erase** (const\_iterator \_\_it)\
 iterator **erase** (iterator \_\_it)\
 iterator **find** (const key\_type &\_\_key)\
 const\_iterator **find** (const key\_type &\_\_key) const\
 template\<typename \_InputIterator\> void **insert** (\_InputIterator \_\_first, \_InputIterator \_\_last)\
 template\<\_\_heterogeneous\_hash\_key\< unordered\_set \> \_Kt\> **std::pair**\< iterator, bool \> **insert** (\_Kt &&\_\_obj)\
 **std::pair**\< iterator, bool \> **insert** (const value\_type &\_\_obj)\
 template\<\_\_heterogeneous\_hash\_key\< unordered\_set \> \_Kt\> iterator **insert** (const\_iterator \_\_hint, \_Kt &&\_\_obj)\
 iterator **insert** (const\_iterator \_\_hint, const value\_type &\_\_obj)\
 iterator **insert** (const\_iterator \_\_hint, value\_type &&\_\_obj)\
 void **insert** (**std::initializer\_list**\< value\_type \> \_\_l)\
 **std::pair**\< iterator, bool \> **insert** (value\_type &&\_\_obj)\
 float **max\_load\_factor** () const noexcept\
 void **max\_load\_factor** (float \_\_f)\
 unordered\_set & **operator=** (const unordered\_set &)=default\
 unordered\_set & **operator=** (**initializer\_list**\< value\_type \> \_\_l)\
 unordered\_set & **operator=** (unordered\_set &&)=default\
 void **swap** (unordered\_set &\_\_x) noexcept(noexcept(**declval**\< \_Base & \>().swap(\_\_x)))\

### Protected Member Functions

constexpr void **\_M\_swap** (const \_Safe\_container &\_\_x) const noexcept\

### Friends

template\<typename \_ItT, typename \_SeqT, typename \_CatT\> class **::\_\_gnu\_debug::\_Safe\_iterator**\
 template\<typename \_ItT, typename \_SeqT\> class **::\_\_gnu\_debug::\_Safe\_local\_iterator**\

## Detailed Description

### template\<typename \_Value, typename \_Hash = std::hash\<\_Value\>, typename \_Pred = std::equal\_to\<\_Value\>, typename \_Alloc = std::allocator\<\_Value\>\>

class std::\_\_debug::unordered\_set\< \_Value, \_Hash, \_Pred, \_Alloc \>"Class std::unordered\_set with safety/checking/debug instrumentation.

## Author

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