__GNU_PBDS::DETAIL::GP_HT_MAP(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 6 versions
, in arch rolling, fedora 44

πŸ’– __gnu_pbds::detail::gp_ht_map πŸ’–

okay bestie sit DOWN because this is a page straight outta the Library Functions Manual, and it's about the general-probing hash-based container from libstdc++'s pbds corner. yes it's a template, yes the parameter list is a whole paragraph, no we are not skipping any of it. grab a snack πŸ“


✨ NAME ✨

__gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc,
Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy >

that's the whole name. it's giving ✨maximalist✨ and honestly? iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gp_ht_map_.hpp>

Inherits __gnu_pbds::detail::hash_eq_fn< Key, Eq_Fn, _Alloc, Store_Hash >, , and __gnu_pbds::detail::ranged_probe_fn< Key, Hash_Fn, _Alloc, Comb_Probe_Fn, Probe_Fn, Store_Hash >.

yes that double comma in the middle is literally in the original. not me fixing it. periodt πŸ’…

πŸ‘‘ Public Types πŸ‘‘

  • enum { store_hash } β€” Value stores hash, true or false.
  • typedef _Alloc allocator_type
  • typedef Comb_Probe_Fn comb_probe_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 Probe_Fn probe_fn
  • 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 🌈

  • gp_ht_map (const gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy > &)
  • gp_ht_map (const Hash_Fn &)
  • gp_ht_map (const Hash_Fn &, const Eq_Fn &)
  • gp_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Probe_Fn &)
  • gp_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Probe_Fn &, const Probe_Fn &)
  • gp_ht_map (const Hash_Fn &, const Eq_Fn &, const Comb_Probe_Fn &, const Probe_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_Probe_Fn & get_comb_probe_fn () β€” Return current comb_probe_fn.
  • const Comb_Probe_Fn & get_comb_probe_fn () const β€” Return current const comb_probe_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.
  • Probe_Fn & get_probe_fn () β€” Return current probe_fn.
  • const Probe_Fn & get_probe_fn () const β€” Return current const probe_fn.
  • Resize_Policy & get_resize_policy () β€” Return current resize_policy.
  • const Resize_Policy & get_resize_policy () const β€” Return current const resize_policy.
  • 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 (gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc, Store_Hash, Comb_Probe_Fn, Probe_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_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
class __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn,
_Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy >

"A general-probing hash-based container."

that's the whole vibe. it's a hash map that goes probing around looking for a home for your key, and it's general about it. main character energy fr fr πŸ‘‘

🧚 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_Probe_Fn β€” Combining probe functor. If Hash_Fn is not null_type, then this is the ranged-probe functor; otherwise, this is the range-hashing functor. XXX See Design::Hash-Based Containers::Hash Policies. Default direct_mask_range_hashing.
  • Probe_Fn β€” Probe functor. Defaults to linear_probe_fn, also quadratic_probe_fn.
  • 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_probe_fn, detail::types_traits. (Optional: detail::debug_map_base.)

bestie if you're curious about that XXX note on Comb_Probe_Fn, it points you at the Design docs' Hash-Based Containers::Hash Policies section. go read it, iykyk πŸ’œ

πŸ’… Member Enumeration Documentation πŸ’…

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
anonymous enum

Value stores hash, true or false.


⭐ Member Function Documentation ⭐

empty () const

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
bool __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc,
    Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy >::empty () const
    [inline],  [nodiscard]

True if size() == 0.

get_comb_probe_fn ()

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
Comb_Probe_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn,
    _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn,
    Resize_Policy >::get_comb_probe_fn ()

Return current comb_probe_fn.

get_comb_probe_fn () const

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
const Comb_Probe_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn,
    Eq_Fn, _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn,
    Resize_Policy >::get_comb_probe_fn () const

Return current const comb_probe_fn.

get_eq_fn ()

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
Eq_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc,
    Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_eq_fn ()

Return current eq_fn.

get_eq_fn () const

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
const Eq_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn,
    _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn,
    Resize_Policy >::get_eq_fn () const

Return current const eq_fn.

get_hash_fn ()

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
Hash_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc,
    Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_hash_fn ()

Return current hash_fn.

get_hash_fn () const

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
const Hash_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn,
    _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn,
    Resize_Policy >::get_hash_fn () const

Return current const hash_fn.

get_probe_fn ()

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
Probe_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn, _Alloc,
    Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy >::get_probe_fn ()

Return current probe_fn.

get_probe_fn () const

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
const Probe_Fn & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn,
    _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn,
    Resize_Policy >::get_probe_fn () const

Return current const probe_fn.

get_resize_policy ()

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
Resize_Policy & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn, Eq_Fn,
    _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn,
    Resize_Policy >::get_resize_policy ()

Return current resize_policy.

get_resize_policy () const

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename _Alloc, bool Store_Hash, typename Comb_Probe_Fn, typename
    Probe_Fn, typename Resize_Policy>
const Resize_Policy & __gnu_pbds::detail::gp_ht_map< Key, Mapped, Hash_Fn,
    Eq_Fn, _Alloc, Store_Hash, Comb_Probe_Fn, Probe_Fn,
    Resize_Policy >::get_resize_policy () const

Return current const resize_policy.


πŸ“ Author πŸ“

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


and that's the whole page bestie πŸ’– this one lives in the Library Functions Manual, it ships with libstdc++, and the date slot down in the footer is literally just the word libstdc++ again β€” the classic. every getter, every typedef, every template param accounted for. no cap. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms