diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-03-23 02:40:28 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-03-23 02:40:28 +0000 |
commit | 7c803385a75cf59c1730e8bdcf295c5a47ce36f2 (patch) | |
tree | a0da2795868760116fffd74d409655c50fe9ce88 /libcxx/test/std/thread | |
parent | 6974dd6412cd9cbb0849cc77b7381ad3b2a97fff (diff) | |
download | bcm5719-llvm-7c803385a75cf59c1730e8bdcf295c5a47ce36f2.tar.gz bcm5719-llvm-7c803385a75cf59c1730e8bdcf295c5a47ce36f2.zip |
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
Diffstat (limited to 'libcxx/test/std/thread')
-rw-r--r-- | libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp index f7d4deb8f98..4f1491decd3 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/thread_id.pass.cpp @@ -23,6 +23,8 @@ #include <thread> #include <cassert> +#include "test_macros.h" + int main() { std::thread::id id1; @@ -30,6 +32,7 @@ int main() typedef std::hash<std::thread::id> H; static_assert((std::is_same<typename H::argument_type, std::thread::id>::value), "" ); static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" ); + ASSERT_NOEXCEPT(H()(id2)); H h; assert(h(id1) != h(id2)); } |