Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-15 17:56:31


Daniel James wrote:
> Dave Harris wrote:
>
>> When I wrote it seemed there were still unresolved issues. In fact, I
>> don't believe anyone has yet posted an acceptable hash_value for
>> pointers. Presumably we want to shift out bits which are always 0
>> for alignment reasons.
>
> I'm glad that I'm not the only person who's worried about alignment.
> But this is a problems for a cross-platform library. Either I'll have to
> introduce a load of macros to tweak it on various platforms (I'll need
> help there) or just accept it.

Alignment is only going to be a problem if the lower sizeof(size_t) *
CHAR_BIT bits of the value produced by reinterpret_cast do not contain
enough entropy. I think that in practice the hash function will be good
enough.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk