STD::__IS_FAST_HASH(3cxx)

✨ NAME ✨

std::__is_fast_hash< _Hash > β€” bestie, welcome to the 3cxx manual page for this libstdc++ trait πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <functional>

It inherits std::true_type. Periodt πŸ’…


πŸ’– Detailed Description πŸ’–

template<typename _Hash>
struct std::__is_fast_hash< _Hash >

Okay so this whole thing is a hint about performance of hash functions 🌸

If a given hash function object is not fast, the hash-based containers will cache the hash code. The default behavior is to consider that hashers are fast unless specified otherwise. No cap ✨

Users can specialize this for their own hash functions in order to force caching of hash codes in unordered containers. That’s the main-character move if you need it πŸ‘‘

⚠️ Specializing this trait affects the ABI of the unordered containers, so use it carefully. For real, be careful with this one 🫢

🌸 Author 🌸

Generated automatically by Doxygen for libstdc++ from the source code. The robots wrote this one, and they ate πŸ€–βœ¨


mwah πŸ’‹ β€” source/version: libstdc++; date: not listed in the footer, so I’m not inventing one, bestie πŸ˜­πŸŽ€

πŸ“¦ where this page comes from