[libc++] [test] No longer rely on std::hash<T>::argument_type.

Differential Revision: https://reviews.llvm.org/D104166
This commit is contained in:
Arthur O'Dwyer 2021-06-11 21:05:17 -04:00
parent c83e696732
commit bbd717b9a3
105 changed files with 781 additions and 783 deletions

View File

@ -10,19 +10,17 @@
#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_;}

View File

@ -28,7 +28,7 @@
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;
@ -56,7 +56,7 @@ int main(int, char**)
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;
@ -104,7 +104,7 @@ int main(int, char**)
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;
@ -146,7 +146,7 @@ int main(int, char**)
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;
@ -208,7 +208,7 @@ int main(int, char**)
}
{
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;
@ -236,7 +236,7 @@ int main(int, char**)
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;
@ -284,7 +284,7 @@ int main(int, char**)
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;
@ -326,7 +326,7 @@ int main(int, char**)
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;
@ -388,7 +388,7 @@ int main(int, char**)
}
#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;
@ -416,7 +416,7 @@ int main(int, char**)
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;
@ -464,7 +464,7 @@ int main(int, char**)
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;
@ -506,7 +506,7 @@ int main(int, char**)
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;

View File

@ -28,14 +28,14 @@ int main(int, char**)
{
{
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)));
@ -48,14 +48,14 @@ int main(int, char**)
#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> >()));
@ -68,13 +68,13 @@ int main(int, char**)
{
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);
@ -87,7 +87,7 @@ int main(int, char**)
{
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;
@ -106,7 +106,7 @@ int main(int, char**)
{
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;

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
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;
@ -49,13 +49,13 @@ int main(int, char**)
};
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)
);
@ -66,7 +66,7 @@ int main(int, char**)
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());
@ -96,7 +96,7 @@ int main(int, char**)
{
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;
@ -112,13 +112,13 @@ int main(int, char**)
};
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)
);
@ -129,7 +129,7 @@ int main(int, char**)
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());
@ -142,7 +142,7 @@ int main(int, char**)
{
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;
@ -158,13 +158,13 @@ int main(int, char**)
};
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()
);
@ -175,7 +175,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
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;
@ -65,7 +65,7 @@ int main(int, char**)
{
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;

View File

@ -34,7 +34,7 @@ int main(int, char**)
{
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;
@ -50,13 +50,13 @@ int main(int, char**)
};
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)
);
@ -67,7 +67,7 @@ int main(int, char**)
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());
@ -79,7 +79,7 @@ int main(int, char**)
{
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;
@ -95,13 +95,13 @@ int main(int, char**)
};
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)
);
@ -113,7 +113,7 @@ int main(int, char**)
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());
@ -127,7 +127,7 @@ int main(int, char**)
{
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;
@ -143,13 +143,13 @@ int main(int, char**)
};
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)
);
@ -161,7 +161,7 @@ int main(int, char**)
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());
@ -175,7 +175,7 @@ int main(int, char**)
{
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;
@ -191,13 +191,13 @@ int main(int, char**)
};
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()
);
@ -209,7 +209,7 @@ int main(int, char**)
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());

View File

@ -31,7 +31,7 @@ int main(int, char**)
{
{
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;
@ -47,7 +47,7 @@ int main(int, char**)
};
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)
);
@ -58,7 +58,7 @@ int main(int, char**)
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)));
@ -71,7 +71,7 @@ int main(int, char**)
#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;
@ -87,7 +87,7 @@ int main(int, char**)
};
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)
);
@ -98,7 +98,7 @@ int main(int, char**)
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)));
@ -110,7 +110,7 @@ int main(int, char**)
}
{
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;
@ -126,7 +126,7 @@ int main(int, char**)
};
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> >()
);
@ -137,7 +137,7 @@ int main(int, char**)
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> >()));

View File

@ -31,7 +31,7 @@ int main(int, char**)
{
{
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;
@ -47,7 +47,7 @@ int main(int, char**)
};
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)
);
@ -58,7 +58,7 @@ int main(int, char**)
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)));
@ -71,7 +71,7 @@ int main(int, char**)
#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;
@ -87,7 +87,7 @@ int main(int, char**)
};
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> >()
);
@ -98,7 +98,7 @@ int main(int, char**)
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> >()));
@ -111,7 +111,7 @@ int main(int, char**)
{
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;
@ -127,7 +127,7 @@ int main(int, char**)
};
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{}
);
@ -138,7 +138,7 @@ int main(int, char**)
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());

View File

@ -28,14 +28,14 @@ int main(int, char**)
{
{
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> >()));
@ -48,14 +48,14 @@ int main(int, char**)
#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> >()));
@ -68,14 +68,14 @@ int main(int, char**)
{
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);
@ -88,7 +88,7 @@ int main(int, char**)
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);

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
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;
@ -52,7 +52,7 @@ int main(int, char**)
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> >()));
@ -64,7 +64,7 @@ int main(int, char**)
}
{
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;
@ -83,7 +83,7 @@ int main(int, char**)
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> >()));
@ -97,7 +97,7 @@ int main(int, char**)
{
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;
@ -116,7 +116,7 @@ int main(int, char**)
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());
@ -128,7 +128,7 @@ int main(int, char**)
{
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;
@ -149,7 +149,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
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;
@ -54,7 +54,7 @@ int main(int, char**)
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> >()));
@ -66,7 +66,7 @@ int main(int, char**)
}
{
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;
@ -87,7 +87,7 @@ int main(int, char**)
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> >()));

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
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;
@ -47,7 +47,7 @@ int main(int, char**)
P(2, "four"),
},
7,
test_hash<std::hash<int> >(8)
test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
@ -55,7 +55,7 @@ int main(int, char**)
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> >()));
@ -67,7 +67,7 @@ int main(int, char**)
}
{
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;
@ -81,7 +81,7 @@ int main(int, char**)
P(2, "four"),
},
7,
test_hash<std::hash<int> >(8)
test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
@ -89,7 +89,7 @@ int main(int, char**)
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> >()));

View File

@ -34,7 +34,7 @@ int main(int, char**)
{
{
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;
@ -48,7 +48,7 @@ int main(int, char**)
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);
@ -57,7 +57,7 @@ int main(int, char**)
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> >()));
@ -69,7 +69,7 @@ int main(int, char**)
}
{
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;
@ -83,7 +83,7 @@ int main(int, char**)
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);
@ -92,7 +92,7 @@ int main(int, char**)
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> >()));

View File

@ -34,7 +34,7 @@ int main(int, char**)
{
{
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;
@ -48,7 +48,7 @@ int main(int, char**)
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)
);
@ -58,7 +58,7 @@ int main(int, char**)
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)));
@ -70,7 +70,7 @@ int main(int, char**)
}
{
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;
@ -84,7 +84,7 @@ int main(int, char**)
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> >()
);
@ -94,7 +94,7 @@ int main(int, char**)
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> >()));
@ -107,7 +107,7 @@ int main(int, char**)
{
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;
@ -121,7 +121,7 @@ int main(int, char**)
P(2, "four"),
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
@ -131,7 +131,7 @@ int main(int, char**)
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());

View File

@ -33,12 +33,12 @@ int main(int, char**)
{
{
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)
);
@ -46,7 +46,7 @@ int main(int, char**)
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)));
@ -61,7 +61,7 @@ int main(int, char**)
}
{
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;
@ -77,7 +77,7 @@ int main(int, char**)
};
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)
);
@ -89,7 +89,7 @@ int main(int, char**)
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)));
@ -104,12 +104,12 @@ int main(int, char**)
}
{
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> >()
);
@ -117,7 +117,7 @@ int main(int, char**)
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> >()));
@ -132,7 +132,7 @@ int main(int, char**)
}
{
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;
@ -148,7 +148,7 @@ int main(int, char**)
};
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> >()
);
@ -160,7 +160,7 @@ int main(int, char**)
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> >()));

View File

@ -35,7 +35,7 @@ int main(int, char**)
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;
@ -50,7 +50,7 @@ int main(int, char**)
};
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)
);
@ -61,7 +61,7 @@ int main(int, char**)
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());
@ -76,7 +76,7 @@ int main(int, char**)
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;
@ -91,7 +91,7 @@ int main(int, char**)
};
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)
);
@ -102,7 +102,7 @@ int main(int, char**)
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());
@ -117,7 +117,7 @@ int main(int, char**)
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;
@ -132,7 +132,7 @@ int main(int, char**)
};
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()
);
@ -143,7 +143,7 @@ int main(int, char**)
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());
@ -158,7 +158,7 @@ int main(int, char**)
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;
@ -173,7 +173,7 @@ int main(int, char**)
};
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{}
);
@ -184,7 +184,7 @@ int main(int, char**)
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());

View File

@ -34,7 +34,7 @@ int main(int, char**)
{
{
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;
@ -55,7 +55,7 @@ int main(int, char**)
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> >()));
@ -68,7 +68,7 @@ int main(int, char**)
#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;
@ -89,7 +89,7 @@ int main(int, char**)
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> >()));
@ -103,7 +103,7 @@ int main(int, char**)
{
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;
@ -135,7 +135,7 @@ int main(int, char**)
{
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;

View File

@ -34,7 +34,7 @@ int main(int, char**)
{
{
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;
@ -57,7 +57,7 @@ int main(int, char**)
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> >()));
@ -70,7 +70,7 @@ int main(int, char**)
#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;
@ -93,7 +93,7 @@ int main(int, char**)
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> >()));

View File

@ -35,7 +35,7 @@ int main(int, char**)
{
{
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;
@ -51,7 +51,7 @@ int main(int, char**)
};
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);
@ -59,7 +59,7 @@ int main(int, char**)
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> >()));
@ -72,7 +72,7 @@ int main(int, char**)
#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;
@ -88,7 +88,7 @@ int main(int, char**)
};
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);
@ -96,7 +96,7 @@ int main(int, char**)
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> >()));

View File

@ -35,7 +35,7 @@ int main(int, char**)
{
{
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;
@ -51,7 +51,7 @@ int main(int, char**)
};
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);
@ -60,7 +60,7 @@ int main(int, char**)
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> >()));
@ -73,7 +73,7 @@ int main(int, char**)
#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;
@ -89,7 +89,7 @@ int main(int, char**)
};
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);
@ -98,7 +98,7 @@ int main(int, char**)
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> >()));

View File

@ -36,7 +36,7 @@ int main(int, char**)
{
{
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;
@ -52,7 +52,7 @@ int main(int, char**)
};
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)
);
@ -62,7 +62,7 @@ int main(int, char**)
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)));
@ -75,7 +75,7 @@ int main(int, char**)
#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;
@ -91,7 +91,7 @@ int main(int, char**)
};
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> >()
);
@ -101,7 +101,7 @@ int main(int, char**)
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> >()));
@ -114,7 +114,7 @@ int main(int, char**)
{
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;
@ -130,7 +130,7 @@ int main(int, char**)
};
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{}
);
@ -140,7 +140,7 @@ int main(int, char**)
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());

View File

@ -28,14 +28,14 @@ int main(int, char**)
{
{
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> >()));
@ -48,14 +48,14 @@ int main(int, char**)
#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> >()));

View File

@ -28,14 +28,14 @@ int main(int, char**)
{
{
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> >()));
@ -48,14 +48,14 @@ int main(int, char**)
#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> >()));

View File

@ -28,16 +28,16 @@ int main(int, char**)
{
{
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> >()));
@ -50,16 +50,16 @@ int main(int, char**)
#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> >()));

View File

@ -28,17 +28,17 @@ int main(int, char**)
{
{
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> >()));
@ -51,17 +51,17 @@ int main(int, char**)
#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> >()));

View File

@ -28,18 +28,18 @@ int main(int, char**)
{
{
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)));
@ -52,18 +52,18 @@ int main(int, char**)
#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> >()));
@ -76,17 +76,17 @@ int main(int, char**)
{
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);

View File

@ -28,7 +28,7 @@
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;
@ -56,7 +56,7 @@ int main(int, char**)
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;
@ -106,7 +106,7 @@ int main(int, char**)
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;
@ -150,7 +150,7 @@ int main(int, char**)
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;
@ -216,7 +216,7 @@ int main(int, char**)
}
{
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;
@ -244,7 +244,7 @@ int main(int, char**)
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;
@ -292,7 +292,7 @@ int main(int, char**)
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;
@ -334,7 +334,7 @@ int main(int, char**)
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;
@ -396,7 +396,7 @@ int main(int, char**)
}
#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;
@ -424,7 +424,7 @@ int main(int, char**)
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;
@ -472,7 +472,7 @@ int main(int, char**)
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;
@ -514,7 +514,7 @@ int main(int, char**)
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;

View File

@ -30,7 +30,7 @@
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;
@ -58,7 +58,7 @@ int main(int, char**)
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;
@ -106,7 +106,7 @@ int main(int, char**)
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;
@ -162,7 +162,7 @@ int main(int, char**)
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;
@ -238,7 +238,7 @@ int main(int, char**)
}
{
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;
@ -266,7 +266,7 @@ int main(int, char**)
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;
@ -314,7 +314,7 @@ int main(int, char**)
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;
@ -370,7 +370,7 @@ int main(int, char**)
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;
@ -446,7 +446,7 @@ int main(int, char**)
}
#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;
@ -474,7 +474,7 @@ int main(int, char**)
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;
@ -522,7 +522,7 @@ int main(int, char**)
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;
@ -578,7 +578,7 @@ int main(int, char**)
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;

View File

@ -28,14 +28,14 @@ int main(int, char**)
{
{
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)));
@ -48,14 +48,14 @@ int main(int, char**)
#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> >()));
@ -68,13 +68,13 @@ int main(int, char**)
{
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);
@ -87,7 +87,7 @@ int main(int, char**)
{
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;
@ -106,7 +106,7 @@ int main(int, char**)
{
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;

View File

@ -35,7 +35,7 @@ int main(int, char**)
{
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;
@ -51,13 +51,13 @@ int main(int, char**)
};
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)
);
@ -75,7 +75,7 @@ int main(int, char**)
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());
@ -105,7 +105,7 @@ int main(int, char**)
{
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;
@ -121,13 +121,13 @@ int main(int, char**)
};
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)
);
@ -145,7 +145,7 @@ int main(int, char**)
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());
@ -158,7 +158,7 @@ int main(int, char**)
{
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;
@ -174,13 +174,13 @@ int main(int, char**)
};
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()
);
@ -198,7 +198,7 @@ int main(int, char**)
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());

View File

@ -36,7 +36,7 @@ int main(int, char**)
{
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;
@ -87,7 +87,7 @@ int main(int, char**)
{
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;

View File

@ -36,7 +36,7 @@ int main(int, char**)
{
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;
@ -52,13 +52,13 @@ int main(int, char**)
};
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)
);
@ -96,7 +96,7 @@ int main(int, char**)
{
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;
@ -112,13 +112,13 @@ int main(int, char**)
};
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)
);
@ -158,7 +158,7 @@ int main(int, char**)
{
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;
@ -174,13 +174,13 @@ int main(int, char**)
};
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)
);
@ -220,7 +220,7 @@ int main(int, char**)
{
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;
@ -236,13 +236,13 @@ int main(int, char**)
};
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()
);

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
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;
@ -49,7 +49,7 @@ int main(int, char**)
};
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)
);
@ -67,7 +67,7 @@ int main(int, char**)
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)));
@ -80,7 +80,7 @@ int main(int, char**)
#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;
@ -96,7 +96,7 @@ int main(int, char**)
};
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)
);
@ -114,7 +114,7 @@ int main(int, char**)
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)));
@ -126,7 +126,7 @@ int main(int, char**)
}
{
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;
@ -142,7 +142,7 @@ int main(int, char**)
};
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> >()
);
@ -160,7 +160,7 @@ int main(int, char**)
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> >()));

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
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;
@ -49,7 +49,7 @@ int main(int, char**)
};
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)
);
@ -67,7 +67,7 @@ int main(int, char**)
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)));
@ -80,7 +80,7 @@ int main(int, char**)
#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;
@ -96,7 +96,7 @@ int main(int, char**)
};
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> >()
);
@ -114,7 +114,7 @@ int main(int, char**)
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> >()));
@ -127,7 +127,7 @@ int main(int, char**)
{
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;
@ -143,7 +143,7 @@ int main(int, char**)
};
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{}
);
@ -161,7 +161,7 @@ int main(int, char**)
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());

View File

@ -28,14 +28,14 @@ int main(int, char**)
{
{
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> >()));
@ -48,14 +48,14 @@ int main(int, char**)
#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> >()));
@ -68,14 +68,14 @@ int main(int, char**)
{
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);
@ -88,7 +88,7 @@ int main(int, char**)
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);

View File

@ -35,7 +35,7 @@ int main(int, char**)
{
{
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;
@ -77,13 +77,13 @@ int main(int, char**)
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;
@ -125,7 +125,7 @@ int main(int, char**)
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> >()));
}
@ -133,7 +133,7 @@ int main(int, char**)
{
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;
@ -183,7 +183,7 @@ int main(int, char**)
{
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;

View File

@ -35,7 +35,7 @@ int main(int, char**)
{
{
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;
@ -79,13 +79,13 @@ int main(int, char**)
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;
@ -129,7 +129,7 @@ int main(int, char**)
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> >()));
}

View File

@ -35,7 +35,7 @@ int main(int, char**)
{
{
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;
@ -49,7 +49,7 @@ int main(int, char**)
P(2, "four"),
},
7,
test_hash<std::hash<int> >(8)
test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
@ -80,13 +80,13 @@ int main(int, char**)
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;
@ -100,7 +100,7 @@ int main(int, char**)
P(2, "four"),
},
7,
test_hash<std::hash<int> >(8)
test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
@ -131,7 +131,7 @@ int main(int, char**)
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> >()));
}

View File

@ -36,7 +36,7 @@ int main(int, char**)
{
{
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;
@ -50,7 +50,7 @@ int main(int, char**)
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);
@ -82,13 +82,13 @@ int main(int, char**)
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;
@ -102,7 +102,7 @@ int main(int, char**)
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);
@ -134,7 +134,7 @@ int main(int, char**)
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> >()));
}

View File

@ -36,7 +36,7 @@ int main(int, char**)
{
{
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;
@ -50,7 +50,7 @@ int main(int, char**)
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)
);
@ -83,13 +83,13 @@ int main(int, char**)
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;
@ -103,7 +103,7 @@ int main(int, char**)
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> >()
);
@ -136,14 +136,14 @@ int main(int, char**)
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;
@ -157,7 +157,7 @@ int main(int, char**)
P(2, "four"),
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9),
A{}
);
@ -190,7 +190,7 @@ int main(int, char**)
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{});
}

View File

@ -35,20 +35,20 @@ int main(int, char**)
{
{
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)));
@ -62,7 +62,7 @@ int main(int, char**)
}
{
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;
@ -78,7 +78,7 @@ int main(int, char**)
};
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)
);
@ -114,7 +114,7 @@ int main(int, char**)
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)));
@ -122,19 +122,19 @@ int main(int, char**)
}
{
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> >()));
@ -148,7 +148,7 @@ int main(int, char**)
}
{
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;
@ -164,7 +164,7 @@ int main(int, char**)
};
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> >()
);
@ -200,7 +200,7 @@ int main(int, char**)
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> >()));

View File

@ -37,7 +37,7 @@ int main(int, char**)
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;
@ -52,7 +52,7 @@ int main(int, char**)
};
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)
);
@ -86,7 +86,7 @@ int main(int, char**)
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)));
@ -96,7 +96,7 @@ int main(int, char**)
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;
@ -111,7 +111,7 @@ int main(int, char**)
};
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)
);
@ -145,7 +145,7 @@ int main(int, char**)
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)));
@ -155,7 +155,7 @@ int main(int, char**)
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;
@ -170,7 +170,7 @@ int main(int, char**)
};
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()
);
@ -204,7 +204,7 @@ int main(int, char**)
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> >()));
@ -214,7 +214,7 @@ int main(int, char**)
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;
@ -229,7 +229,7 @@ int main(int, char**)
};
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{}
);
@ -263,7 +263,7 @@ int main(int, char**)
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{});

View File

@ -36,7 +36,7 @@ int main(int, char**)
{
{
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;
@ -80,14 +80,14 @@ int main(int, char**)
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;
@ -131,7 +131,7 @@ int main(int, char**)
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> >()));
}
@ -139,7 +139,7 @@ int main(int, char**)
{
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;
@ -191,7 +191,7 @@ int main(int, char**)
{
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;

View File

@ -36,7 +36,7 @@ int main(int, char**)
{
{
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;
@ -82,14 +82,14 @@ int main(int, char**)
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;
@ -135,7 +135,7 @@ int main(int, char**)
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> >()));
}

View File

@ -37,7 +37,7 @@ int main(int, char**)
{
{
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;
@ -53,7 +53,7 @@ int main(int, char**)
};
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);
@ -84,14 +84,14 @@ int main(int, char**)
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;
@ -107,7 +107,7 @@ int main(int, char**)
};
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);
@ -138,7 +138,7 @@ int main(int, char**)
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> >()));
}

View File

@ -37,7 +37,7 @@ int main(int, char**)
{
{
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;
@ -53,7 +53,7 @@ int main(int, char**)
};
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);
@ -85,14 +85,14 @@ int main(int, char**)
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;
@ -108,7 +108,7 @@ int main(int, char**)
};
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);
@ -140,7 +140,7 @@ int main(int, char**)
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> >()));
}

View File

@ -38,7 +38,7 @@ int main(int, char**)
{
{
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;
@ -54,7 +54,7 @@ int main(int, char**)
};
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)
);
@ -87,14 +87,14 @@ int main(int, char**)
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;
@ -110,7 +110,7 @@ int main(int, char**)
};
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> >()
);
@ -143,14 +143,14 @@ int main(int, char**)
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;
@ -166,7 +166,7 @@ int main(int, char**)
};
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{}
);
@ -199,7 +199,7 @@ int main(int, char**)
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{});
}

View File

@ -28,14 +28,14 @@ int main(int, char**)
{
{
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> >()));
@ -48,14 +48,14 @@ int main(int, char**)
#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> >()));

View File

@ -28,14 +28,14 @@ int main(int, char**)
{
{
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> >()));
@ -48,14 +48,14 @@ int main(int, char**)
#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> >()));

View File

@ -28,16 +28,16 @@ int main(int, char**)
{
{
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> >()));
@ -50,16 +50,16 @@ int main(int, char**)
#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> >()));

View File

@ -28,17 +28,17 @@ int main(int, char**)
{
{
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> >()));
@ -51,17 +51,17 @@ int main(int, char**)
#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> >()));

View File

@ -28,18 +28,18 @@ int main(int, char**)
{
{
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)));
@ -52,18 +52,18 @@ int main(int, char**)
#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> >()));
@ -76,17 +76,17 @@ int main(int, char**)
{
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);

View File

@ -30,7 +30,7 @@
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;
@ -58,7 +58,7 @@ int main(int, char**)
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;
@ -108,7 +108,7 @@ int main(int, char**)
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;
@ -157,7 +157,7 @@ int main(int, char**)
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;
@ -228,7 +228,7 @@ int main(int, char**)
}
{
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;
@ -256,7 +256,7 @@ int main(int, char**)
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;
@ -304,7 +304,7 @@ int main(int, char**)
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;
@ -351,7 +351,7 @@ int main(int, char**)
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;
@ -418,7 +418,7 @@ int main(int, char**)
}
#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;
@ -446,7 +446,7 @@ int main(int, char**)
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;
@ -494,7 +494,7 @@ int main(int, char**)
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;
@ -541,7 +541,7 @@ int main(int, char**)
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;

View File

@ -27,7 +27,7 @@
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;
@ -55,7 +55,7 @@ int main(int, char**)
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;
@ -103,7 +103,7 @@ int main(int, char**)
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;
@ -145,7 +145,7 @@ int main(int, char**)
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;
@ -207,7 +207,7 @@ int main(int, char**)
}
{
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;
@ -235,7 +235,7 @@ int main(int, char**)
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;
@ -283,7 +283,7 @@ int main(int, char**)
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;
@ -325,7 +325,7 @@ int main(int, char**)
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;
@ -387,7 +387,7 @@ int main(int, char**)
}
#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;
@ -415,7 +415,7 @@ int main(int, char**)
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;
@ -463,7 +463,7 @@ int main(int, char**)
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;
@ -505,7 +505,7 @@ int main(int, char**)
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;

View File

@ -28,13 +28,13 @@ int main(int, char**)
{
{
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);
@ -46,13 +46,13 @@ int main(int, char**)
#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);
@ -64,7 +64,7 @@ int main(int, char**)
#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;
@ -84,7 +84,7 @@ int main(int, char**)
}
{
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;

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -49,13 +49,13 @@ int main(int, char**)
};
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)
);
@ -66,7 +66,7 @@ int main(int, char**)
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());
@ -97,7 +97,7 @@ int main(int, char**)
{
typedef other_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -113,13 +113,13 @@ int main(int, char**)
};
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)
);
@ -130,7 +130,7 @@ int main(int, char**)
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());
@ -143,7 +143,7 @@ int main(int, char**)
{
typedef min_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -159,13 +159,13 @@ int main(int, char**)
};
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()
);
@ -176,7 +176,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -65,7 +65,7 @@ int main(int, char**)
{
typedef min_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;

View File

@ -34,7 +34,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -50,13 +50,13 @@ int main(int, char**)
};
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)
);
@ -67,7 +67,7 @@ int main(int, char**)
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());
@ -79,7 +79,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -95,13 +95,13 @@ int main(int, char**)
};
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)
);
@ -113,7 +113,7 @@ int main(int, char**)
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());
@ -126,7 +126,7 @@ int main(int, char**)
{
typedef other_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -142,13 +142,13 @@ int main(int, char**)
};
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)
);
@ -160,7 +160,7 @@ int main(int, char**)
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());
@ -173,7 +173,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -189,13 +189,13 @@ int main(int, char**)
};
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()
);
@ -207,7 +207,7 @@ int main(int, char**)
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());
@ -220,7 +220,7 @@ int main(int, char**)
{
typedef min_allocator<int> A;
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -236,13 +236,13 @@ int main(int, char**)
};
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()
);
@ -254,7 +254,7 @@ int main(int, char**)
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());

View File

@ -31,7 +31,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -47,7 +47,7 @@ int main(int, char**)
};
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)
);
@ -58,7 +58,7 @@ int main(int, char**)
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());
@ -70,7 +70,7 @@ int main(int, char**)
#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;
@ -86,7 +86,7 @@ int main(int, char**)
};
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)
);
@ -97,7 +97,7 @@ int main(int, char**)
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());
@ -108,7 +108,7 @@ int main(int, char**)
}
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -124,7 +124,7 @@ int main(int, char**)
};
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>()
);
@ -135,7 +135,7 @@ int main(int, char**)
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());

View File

@ -31,7 +31,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -47,7 +47,7 @@ int main(int, char**)
};
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)
);
@ -58,7 +58,7 @@ int main(int, char**)
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());
@ -70,7 +70,7 @@ int main(int, char**)
#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;
@ -86,7 +86,7 @@ int main(int, char**)
};
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>()
);
@ -97,7 +97,7 @@ int main(int, char**)
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());

View File

@ -28,13 +28,13 @@ int main(int, char**)
{
{
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);
@ -46,13 +46,13 @@ int main(int, char**)
#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);
@ -64,14 +64,14 @@ int main(int, char**)
{
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);
@ -84,7 +84,7 @@ int main(int, char**)
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);

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -51,7 +51,7 @@ int main(int, char**)
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());
@ -62,7 +62,7 @@ int main(int, char**)
}
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -81,7 +81,7 @@ int main(int, char**)
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());
@ -93,7 +93,7 @@ int main(int, char**)
#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;
@ -126,7 +126,7 @@ int main(int, char**)
}
{
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;

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -53,7 +53,7 @@ int main(int, char**)
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());
@ -64,7 +64,7 @@ int main(int, char**)
}
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -85,7 +85,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -47,7 +47,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8)
test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
@ -55,7 +55,7 @@ int main(int, char**)
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());
@ -66,7 +66,7 @@ int main(int, char**)
}
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -80,7 +80,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8)
test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 6);
@ -88,7 +88,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -47,7 +47,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
@ -56,7 +56,7 @@ int main(int, char**)
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());
@ -67,7 +67,7 @@ int main(int, char**)
}
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -81,7 +81,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
@ -90,7 +90,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -47,7 +47,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
@ -57,7 +57,7 @@ int main(int, char**)
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());
@ -68,7 +68,7 @@ int main(int, char**)
}
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -82,7 +82,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
@ -92,7 +92,7 @@ int main(int, char**)
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());

View File

@ -32,19 +32,19 @@ int main(int, char**)
{
{
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());
@ -57,7 +57,7 @@ int main(int, char**)
}
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -73,7 +73,7 @@ int main(int, char**)
};
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)
);
@ -86,7 +86,7 @@ int main(int, char**)
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());
@ -99,19 +99,19 @@ int main(int, char**)
}
{
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());
@ -124,7 +124,7 @@ int main(int, char**)
}
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -140,7 +140,7 @@ int main(int, char**)
};
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>()
);
@ -153,7 +153,7 @@ int main(int, char**)
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());

View File

@ -35,7 +35,7 @@ int main(int, char**)
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;
@ -50,7 +50,7 @@ int main(int, char**)
};
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)
);
@ -61,7 +61,7 @@ int main(int, char**)
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());
@ -76,7 +76,7 @@ int main(int, char**)
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;
@ -91,7 +91,7 @@ int main(int, char**)
};
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)
);
@ -102,7 +102,7 @@ int main(int, char**)
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());
@ -117,7 +117,7 @@ int main(int, char**)
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;
@ -132,7 +132,7 @@ int main(int, char**)
};
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()
);
@ -143,7 +143,7 @@ int main(int, char**)
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());
@ -158,7 +158,7 @@ int main(int, char**)
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;
@ -173,7 +173,7 @@ int main(int, char**)
};
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()
);
@ -184,7 +184,7 @@ int main(int, char**)
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());

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -53,7 +53,7 @@ int main(int, char**)
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());
@ -65,7 +65,7 @@ int main(int, char**)
#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;
@ -86,7 +86,7 @@ int main(int, char**)
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());
@ -98,7 +98,7 @@ int main(int, char**)
#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;
@ -131,7 +131,7 @@ int main(int, char**)
}
{
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;

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -55,7 +55,7 @@ int main(int, char**)
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());
@ -67,7 +67,7 @@ int main(int, char**)
#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;
@ -90,7 +90,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -49,7 +49,7 @@ int main(int, char**)
};
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);
@ -57,7 +57,7 @@ int main(int, char**)
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());
@ -69,7 +69,7 @@ int main(int, char**)
#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;
@ -85,7 +85,7 @@ int main(int, char**)
};
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);
@ -93,7 +93,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -49,7 +49,7 @@ int main(int, char**)
};
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);
@ -58,7 +58,7 @@ int main(int, char**)
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());
@ -70,7 +70,7 @@ int main(int, char**)
#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;
@ -86,7 +86,7 @@ int main(int, char**)
};
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);
@ -95,7 +95,7 @@ int main(int, char**)
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());

View File

@ -34,7 +34,7 @@ int main(int, char**)
{
{
typedef std::unordered_multiset<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -50,7 +50,7 @@ int main(int, char**)
};
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)
);
@ -60,7 +60,7 @@ int main(int, char**)
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());
@ -72,7 +72,7 @@ int main(int, char**)
#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;
@ -88,7 +88,7 @@ int main(int, char**)
};
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>()
);
@ -98,7 +98,7 @@ int main(int, char**)
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());

View File

@ -28,13 +28,13 @@ int main(int, char**)
{
{
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);
@ -46,13 +46,13 @@ int main(int, char**)
#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);

View File

@ -28,13 +28,13 @@ int main(int, char**)
{
{
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);
@ -46,13 +46,13 @@ int main(int, char**)
#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);

View File

@ -28,15 +28,15 @@ int main(int, char**)
{
{
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);
@ -48,15 +48,15 @@ int main(int, char**)
#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);

View File

@ -28,16 +28,16 @@ int main(int, char**)
{
{
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);
@ -49,16 +49,16 @@ int main(int, char**)
#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);

View File

@ -28,17 +28,17 @@ int main(int, char**)
{
{
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);
@ -50,17 +50,17 @@ int main(int, char**)
#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);

View File

@ -27,7 +27,7 @@
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;
@ -55,7 +55,7 @@ int main(int, char**)
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;
@ -105,7 +105,7 @@ int main(int, char**)
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;
@ -149,7 +149,7 @@ int main(int, char**)
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;
@ -215,7 +215,7 @@ int main(int, char**)
}
{
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;
@ -243,7 +243,7 @@ int main(int, char**)
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;
@ -291,7 +291,7 @@ int main(int, char**)
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;
@ -333,7 +333,7 @@ int main(int, char**)
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;
@ -395,7 +395,7 @@ int main(int, char**)
}
#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;
@ -423,7 +423,7 @@ int main(int, char**)
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;
@ -471,7 +471,7 @@ int main(int, char**)
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;
@ -513,7 +513,7 @@ int main(int, char**)
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;

View File

@ -27,7 +27,7 @@
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;
@ -55,7 +55,7 @@ int main(int, char**)
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;
@ -103,7 +103,7 @@ int main(int, char**)
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;
@ -145,7 +145,7 @@ int main(int, char**)
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;
@ -207,7 +207,7 @@ int main(int, char**)
}
{
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;
@ -235,7 +235,7 @@ int main(int, char**)
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;
@ -283,7 +283,7 @@ int main(int, char**)
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;
@ -325,7 +325,7 @@ int main(int, char**)
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;
@ -387,7 +387,7 @@ int main(int, char**)
}
#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;
@ -415,7 +415,7 @@ int main(int, char**)
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;
@ -463,7 +463,7 @@ int main(int, char**)
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;
@ -505,7 +505,7 @@ int main(int, char**)
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;

View File

@ -28,13 +28,13 @@ int main(int, char**)
{
{
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);
@ -46,13 +46,13 @@ int main(int, char**)
#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);
@ -64,7 +64,7 @@ int main(int, char**)
#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;
@ -84,7 +84,7 @@ int main(int, char**)
}
{
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;

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -48,13 +48,13 @@ int main(int, char**)
};
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)
);
@ -65,7 +65,7 @@ int main(int, char**)
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());
@ -95,7 +95,7 @@ int main(int, char**)
{
typedef other_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -111,13 +111,13 @@ int main(int, char**)
};
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)
);
@ -128,7 +128,7 @@ int main(int, char**)
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());
@ -141,7 +141,7 @@ int main(int, char**)
{
typedef min_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -157,13 +157,13 @@ int main(int, char**)
};
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()
);
@ -174,7 +174,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -65,7 +65,7 @@ int main(int, char**)
{
typedef min_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -49,13 +49,13 @@ int main(int, char**)
};
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)
);
@ -66,7 +66,7 @@ int main(int, char**)
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());
@ -78,7 +78,7 @@ int main(int, char**)
{
typedef test_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -94,13 +94,13 @@ int main(int, char**)
};
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)
);
@ -112,7 +112,7 @@ int main(int, char**)
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());
@ -125,7 +125,7 @@ int main(int, char**)
{
typedef other_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -141,13 +141,13 @@ int main(int, char**)
};
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)
);
@ -159,7 +159,7 @@ int main(int, char**)
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());
@ -172,7 +172,7 @@ int main(int, char**)
{
typedef min_allocator<int> A;
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
A
> C;
@ -188,13 +188,13 @@ int main(int, char**)
};
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()
);
@ -206,7 +206,7 @@ int main(int, char**)
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());

View File

@ -30,7 +30,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -46,7 +46,7 @@ int main(int, char**)
};
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)
);
@ -57,7 +57,7 @@ int main(int, char**)
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());
@ -69,7 +69,7 @@ int main(int, char**)
#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;
@ -85,7 +85,7 @@ int main(int, char**)
};
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)
);
@ -96,7 +96,7 @@ int main(int, char**)
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());
@ -107,7 +107,7 @@ int main(int, char**)
}
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -123,7 +123,7 @@ int main(int, char**)
};
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>()
);
@ -134,7 +134,7 @@ int main(int, char**)
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());

View File

@ -30,7 +30,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -46,7 +46,7 @@ int main(int, char**)
};
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)
);
@ -57,7 +57,7 @@ int main(int, char**)
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());
@ -69,7 +69,7 @@ int main(int, char**)
#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;
@ -85,7 +85,7 @@ int main(int, char**)
};
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>()
);
@ -96,7 +96,7 @@ int main(int, char**)
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());

View File

@ -28,13 +28,13 @@ int main(int, char**)
{
{
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);
@ -46,13 +46,13 @@ int main(int, char**)
#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);
@ -64,14 +64,14 @@ int main(int, char**)
{
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);
@ -84,7 +84,7 @@ int main(int, char**)
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);

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -51,7 +51,7 @@ int main(int, char**)
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());
@ -62,7 +62,7 @@ int main(int, char**)
}
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -81,7 +81,7 @@ int main(int, char**)
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());
@ -93,7 +93,7 @@ int main(int, char**)
#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;
@ -126,7 +126,7 @@ int main(int, char**)
}
{
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;

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -53,7 +53,7 @@ int main(int, char**)
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());
@ -64,7 +64,7 @@ int main(int, char**)
}
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -85,7 +85,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -47,7 +47,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8)
test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
@ -55,7 +55,7 @@ int main(int, char**)
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());
@ -66,7 +66,7 @@ int main(int, char**)
}
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -80,7 +80,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8)
test_hash<int>(8)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
assert(c.size() == 4);
@ -88,7 +88,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -47,7 +47,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
@ -56,7 +56,7 @@ int main(int, char**)
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());
@ -67,7 +67,7 @@ int main(int, char**)
}
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -81,7 +81,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9)
);
LIBCPP_ASSERT(c.bucket_count() == 7);
@ -90,7 +90,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -47,7 +47,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9),
test_allocator<int>(10)
);
@ -57,7 +57,7 @@ int main(int, char**)
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());
@ -68,7 +68,7 @@ int main(int, char**)
}
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -82,7 +82,7 @@ int main(int, char**)
P(2)
},
7,
test_hash<std::hash<int> >(8),
test_hash<int>(8),
test_equal_to<int>(9),
min_allocator<int>()
);
@ -92,7 +92,7 @@ int main(int, char**)
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());

View File

@ -32,19 +32,19 @@ int main(int, char**)
{
{
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());
@ -57,7 +57,7 @@ int main(int, char**)
}
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -73,7 +73,7 @@ int main(int, char**)
};
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)
);
@ -86,7 +86,7 @@ int main(int, char**)
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());
@ -99,19 +99,19 @@ int main(int, char**)
}
{
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());
@ -124,7 +124,7 @@ int main(int, char**)
}
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
min_allocator<int>
> C;
@ -140,7 +140,7 @@ int main(int, char**)
};
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>()
);
@ -153,7 +153,7 @@ int main(int, char**)
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());

View File

@ -34,7 +34,7 @@ int main(int, char**)
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;
@ -49,7 +49,7 @@ int main(int, char**)
};
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)
);
@ -60,7 +60,7 @@ int main(int, char**)
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());
@ -75,7 +75,7 @@ int main(int, char**)
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;
@ -90,7 +90,7 @@ int main(int, char**)
};
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)
);
@ -101,7 +101,7 @@ int main(int, char**)
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());
@ -116,7 +116,7 @@ int main(int, char**)
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;
@ -131,7 +131,7 @@ int main(int, char**)
};
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()
);
@ -142,7 +142,7 @@ int main(int, char**)
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());

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -53,7 +53,7 @@ int main(int, char**)
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());
@ -65,7 +65,7 @@ int main(int, char**)
#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;
@ -86,7 +86,7 @@ int main(int, char**)
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());
@ -98,7 +98,7 @@ int main(int, char**)
#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;
@ -131,7 +131,7 @@ int main(int, char**)
}
{
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;

View File

@ -32,7 +32,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -55,7 +55,7 @@ int main(int, char**)
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());
@ -67,7 +67,7 @@ int main(int, char**)
#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;
@ -90,7 +90,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -49,7 +49,7 @@ int main(int, char**)
};
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);
@ -57,7 +57,7 @@ int main(int, char**)
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());
@ -69,7 +69,7 @@ int main(int, char**)
#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;
@ -85,7 +85,7 @@ int main(int, char**)
};
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);
@ -93,7 +93,7 @@ int main(int, char**)
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());

View File

@ -33,7 +33,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -49,7 +49,7 @@ int main(int, char**)
};
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);
@ -58,7 +58,7 @@ int main(int, char**)
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());
@ -70,7 +70,7 @@ int main(int, char**)
#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;
@ -86,7 +86,7 @@ int main(int, char**)
};
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);
@ -95,7 +95,7 @@ int main(int, char**)
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());

View File

@ -34,7 +34,7 @@ int main(int, char**)
{
{
typedef std::unordered_set<int,
test_hash<std::hash<int> >,
test_hash<int>,
test_equal_to<int>,
test_allocator<int>
> C;
@ -50,7 +50,7 @@ int main(int, char**)
};
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)
);
@ -60,7 +60,7 @@ int main(int, char**)
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());
@ -72,7 +72,7 @@ int main(int, char**)
#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;
@ -88,7 +88,7 @@ int main(int, char**)
};
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>()
);
@ -98,7 +98,7 @@ int main(int, char**)
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());

View File

@ -27,13 +27,13 @@ int main(int, char**)
{
{
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);

Some files were not shown because too many files have changed in this diff Show More