[#absl-HashOf] = xref:absl.adoc[absl]::HashOf :relfileprefix: ../ :mrdocs: Generate a hash from the values of its arguments. == Synopsis Declared in `<absl/hash/hash.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< int& ExplicitArgumentBarrier..., typename... Types> size_t HashOf(Types const&... values); ---- == Description absl::HashOf() is a helper that generates a hash from the values of its arguments. It dispatches to absl::Hash directly, as follows: * HashOf(t) == absl::Hash<T>{}(t) * HashOf(a, b, c) == HashOf(std::make_tuple(a, b, c)) HashOf(a1, a2, ...) == HashOf(b1, b2, ...) is guaranteed when * The argument lists have pairwise identical C++ types * a1 == b1 && a2 == b2 && ... The requirement that the arguments match in both type and value is critical. It means that `a == b` does not necessarily imply `HashOf(a) == HashOf(b)` if `a` and `b` have different types. For example, `HashOf(2) != HashOf(2.0)`. == Return Value The combined hash of the arguments. == Parameters [cols="1,4"] |=== | Name| Description | *values* | The values to hash together. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#