STD::__DETAIL::_HASHTABLE_TRAITS(3cxx)
π NAME π
okay so bestie, gather round β this entire page is about one lil' struct and its whole personality:
std::__detail::_Hashtable_traits< _Cache_hash_code, _Constant_iterators, _Unique_keys >
It lives in the 3cxx section of the manual. That's the name, that's the vibe, that's it. π
β¨ SYNOPSIS β¨
Before you can even look at this thing you gotta pull in the header:
#include <hashtable_policy.h>
πΈ Public Types πΈ
Three typedefs. Three little bool-wrappers. All of them lowkey iconic:
__constant_iteratorsβ it's an alias for__bool_constant< _Constant_iterators >__hash_cachedβ it's an alias for__bool_constant< _Cache_hash_code >__unique_keysβ it's an alias for__bool_constant< _Unique_keys >
π Detailed Description π
Here's the template declaration, character for character, no edits from me:
template<bool _Cache_hash_code, bool _Constant_iterators, bool _Unique_keys>
and here's the struct:
struct std::__detail::_Hashtable_traits< _Cache_hash_code, _Constant_iterators, _Unique_keys >"struct _Hashtable_traits
(yeah, that trailing "struct _Hashtable_traits is literally how it appears on the page. We do not touch it. We do not "fix" it. We simply observe it and move on π)
The one-line summary: important traits for hash tables. That's the job description, and it ate. It's giving backstage-pass-to-the-unordered-containers energy ποΈ
π Template Parameters π
_Cache_hash_codeβ a Boolean value. True means the value of the hash function is stored right alongside the value. It's a time-space tradeoff, no cap. Storing it may improve lookup speed by cutting down how many times we need to call the_Hashor_Equalfunctors._Constant_iteratorsβ a Boolean value. True wheniteratorandconst_iteratorare both constant iterator types. That's the case forunordered_setandunordered_multiset, and it'sfalseforunordered_mapandunordered_multimap._Unique_keysβ a Boolean value. True if the return value of_Hashtable::count(k)is always at most one;falseif it may be an arbitrary number. That one's true forunordered_setandunordered_map, and false forunordered_multisetandunordered_multimap.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. So nobody hand-wrote this one β it's a robot's masterpiece and honestly? The robot slayed π€β¨
mwah, that's the whole page π It's a libstdc++ thing, filed under section 3cxx, spat out by Doxygen straight from the source. Go forth and be the main character of your own hashtable, bestie π«ΆπΈ
π¦ 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