STD::__DETAIL::_HASHTABLE_BASE(3cxx)

πŸ’– std::__detail::_Hashtable_base< _Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits > πŸ’–

okay bestie, welcome to the <hashtable_policy.h> corner of libstdc++ β€” this is a C++ manual page, section 3cxx, and the header line up top literally reads std::__detail:...Hash, _Traits >(3cxx) because the name is so long the terminal had to start abbreviating it. iconic behavior honestly. 🫢


✨ SYNOPSIS ✨

#include <hashtable_policy.h>

Inherits std::__detail::_Hash_code_base< _Key, _Value, _ExtractKey, _H1, _H2, _Hash, _Traits::__hash_cached::value >, and std::__detail::_Hashtable_ebo_helper< 0, _Equal >.

Inherited by std::_Hashtable< _Key, _Tp, _Hash, _Pred, allocator< std::pair< const _Key, _Tp > > >, std::_Hashtable< _Key, _Tp, hash< _Key >, equal_to< _Key >, allocator< std::pair< const _Key, _Tp > > >, std::_Hashtable< _Value, hash< _Value >, equal_to< _Value >, allocator< _Value > >, and std::_Hashtable< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits >.

not one, not two, but four _Hashtable flavors are vibing downstream of this thing. it's giving family tree energy. 🌳

πŸŽ€ Public Types πŸŽ€

the whole squad of typedefs, no cap:

  • using __constant_iterators = typename __traits_type::__constant_iterators
  • using __hash_cached = typename __traits_type::__hash_cached
  • using __hash_code = typename __hash_code_base::__hash_code
  • using __hash_code_base = _Hash_code_base< _Key, _Value, _ExtractKey, _H1, _H2, _Hash, __hash_cached::value >
  • using __ireturn_type = typename std::conditional< __unique_keys::value, std::pair< iterator, bool >, iterator >::type
  • using __node_type = typename __hash_code_base::__node_type
  • using __traits_type = _Traits
  • using __unique_keys = typename __traits_type::__unique_keys
  • using const_iterator = __detail::_Node_const_iterator< value_type, __constant_iterators::value, __hash_cached::value >
  • using const_local_iterator = __detail::_Local_const_iterator< key_type, value_type, _ExtractKey, _H1, _H2, _Hash, __constant_iterators::value, __hash_cached::value >
  • typedef std::ptrdiff_t difference_type
  • using iterator = __detail::_Node_iterator< value_type, __constant_iterators::value, __hash_cached::value >
  • typedef _Equal key_equal
  • typedef _Key key_type
  • using local_iterator = __detail::_Local_iterator< key_type, value_type, _ExtractKey, _H1, _H2, _Hash, __constant_iterators::value, __hash_cached::value >
  • typedef std::size_t size_type
  • typedef _Value value_type
seventeen entries. she ate and left no crumbs. πŸ’…

πŸ”’ Protected Member Functions πŸ”’

these ones are protected, so like… only the inner circle gets access. respect the boundaries babes. πŸ™ˆ

  • _Hashtable_base (const _ExtractKey &__ex, const _H1 &__h1, const _H2 &__h2, const _Hash &__hash, const _Equal &__eq)
  • const _Equal & _M_eq () const
  • bool _M_equals (const _Key &__k, __hash_code __c, __node_type *__n) const
  • void _M_swap (_Hashtable_base &__x)

🌈 Detailed Description 🌈

template<typename _Key, typename _Value, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _Traits>
struct std::__detail::_Hashtable_base< _Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits >

Primary class template _Hashtable_base.

Helper class adding management of _Equal functor to _Hash_code_base type.

Base class templates are:

  • __detail::_Hash_code_base
  • __detail::_Hashtable_ebo_helper
lowkey this is the glow-up arc: _Hash_code_base shows up with the hashing, and _Hashtable_base is like "bestie let me handle the _Equal functor for you" and suddenly there's equality checking in the mix. main character energy, fr fr. πŸ‘‘

✍️ Author ✍️

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


and that's the whole page, bestie β€” this lil doc dropped out of libstdc++, auto-generated by Doxygen straight from the source code, and the footer down at the bottom is a truly cursed libstdstd::__detail:...Hash, _Traits >(3cxx) situation (the name overflowed into the footer too, it's a whole mess, we love it anyway 🩷). go forth and hash responsibly. mwah. πŸ’‹

πŸ“¦ where this page comes from