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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145778 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed