#define TEST_HASH_H
#include <cstddef>
-#include <type_traits>
+#include <utility>
-template <class C>
+template <class T>
class test_hash
- : private C
{
int data_;
public:
explicit test_hash(int data = 0) : data_(data) {}
- std::size_t
- operator()(typename std::add_lvalue_reference<const typename C::argument_type>::type x) const
- {return C::operator()(x);}
+ std::size_t operator()(const T& x) const
+ {return std::hash<T>()(x);}
bool operator==(const test_hash& c) const
{return data_ == c.data_;}
int main(int, char**)
{
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
}
#if TEST_STD_VER >= 11
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
{
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10));
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(min_allocator<std::pair<const NotConstructible, NotConstructible> >{});
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
typedef explicit_allocator<std::pair<const NotConstructible, NotConstructible>> A;
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
A
> C;
C c(A{});
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == A{});
assert(c.size() == 0);
{
typedef NotConstructible T;
typedef test_allocator<std::pair<const T, T>> A;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef std::unordered_map<T, T, HF, Comp, A> C;
{
typedef NotConstructible T;
typedef test_allocator<std::pair<const T, T>> A;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef std::unordered_map<T, T, HF, Comp, A> C;
{
typedef test_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(4));
assert(!c.empty());
{
typedef other_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef min_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
typedef std::allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
{
typedef min_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
{
typedef test_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(4));
assert(!c.empty());
{
typedef test_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef other_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef min_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(10)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
other_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
other_allocator<std::pair<const int, std::string> >(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(other_allocator<std::pair<const int, std::string> >(-2)));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(5)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
typedef explicit_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A{});
assert(!c.empty());
{
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
typedef explicit_allocator<std::pair<const NotConstructible, NotConstructible>> A;
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
A
> C;
{
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == A());
assert(c.size() == 0);
A a;
C c(a);
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == a);
assert(c.size() == 0);
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
- typedef test_hash<std::hash<int>> HF;
+ typedef test_hash<int> HF;
typedef test_equal_to<int> Comp;
typedef std::unordered_map<int, std::string, HF, Comp, A> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == a);
assert(!c.empty());
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
- typedef test_hash<std::hash<int>> HF;
+ typedef test_hash<int> HF;
typedef test_equal_to<int> Comp;
typedef std::unordered_map<int, std::string, HF, Comp, A> C;
assert(c.at(3) == "three");
assert(c.at(4) == "four");
assert(c.hash_function() == hf);
- assert(!(c.hash_function() == test_hash<std::hash<int> >()));
+ assert(!(c.hash_function() == test_hash<int>()));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == a);
assert(!c.empty());
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(10)));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
typedef explicit_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A{});
assert(!c.empty());
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
C c0(7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
C c = std::move(c0);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(10)));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(10)));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
C c0(7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
C c = std::move(c0);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(12));
assert(!c.empty());
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
typedef std::pair<int, std::string> P;
typedef min_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
typedef std::pair<int, std::string> P;
typedef explicit_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A{});
assert(!c.empty());
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
- typedef test_hash<std::hash<int>> HF;
+ typedef test_hash<int> HF;
typedef test_equal_to<int> Comp;
typedef std::unordered_map<int, std::string, HF, Comp, A> C;
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
- typedef test_hash<std::hash<int>> HF;
+ typedef test_hash<int> HF;
typedef test_equal_to<int> Comp;
typedef std::unordered_map<int, std::string, HF, Comp, A> C;
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(10)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
typedef explicit_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_map<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
assert(c.at(2) == "two");
assert(c.at(3) == "three");
assert(c.at(4) == "four");
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A{});
assert(!c.empty());
{
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c = 7;
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c = 7;
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8)
+ test_hash<NotConstructible>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8)
+ test_hash<NotConstructible>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
min_allocator<std::pair<const NotConstructible, NotConstructible> >()
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
typedef explicit_allocator<std::pair<const NotConstructible, NotConstructible> > A;
typedef std::unordered_map<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
A
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
A{}
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == A{});
assert(c.size() == 0);
int main(int, char**)
{
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(it1 == c2.begin()); // Iterators are not invalidated
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
}
#if TEST_STD_VER >= 11
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_map<int, std::string, Hash, Compare, Alloc> C;
int main(int, char**)
{
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
}
#if TEST_STD_VER >= 11
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
{
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10));
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(min_allocator<std::pair<const NotConstructible, NotConstructible> >{});
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
typedef explicit_allocator<std::pair<const NotConstructible, NotConstructible>> A;
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
A
> C;
C c(A{});
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == A{});
assert(c.size() == 0);
{
typedef NotConstructible T;
typedef test_allocator<std::pair<const T, T>> A;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef std::unordered_multimap<T, T, HF, Comp, A> C;
{
typedef NotConstructible T;
typedef test_allocator<std::pair<const T, T>> A;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef std::unordered_multimap<T, T, HF, Comp, A> C;
{
typedef test_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(4));
assert(!c.empty());
{
typedef other_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef min_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
typedef test_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
{
typedef min_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
{
typedef test_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
{
typedef test_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(10)
);
{
typedef other_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
{
typedef min_allocator<std::pair<const int, std::string> > A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(10)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
other_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
other_allocator<std::pair<const int, std::string> >(10)
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(other_allocator<std::pair<const int, std::string> >(-2)));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(5)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
{
typedef explicit_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
CheckConsecutiveKeys<C::const_iterator>(c.find(3), c.end(), 3, s);
s.insert("four");
CheckConsecutiveKeys<C::const_iterator>(c.find(4), c.end(), 4, s);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A{});
assert(!c.empty());
{
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
typedef explicit_allocator<std::pair<const NotConstructible, NotConstructible>> A;
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
A
> C;
{
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == A());
assert(c.size() == 0);
A a;
C c(a);
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == a);
assert(c.size() == 0);
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
- typedef test_hash<std::hash<int>> HF;
+ typedef test_hash<int> HF;
typedef test_equal_to<int> Comp;
typedef std::unordered_multimap<int, std::string, HF, Comp, A> C;
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
- typedef test_hash<std::hash<int>> HF;
+ typedef test_hash<int> HF;
typedef test_equal_to<int> Comp;
typedef std::unordered_multimap<int, std::string, HF, Comp, A> C;
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >(10)));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
typedef explicit_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
P(2, "four"),
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A{});
}
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
C c0(7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
C c = std::move(c0);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const int, std::string> >(10)));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >(10)));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
C c0(7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
C c = std::move(c0);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >(12)));
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >(10)));
typedef std::pair<int, std::string> P;
typedef min_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
typedef std::pair<int, std::string> P;
typedef explicit_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A{});
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
- typedef test_hash<std::hash<int>> HF;
+ typedef test_hash<int> HF;
typedef test_equal_to<int> Comp;
typedef std::unordered_multimap<int, std::string, HF, Comp, A> C;
{
typedef std::pair<int, std::string> P;
typedef test_allocator<std::pair<const int, std::string>> A;
- typedef test_hash<std::hash<int>> HF;
+ typedef test_hash<int> HF;
typedef test_equal_to<int> Comp;
typedef std::unordered_multimap<int, std::string, HF, Comp, A> C;
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >()));
}
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<std::pair<const int, std::string> >(10)
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >(10)));
}
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<std::pair<const int, std::string> >
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<std::pair<const int, std::string> >()
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >()));
}
{
typedef explicit_allocator<std::pair<const int, std::string>> A;
typedef std::unordered_multimap<int, std::string,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size());
assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
assert(c.max_load_factor() == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A{});
}
{
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c = 7;
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c = 7;
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8)
+ test_hash<NotConstructible>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8)
+ test_hash<NotConstructible>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() ==
(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)));
#if TEST_STD_VER >= 11
{
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<std::pair<const NotConstructible,
NotConstructible> >
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
min_allocator<std::pair<const NotConstructible, NotConstructible> >()
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() ==
(min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
{
typedef explicit_allocator<std::pair<const NotConstructible, NotConstructible> > A;
typedef std::unordered_multimap<NotConstructible, NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
A
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
A{}
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == A{});
assert(c.size() == 0);
int main(int, char**)
{
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(it1 == c2.begin()); // Iterators are not invalidated
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
}
#if TEST_STD_VER >= 11
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<std::pair<const int, std::string> > Alloc;
typedef std::unordered_multimap<int, std::string, Hash, Compare, Alloc> C;
int main(int, char**)
{
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
}
#if TEST_STD_VER >= 11
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
{
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(test_allocator<NotConstructible>(10));
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == test_allocator<NotConstructible>(10));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(min_allocator<NotConstructible>{});
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == min_allocator<NotConstructible>());
assert(c.size() == 0);
#if TEST_STD_VER > 11
{
typedef NotConstructible T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_multiset<T, HF, Comp, A> C;
}
{
typedef NotConstructible T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_multiset<T, HF, Comp, A> C;
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(4));
assert(!c.empty());
{
typedef other_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef min_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
{
typedef min_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(4));
assert(!c.empty());
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(10)
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef other_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
typedef min_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
other_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
other_allocator<int>(10)
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == other_allocator<int>(-2));
assert(!c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(5));
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
typedef explicit_allocator<NotConstructible> A;
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
A
> C;
{
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == A());
assert(c.size() == 0);
A a;
C c(a);
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == a);
assert(c.size() == 0);
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER > 11
{
typedef int T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_multiset<T, HF, Comp, A> C;
}
{
typedef int T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_multiset<T, HF, Comp, A> C;
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(!c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
C c0(7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
C c = std::move(c0);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(!c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
C c0(7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
C c = std::move(c0);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(c.empty());
}
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
typedef int P;
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
CheckConsecutiveValues<C::const_iterator>(c.find(3), c.end(), 3, 1);
CheckConsecutiveValues<C::const_iterator>(c.find(4), c.end(), 4, 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(12));
assert(!c.empty());
typedef int P;
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
typedef int P;
typedef min_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
typedef int P;
typedef min_allocator<int> A;
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER > 11
{
typedef int T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_multiset<T, HF, Comp, A> C;
}
{
typedef int T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_multiset<T, HF, Comp, A> C;
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
assert(c.count(2) == 2);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c = 7;
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c = 7;
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(7);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(7);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8)
+ test_hash<NotConstructible>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8)
+ test_hash<NotConstructible>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == (test_allocator<NotConstructible>(10)));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_multiset<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
min_allocator<std::pair<const NotConstructible, NotConstructible> >()
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
int main(int, char**)
{
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(it1 == c2.begin()); // Iterators are not invalidated
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
}
#if TEST_STD_VER >= 11
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
int main(int, char**)
{
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
}
#if TEST_STD_VER >= 11
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
{
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(test_allocator<NotConstructible>(10));
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == test_allocator<NotConstructible>(10));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(min_allocator<NotConstructible>{});
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == min_allocator<NotConstructible>());
assert(c.size() == 0);
#if TEST_STD_VER > 11
{
typedef NotConstructible T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_set<T, HF, Comp, A> C;
}
{
typedef NotConstructible T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_set<T, HF, Comp, A> C;
{
typedef test_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(4));
assert(!c.empty());
{
typedef other_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef min_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
typedef test_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
{
typedef min_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
{
typedef test_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(4));
assert(!c.empty());
{
typedef test_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef other_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A(4)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
{
typedef min_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
C c(a, a + 2,
7,
- test_hash<std::hash<int> >(2),
+ test_hash<int>(2),
test_equal_to<int>(3),
A()
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
other_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
other_allocator<int>(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == other_allocator<int>(-2));
assert(!c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(5));
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
typedef explicit_allocator<NotConstructible> A;
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
A
> C;
{
C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == A());
assert(c.size() == 0);
A a;
C c(a);
LIBCPP_ASSERT(c.bucket_count() == 0);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == a);
assert(c.size() == 0);
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER > 11
{
typedef int T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_set<T, HF, Comp, A> C;
}
{
typedef int T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_set<T, HF, Comp, A> C;
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(!c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
P(2)
},
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
C c0(7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
C c = std::move(c0);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(!c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
C c0(7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
C c = std::move(c0);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 0);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(c.empty());
}
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
typedef int P;
typedef test_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(12));
assert(!c.empty());
typedef int P;
typedef test_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A(10));
assert(!c.empty());
typedef int P;
typedef min_allocator<int> A;
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
A
> C;
};
C c0(a, a + sizeof(a)/sizeof(a[0]),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
A()
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == A());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER > 11
{
typedef int T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_set<T, HF, Comp, A> C;
}
{
typedef int T;
- typedef test_hash<std::hash<T>> HF;
+ typedef test_hash<T> HF;
typedef test_equal_to<T> Comp;
typedef test_allocator<T> A;
typedef std::unordered_set<T, HF, Comp, A> C;
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >());
+ assert(c.hash_function() == test_hash<int>());
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8)
+ test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>());
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>());
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == test_allocator<int>(10));
assert(!c.empty());
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<int,
- test_hash<std::hash<int> >,
+ test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
};
C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
7,
- test_hash<std::hash<int> >(8),
+ test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
assert(c.count(2) == 1);
assert(c.count(3) == 1);
assert(c.count(4) == 1);
- assert(c.hash_function() == test_hash<std::hash<int> >(8));
+ assert(c.hash_function() == test_hash<int>(8));
assert(c.key_eq() == test_equal_to<int>(9));
assert(c.get_allocator() == min_allocator<int>());
assert(!c.empty());
{
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c = 7;
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
{
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(7);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(7);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
+ assert(c.hash_function() == test_hash<NotConstructible>());
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8)
+ test_hash<NotConstructible>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8)
+ test_hash<NotConstructible>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>());
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == (test_allocator<NotConstructible>()));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
{
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
test_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
test_allocator<NotConstructible>(10)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == (test_allocator<NotConstructible>(10)));
assert(c.size() == 0);
#if TEST_STD_VER >= 11
{
typedef std::unordered_set<NotConstructible,
- test_hash<std::hash<NotConstructible> >,
+ test_hash<NotConstructible>,
test_equal_to<NotConstructible>,
min_allocator<NotConstructible>
> C;
C c(7,
- test_hash<std::hash<NotConstructible> >(8),
+ test_hash<NotConstructible>(8),
test_equal_to<NotConstructible>(9),
min_allocator<NotConstructible>()
);
LIBCPP_ASSERT(c.bucket_count() == 7);
- assert(c.hash_function() == test_hash<std::hash<NotConstructible> >(8));
+ assert(c.hash_function() == test_hash<NotConstructible>(8));
assert(c.key_eq() == test_equal_to<NotConstructible>(9));
assert(c.get_allocator() == (min_allocator<NotConstructible>()));
assert(c.size() == 0);
int main(int, char**)
{
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(it1 == c2.begin()); // Iterators are not invalidated
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
}
#if TEST_STD_VER >= 11
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;
assert(c2.max_load_factor() == 1);
}
{
- typedef test_hash<std::hash<int> > Hash;
+ typedef test_hash<int> Hash;
typedef test_equal_to<int> Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_set<int, Hash, Compare, Alloc> C;