Files
cppdraft_translate/cppdraft/variant/hash.md
2025-10-25 03:02:53 +03:00

961 B

[variant.hash]

22 General utilities library [utilities]

22.6 Variants [variant]

22.6.12 Hash support [variant.hash]

🔗

template<class... Types> struct hash<variant<Types...>>;

1

#

The specialization hash<variant<Types...>> is enabled ([unord.hash]) if and only if every specialization in hash<remove_const_t>... is enabled.

The member functions are not guaranteed to be noexcept.

🔗

template<> struct hash<monostate>;

2

#

The specialization is enabled ([unord.hash]).