__GNU_PBDS::BASIC_HASH_TABLE(3cxx)

okay bestie, this is the __gnu_pbds::basic_hash_table page from the libstdc++ 3cxx manual πŸ’– buckle up, it’s template-heavy but we’re gonna slay it.

πŸ’– NAME πŸ’–

__gnu_pbds::basic_hash_table< Key, Mapped, Hash_Fn, Eq_Fn,
       Resize_Policy, Store_Hash, Tag, Policy_Tl, _Alloc >

✨ SYNOPSIS ✨

First thing bestie, you gotta include this:

#include <assoc_container.hpp>

It inherits detail::container_base_dispatch::type. No cap.

It’s also inherited by __gnu_pbds::cc_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Hash_Fn, Resize_Policy, Store_Hash, _Alloc >, and __gnu_pbds::gp_hash_table< Key, Mapped, Hash_Fn, Eq_Fn, Comb_Probe_Fn, Probe_Fn, Resize_Policy, Store_Hash, _Alloc >. Iconic family tree tbh 🌈.

πŸ› οΈ Protected Member Functions πŸ› οΈ

These are the protected constructor vibes, all of them, exactly as written:

basic_hash_table (const basic_hash_table &other)
template<typename T0 > basic_hash_table (T0 t0)
template<typename T0 , typename T1 > basic_hash_table (T0 t0, T1 t1)
template<typename T0 , typename T1 , typename T2 > basic_hash_table (T0
    t0, T1 t1, T2 t2)
template<typename T0 , typename T1 , typename T2 , typename T3 >
    basic_hash_table (T0 t0, T1 t1, T2 t2, T3 t3)
template<typename T0 , typename T1 , typename T2 , typename T3 ,
    typename T4 > basic_hash_table (T0 t0, T1 t1, T2 t2, T3 t3, T4 t4)
template<typename T0 , typename T1 , typename T2 , typename T3 ,
    typename T4 , typename T5 > basic_hash_table (T0 t0, T1 t1, T2 t2,
    T3 t3, T4 t4, T5 t5)
template<typename T0 , typename T1 , typename T2 , typename T3 ,
    typename T4 , typename T5 , typename T6 > basic_hash_table (T0 t0,
    T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
template<typename T0 , typename T1 , typename T2 , typename T3 ,
    typename T4 , typename T5 , typename T6 , typename T7 >
    basic_hash_table (T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6,
    T7 t7)
template<typename T0 , typename T1 , typename T2 , typename T3 ,
    typename T4 , typename T5 , typename T6 , typename T7 , typename T8
    > basic_hash_table (T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6,
    T7 t7, T8 t8)

πŸ¦‹ Detailed Description πŸ¦‹

template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn,
    typename Resize_Policy, bool Store_Hash, typename Tag, typename
    Policy_Tl, typename _Alloc>
class __gnu_pbds::basic_hash_table< Key, Mapped, Hash_Fn, Eq_Fn,
    Resize_Policy, Store_Hash, Tag, Policy_Tl, _Alloc >

Literally described as β€œA hashed container abstraction.” πŸ’…

🌸 Template Parameters 🌸

  • Key β€” Key type.
  • Mapped β€” Map type.
  • Hash_Fn β€” Hashing functor.
  • Eq_Fn β€” Equal functor.
  • Resize_Policy β€” Resizes hash.
  • Store_Hash β€” Indicates whether the hash value will be stored along with each key.
  • Tag β€” Instantiating data structure type, see container_tag.
  • Policy_TL β€” Policy typelist.
  • _Alloc β€” Allocator type.

Base is dispatched at compile time via Tag, from the following choices: cc_hash_tag, gp_hash_tag, and descendants of basic_hash_tag. Obsessed with this dispatch moment ✨.

Base choices are: detail::cc_ht_map, detail::gp_ht_map. Periodt.


πŸ’œ Author πŸ’œ

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


this page is from the libstdc++ 3cxx manual, and the source text literally says β€œGenerated automatically by Doxygen for libstdc++ from the source code.” No date on this one, bestie β€” but the vibes are immaculate πŸŽ€πŸ’œ