Starting using murmur2 when combining multiple size_t's into a single hash, and also for basic_string.  Also made hash<thread::id> ever so slighly more portable.  I had to tweak one test which is questionable (definitely not portable) anyway.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145795 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/thread b/include/thread
index 2e82846..23b1915 100644
--- a/include/thread
+++ b/include/thread
@@ -183,6 +183,9 @@
 
 }  // this_thread
 
+class _LIBCPP_VISIBLE __thread_id;
+template<> struct _LIBCPP_VISIBLE hash<__thread_id>;
+
 class _LIBCPP_VISIBLE __thread_id
 {
     // FIXME: pthread_t is a pointer on Darwin but a long on Linux.
@@ -226,10 +229,9 @@
 
     friend __thread_id this_thread::get_id();
     friend class _LIBCPP_VISIBLE thread;
+    friend struct _LIBCPP_VISIBLE hash<__thread_id>;
 };
 
-template<class _Tp> struct hash;
-
 template<>
 struct _LIBCPP_VISIBLE hash<__thread_id>
     : public unary_function<__thread_id, size_t>
@@ -237,8 +239,7 @@
     _LIBCPP_INLINE_VISIBILITY
     size_t operator()(__thread_id __v) const
     {
-        const size_t* const __p = reinterpret_cast<const size_t*>(&__v);
-        return *__p;
+        return hash<pthread_t>()(__v.__id_);
     }
 };