Skip to content
Commit 9b0cd149 authored by Howard Hinnant's avatar Howard Hinnant
Browse files

Version #next on the hash functions for scalars. This builds on Dave's work,...

Version #next on the hash functions for scalars.  This builds on Dave's work, extends it to T*, and changes the way double and long double are handled (no longer convert to float on 32 bit).  I also picked up a minor bug with uninitialized bits on the upper end of size_t when sizeof(size_t) > sizeof(T), e.g. in hash<float>.  Most of the functionality has been put in one place:  __scalar_hash in <memory>.  Unfortunately I could not reuse __scalar_hash for hash<long double> on x86 because of the padding bits which need to be zeroed.  I didn't want to add this zeroing step to the more general __scalar_hash when it isn't needed (in the absence of padding bits).  I'm not ignoring the hash<string> issue (possibly changing that to a better hash).  I just haven't gotten there yet.

llvm-svn: 145778
parent 1075acaf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment