[#std-hash-07] = xref:std.adoc[std]::hash<T> :relfileprefix: ../ :mrdocs: Hash support so strong types can be keys in unordered containers. == Synopsis Declared in `<folly/lang/Strong.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T> requires ( folly::is_strong<T> && // Required for `folly::is_hashable_v` to be correct. requires(typename T::underlying_type underlying) { { std::hash<typename T::underlying_type>{}(underlying) } ‐> std::convertible_to<std::size_t>; }) struct hash<T>; ---- == Description A strong type is hashable iff the underlying type is. == Member Functions [cols="1,4"] |=== | Name| Description | xref:std/hash-07/operator_call.adoc[`operator()`] | Hash a strong value by hashing its underlying value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#