std::__detail::_Mod_range_hashing(3cxx)
πΈ std::__detail::_Mod_range_hashing β a 3cxx girlypop moment πΈ
okay bestie, welcome to the libstdc++ section 3cxx manual, and today's main character is std::__detail::_Mod_range_hashing π
β¨ NAME β¨
std::__detail::_Mod_range_hashing β the default range hashing function, bestie. it literally just uses division to fold a big ol' number down into the range [0, N). that's it. that's the whole job. and it ate. π
π¦ SYNOPSIS π¦
#include <hashtable_policy.h>
π Public Types
typedef std::size_t first_argument_typeβ the type of the first thing you hand it, and yes it's astd::size_t, no surprises here π«Άtypedef std::size_t result_typeβ what comes back out. alsostd::size_t. consistent queen. πtypedef std::size_t second_argument_typeβ the second thing you hand it. you guessed it:std::size_t. π
π Public Member Functions
result_type operator() (first_argument_type __num, second_argument_type __den) const noexceptβ the moment we've all been waiting for. it takes__numand__den, and it'sconst noexcept, so no drama, no exceptions, just vibes. β¨
π§ Detailed Description π§
Default range hashing function: use division to fold a large number into the range [0, N).
no cap, that's the whole personality. it takes a big number, does a division situation, and drops it neatly inside [0, N). iconic behavior honestly. π₯
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
(not me getting my whole identity auto-generated by Doxygen π she's a bot but she's serving fr fr)
lowkey important:_Mod_range_hashingis in the__detailnamespace, which means it's an implementation detail oflibstdc++β iykyk, you probably shouldn't be out here calling it by name in your own code. π
and that's the tea, bestie β this page lives in the libstdc++ docs, 3cxx section, footer reading libststd::__detail::_Mod_range_hashing(3cxx), and there's no date on it so I'm not inventing one, periodt. stay hydrated, go touch grass, and may your hashes always land in range. πβ¨π¦πΈπ
π¦ 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