...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::hash_value — Provides hashing for variant
types so
that boost::hash
may compute hash.
// In header: <boost/variant/variant.hpp> template<typename T1, typename T2, ..., typename TN> std::size_t hash_value(const variant<T1, T2, ..., TN> & rhs);
Requires: |
Every bounded type of the variant must
fulfill the requirements of the
Hashable
concept. |
Effects: |
Calls boost::hash<T>()(x) , where x is
the content of rhs and T is its type. |
Notes: |
Actually, this function is defined in
<boost/variant/detail/hash_variant.hpp>
header. |