
15 Mar
2005
15 Mar
'05
10:56 p.m.
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.