STD::__DETAIL::_REHASH_BASE(3cxx)

πŸ’– NAME πŸ’–

okay so bestie, gather round β€” this is std::__detail::_Rehash_base< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, typename >, and yes the manual it lives in is the 3cxx one, iykyk πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

the way this thing gets *inherited*… it's giving main character energy, fr fr. it's 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 >

like. four whole hashtables. she's popular, no cap πŸ’…


✨ Detailed Description ✨

template<typename _Key, typename _Value, typename _Alloc, typename
    _ExtractKey, typename _Equal, typename _H1, typename _H2, typename
    _Hash, typename _RehashPolicy, typename _Traits, typename =
    __detected_or_t<false_type, __has_load_factor, _RehashPolicy>>
    struct std::__detail::_Rehash_base< _Key, _Value, _Alloc, _ExtractKey,
    _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, typename >

okay so this is the "Primary class template _Rehash_base." 🌈

and what does she do?? literally this: give the hashtable the max_load_factor functions and reserve iff the rehash policy supports it. that's it. that's the whole job. if the policy says no, she says no too β€” a queen with boundaries 🫢

bestie note: that last template parameter defaults to __detected_or_t<false_type, __has_load_factor, _RehashPolicy>, which is the whole "do you support this or not" vibe check right there. the iff is doing heavy lifting, don't sleep on it πŸ’€

πŸ‘‘ Author πŸ‘‘

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


so yeah, that's the whole page!! she's short but she's iconic πŸŽ€ this beauty came to you courtesy of libstdc++ (the Doxygen-generated source-code glow-up, generated automatically), living in the 3cxx manual β€” mwah, bye bestie, go read some headers πŸ’œβœ¨

πŸ“¦ where this page comes from