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
This commit is contained in:
Marshall Clow
2015-01-07 21:53:23 +00:00
parent 601fa8d824
commit d95510ebba
11 changed files with 35 additions and 24 deletions

View File

@@ -29,8 +29,8 @@ void
test()
{
typedef std::hash<T> H;
static_assert((std::is_base_of<std::unary_function<T, std::size_t>,
H>::value), "");
static_assert((std::is_same<typename H::argument_type, T>::value), "" );
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
H h;
// std::string g1 = "1234567890";
// std::string g2 = "1234567891";