STD::__DETAIL::_HASHTABLE_EBO_HELPER(3cxx)
π NAME π
std::__detail::_Hashtable_ebo_helper< _Nm, _Tp, __use_ebo > β bestie, this is the lil helper struct that squeezes your empty types into zero extra bytes. it's giving β¨optimizationβ¨, no cap.
πΈ SYNOPSIS πΈ
okay so it gets inherited by all of these, and every single one of them is a [private] inheritance, so this is strictly an internal-squad situation π«Ά:
std::__detail::_Hashtable_alloc< __alloc_rebind< _Alloc, __detail::_Hash_node< _Value, _Traits::__hash_cached::value > > >[private]std::__detail::_Hashtable_alloc< __alloc_rebind< _Hash, __detail::_Hash_node< _Tp, _Traits::__hash_cached::value > > >[private]std::__detail::_Hashtable_alloc< __alloc_rebind< hash< _Key >, __detail::_Hash_node< _Tp, _Traits::__hash_cached::value > > >[private]std::__detail::_Hashtable_alloc< __alloc_rebind< equal_to< _Value >, __detail::_Hash_node< hash< _Value >, _Traits::__hash_cached::value > > >[private]std::__detail::_Hashtable_base< _Key, _Tp, _Pred, allocator< std::pair< const _Key, _Tp > >, _H1, _H2, _Hash, _Traits >[private]std::__detail::_Hashtable_base< _Key, _Tp, equal_to< _Key >, allocator< std::pair< const _Key, _Tp > >, _H1, _H2, _Hash, _Traits >[private]
π¦ Detailed Description π¦
here's the whole vibe, template and all:
template<int _Nm, typename _Tp, bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)>
struct std::__detail::_Hashtable_ebo_helper< _Nm, _Tp, __use_ebo >
Primary class template _Hashtable_ebo_helper.
the tea β: it's a helper class that uses EBO (Empty Base Optimization, iykyk) when it is not forbidden β like, the type isn't final β and when it is worth it β meaning the type is empty. π
so basically: not final && empty = free real estate, and it takes it. iconic behaviour honestly π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. bestie did not hand-write this, the robot did π€β¨
aaaand that's the whole page! π this lil writeup lives in the libstdc++ manual, section 3cxx β mwah, go read the actual headers if you wanna see it in the wild π¦πΈπ
π¦ where this page comes from
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms