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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@225403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,8 +29,9 @@ int main()
|
||||
{
|
||||
typedef std::vector<bool> T;
|
||||
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<H::argument_type, T>::value), "" );
|
||||
static_assert((std::is_same<H::result_type, std::size_t>::value), "" );
|
||||
|
||||
bool ba[] = {true, false, true, true, false};
|
||||
T vb(std::begin(ba), std::end(ba));
|
||||
H h;
|
||||
|
Reference in New Issue
Block a user