|
Boost : |
Subject: Re: [boost] [interprocess] boost::hash - different values for thesame input?
From: Daniel James (dnljms_at_[hidden])
Date: 2016-01-14 15:59:06
On 14 January 2016 at 04:54, Peter Dimov <lists_at_[hidden]> wrote:
> Daniel James wrote:
>
>> The reason why I originally wrote that note was because it can generate
>> different hash values when compiled for different
>
> platforms or architectures, e.g. a 32-bit executable might generate a
> different hash value to a 64-bit executable.
>
> Is this just because of pointers and floats, or are there other reasons?
> size_t hashing to different values perhaps?
Anything with a bigger range than size_t will have to, e.g. int64_t
will hash differently on 32 and 64 bit machines. Also, user hash
functions could be anything.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk