Date: Mon, 2 Oct 2023 20:27:13 +0200
On 02/10/2023 19:45, Aaron Gray via Std-Discussion wrote:
> size_t hash = 0;
> hash ^= key.first ? std::hash<string>()( key.first->name ) :
> std::hash<void *>()( nullptr );
> hash ^= key.second ? std::hash<string>()( key.second->name ) :
> std::hash<void *>()( nullptr );
> return hash;
Please don't do this; Use Boost.HashCombine or one of the techniques
described by the newer hashing proposals.
My 2 c,
> size_t hash = 0;
> hash ^= key.first ? std::hash<string>()( key.first->name ) :
> std::hash<void *>()( nullptr );
> hash ^= key.second ? std::hash<string>()( key.second->name ) :
> std::hash<void *>()( nullptr );
> return hash;
Please don't do this; Use Boost.HashCombine or one of the techniques
described by the newer hashing proposals.
My 2 c,
-- Giuseppe D'Angelo
Received on 2023-10-02 18:27:16