From d95510ebba10e0d3e2d0adf352dfa5cae87b0756 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Wed, 7 Jan 2015 21:53:23 +0000 Subject: libc++ implements its' hash objects as deriving from std::unary_function, and the tests test for that. STL @ MS pointed out that the standard doesn't requie these objects to derive from unary_function, and so the tests should not require that either. Change the tests to check for the embedded typedefs - which ARE required. No change to the library. llvm-svn: 225403 --- .../std/utilities/function.objects/unord.hash/floating.pass.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp') diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp index 988950d4dc9..f1f198f2359 100644 --- a/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp @@ -28,9 +28,11 @@ template void test() { - static_assert((std::is_base_of, - std::hash >::value), ""); - std::hash h; + typedef std::hash H; + static_assert((std::is_same::value), "" ); + static_assert((std::is_same::value), "" ); + H h; + std::size_t t0 = h(0.); std::size_t tn0 = h(-0.); std::size_t tp1 = h(0.1); -- cgit v1.2.3