---
name: "__gnu_pbds::detail::cc_ht_map"
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_pbds::detail::cc_ht_map"
---

# \_\_gnu\_pbds::detail::cc\_ht\_map(3)

## NAME

\_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>

## SYNOPSIS

\#include \<cc\_ht\_map\_.hpp\>

Inherits **\_\_gnu\_pbds::detail::hash\_eq\_fn\< Key, Eq\_Fn, \_Alloc, Store\_Hash \>**, , and **\_\_gnu\_pbds::detail::ranged\_hash\_fn\< Key, Hash\_Fn, \_Alloc, Comb\_Hash\_Fn, Store\_Hash \>**.

### Public Types

enum { **store\_hash** }\
 Value stores hash, true or false.  typedef \_Alloc **allocator\_type**\
 typedef Comb\_Hash\_Fn **comb\_hash\_fn**\
 typedef const\_iterator\_ **const\_iterator**\
 typedef traits\_base::const\_pointer **const\_pointer**\
 typedef traits\_base::const\_reference **const\_reference**\
 typedef \_Alloc::difference\_type **difference\_type**\
 typedef Eq\_Fn **eq\_fn**\
 typedef Hash\_Fn **hash\_fn**\
 typedef iterator\_ **iterator**\
 typedef traits\_base::key\_const\_pointer **key\_const\_pointer**\
 typedef traits\_base::key\_const\_reference **key\_const\_reference**\
 typedef traits\_base::key\_pointer **key\_pointer**\
 typedef traits\_base::key\_reference **key\_reference**\
 typedef traits\_base::key\_type **key\_type**\
 typedef traits\_base::mapped\_const\_pointer **mapped\_const\_pointer**\
 typedef traits\_base::mapped\_const\_reference **mapped\_const\_reference**\
 typedef traits\_base::mapped\_pointer **mapped\_pointer**\
 typedef traits\_base::mapped\_reference **mapped\_reference**\
 typedef traits\_base::mapped\_type **mapped\_type**\
 typedef \_\_nothrowcopy::indicator **no\_throw\_indicator**\
 typedef point\_const\_iterator\_ **point\_const\_iterator**\
 typedef point\_iterator\_ **point\_iterator**\
 typedef traits\_base::pointer **pointer**\
 typedef traits\_base::reference **reference**\
 typedef Resize\_Policy **resize\_policy**\
 typedef \_Alloc::size\_type **size\_type**\
 typedef integral\_constant\< int, Store\_Hash \> **store\_extra**\
 typedef **stored\_data**\< value\_type, size\_type, Store\_Hash \> **stored\_data\_type**\
 typedef traits\_base::value\_type **value\_type**\

### Public Member Functions

**cc\_ht\_map** (const cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \> &)\
 **cc\_ht\_map** (const Hash\_Fn &)\
 **cc\_ht\_map** (const Hash\_Fn &, const Eq\_Fn &)\
 **cc\_ht\_map** (const Hash\_Fn &, const Eq\_Fn &, const Comb\_Hash\_Fn &)\
 **cc\_ht\_map** (const Hash\_Fn &, const Eq\_Fn &, const Comb\_Hash\_Fn &, const Resize\_Policy &)\
 iterator **begin** ()\
 const\_iterator **begin** () const\
 void **clear** ()\
 template\<typename It\> void **copy\_from\_range** (It, It)\
 bool **empty** () const\
 True if size() == 0.  iterator **end** ()\
 const\_iterator **end** () const\
 bool **erase** (key\_const\_reference)\
 template\<typename Pred\> size\_type **erase\_if** (Pred)\
 point\_iterator **find** (key\_const\_reference)\
 point\_const\_iterator **find** (key\_const\_reference) const\
 point\_iterator **find\_end** ()\
 point\_const\_iterator **find\_end** () const\
 Comb\_Hash\_Fn & **get\_comb\_hash\_fn** ()\
 Return current comb\_hash\_fn.  const Comb\_Hash\_Fn & **get\_comb\_hash\_fn** () const\
 Return current const comb\_hash\_fn.  Eq\_Fn & **get\_eq\_fn** ()\
 Return current eq\_fn.  const Eq\_Fn & **get\_eq\_fn** () const\
 Return current const eq\_fn.  Hash\_Fn & **get\_hash\_fn** ()\
 Return current hash\_fn.  const Hash\_Fn & **get\_hash\_fn** () const\
 Return current const hash\_fn.  Resize\_Policy & **get\_resize\_policy** ()\
 Return current resize\_policy.  const Resize\_Policy & **get\_resize\_policy** () const\
 Return current const resize\_policy.  void **initialize** ()\
 **std::pair**\< point\_iterator, bool \> **insert** (const\_reference r\_val)\
 size\_type **max\_size** () const\
 mapped\_reference **operator\[\]** (key\_const\_reference r\_key)\
 size\_type **size** () const\
 void **swap** (cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \> &)\

### Public Attributes

no\_throw\_indicator **m\_no\_throw\_copies\_indicator**\
 store\_extra **m\_store\_extra\_indicator**\

### Friends

class **const\_iterator\_**\
 class **iterator\_**\

## Detailed Description

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\>

class \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>"A collision-chaining hash-based container.

**Template Parameters**

*Key* Key type.\
 *Mapped* Map type.\
 *Hash\_Fn* Hashing functor. Default is \_\_gnu\_cxx::hash.\
 *Eq\_Fn* Equal functor. Default std::equal\_to\<Key\>\
 *\_Alloc* Allocator type.\
 *Store\_Hash* If key type stores extra metadata. Defaults to false.\
 *Comb\_Hash\_Fn* Combining hash functor. If Hash\_Fn is not null\_type, then this is the ranged-hash functor; otherwise, this is the range-hashing functor. XXX(See Design::Hash-Based Containers::Hash Policies.) Default direct\_mask\_range\_hashing.\
 *Resize\_Policy* Resizes hash. Defaults to hash\_standard\_resize\_policy, using hash\_exponential\_size\_policy and hash\_load\_check\_resize\_trigger.

Bases are: detail::hash\_eq\_fn, Resize\_Policy, detail::ranged\_hash\_fn, detail::types\_traits. (Optional: detail::debug\_map\_base.)

## Member Enumeration Documentation

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> anonymous enum

Value stores hash, true or false.

## Member Function Documentation

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> bool \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::empty () const \[inline\], \[nodiscard\]

True if size() == 0.

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> Comb\_Hash\_Fn & \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::get\_comb\_hash\_fn ()

Return current comb\_hash\_fn.

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> const Comb\_Hash\_Fn & \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::get\_comb\_hash\_fn () const

Return current const comb\_hash\_fn.

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> Eq\_Fn & \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::get\_eq\_fn ()

Return current eq\_fn.

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> const Eq\_Fn & \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::get\_eq\_fn () const

Return current const eq\_fn.

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> Hash\_Fn & \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::get\_hash\_fn ()

Return current hash\_fn.

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> const Hash\_Fn & \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::get\_hash\_fn () const

Return current const hash\_fn.

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> Resize\_Policy & \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::get\_resize\_policy ()

Return current resize\_policy.

### template\<typename Key, typename Mapped, typename Hash\_Fn, typename Eq\_Fn, typename \_Alloc, bool Store\_Hash, typename Comb\_Hash\_Fn, typename Resize\_Policy\> const Resize\_Policy & \_\_gnu\_pbds::detail::cc\_ht\_map\< Key, Mapped, Hash\_Fn, Eq\_Fn, \_Alloc, Store\_Hash, Comb\_Hash\_Fn, Resize\_Policy \>::get\_resize\_policy () const

Return current const resize\_policy.

## Author

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