
13 Mar
2005
13 Mar
'05
12:03 p.m.
John Maddock wrote:
There is a forth option: treat the pointer as a "bag of bytes" and hash those bytes, that's completely portable, and no reinterpret_cast is required (it's probably overkill as well)
It's portable, but possibly inferior. The implementation may normalize pointers on reinterpret_cast so that two equal pointers that do not have the same byte representation reinterpret_cast to the same value.