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/utilities/function.objects/unord.hash/integral.pass.cpp | |
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/utilities/function.objects/unord.hash/integral.pass.cpp')
-rw-r--r-- | libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp index 08a2a8c71f2..ce87f5918b2 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp @@ -31,6 +31,7 @@ test() 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; for (int i = 0; i <= 5; ++i) @@ -64,42 +65,42 @@ int main() test<long long>(); test<unsigned long long>(); -// LWG #2119 +// LWG #2119 test<std::ptrdiff_t>(); test<size_t>(); - test<int8_t>(); - test<int16_t>(); - test<int32_t>(); - test<int64_t>(); + test<int8_t>(); + test<int16_t>(); + test<int32_t>(); + test<int64_t>(); - test<int_fast8_t>(); - test<int_fast16_t>(); - test<int_fast32_t>(); - test<int_fast64_t>(); + test<int_fast8_t>(); + test<int_fast16_t>(); + test<int_fast32_t>(); + test<int_fast64_t>(); - test<int_least8_t>(); - test<int_least16_t>(); - test<int_least32_t>(); - test<int_least64_t>(); + test<int_least8_t>(); + test<int_least16_t>(); + test<int_least32_t>(); + test<int_least64_t>(); test<intmax_t>(); test<intptr_t>(); - test<uint8_t>(); - test<uint16_t>(); - test<uint32_t>(); - test<uint64_t>(); + test<uint8_t>(); + test<uint16_t>(); + test<uint32_t>(); + test<uint64_t>(); - test<uint_fast8_t>(); - test<uint_fast16_t>(); - test<uint_fast32_t>(); - test<uint_fast64_t>(); + test<uint_fast8_t>(); + test<uint_fast16_t>(); + test<uint_fast32_t>(); + test<uint_fast64_t>(); - test<uint_least8_t>(); - test<uint_least16_t>(); - test<uint_least32_t>(); - test<uint_least64_t>(); + test<uint_least8_t>(); + test<uint_least16_t>(); + test<uint_least32_t>(); + test<uint_least64_t>(); test<uintmax_t>(); test<uintptr_t>(); |