Implement P0599: 'noexcept for hash functions'. Fix a couple of hash functions (optional<T> and unique_ptr<T>) which were mistakenly marked as 'noexcept'. Reviewed as https://reviews.llvm.org/D31234

llvm-svn: 298573
diff --git a/libcxx/test/std/strings/basic.string.hash/strings.pass.cpp b/libcxx/test/std/strings/basic.string.hash/strings.pass.cpp
index 5fc32c0..d74e4857 100644
--- a/libcxx/test/std/strings/basic.string.hash/strings.pass.cpp
+++ b/libcxx/test/std/strings/basic.string.hash/strings.pass.cpp
@@ -22,6 +22,8 @@
 #include <cassert>
 #include <type_traits>
 
+#include "test_macros.h"
+
 template <class T>
 void
 test()
@@ -29,6 +31,8 @@
     typedef std::hash<T> H;
     static_assert((std::is_same<typename H::argument_type, T>::value), "" );
     static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
+    ASSERT_NOEXCEPT(H()(T()));
+
     H h;
     std::string g1 = "1234567890";
     std::string g2 = "1234567891";