boostorg / container_hash

Generic hash function for STL style unordered containers
https://boost.org/libs/container_hash
29 stars 39 forks source link

hash_value for std::nullptr_t is missing #29

Closed pdimov closed 1 year ago

pdimov commented 1 year ago

This is needed for

std::size_t boost::json::hash_value( value const& jv ) noexcept
{
    std::size_t seed = 0;

    boost::hash_combine( seed, jv.kind() == kind::int64? kind::uint64: jv.kind() );
    boost::json::visit( [&]( auto const& v ){ boost::hash_combine( seed, v ); }, jv );

    return seed;
}