diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2017-03-23 06:20:18 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2017-03-23 06:20:18 +0000 |
| commit | d8323168530aaea57926c6031283d43b2dbf9858 (patch) | |
| tree | 4656ab469f053f66ce4eb2b084cd599814a3db20 /libcxx/test/std | |
| parent | 490889c405b5c6ba59a43f43d4cf89f5176e2109 (diff) | |
| download | bcm5719-llvm-d8323168530aaea57926c6031283d43b2dbf9858.tar.gz bcm5719-llvm-d8323168530aaea57926c6031283d43b2dbf9858.zip | |
Can't test for noexcept on C++03; std::hash<nullptr_t> isn't available until C++17
llvm-svn: 298580
Diffstat (limited to 'libcxx/test/std')
| -rw-r--r-- | libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp index d71514b52ef..36280a38e0a 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp @@ -41,13 +41,16 @@ test() assert(h(&i) != h(&j)); } +// can't hash nullptr_t until c++17 void test_nullptr() { +#if TEST_STD_VER > 14 typedef std::nullptr_t T; 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())); +#endif } int main() |

