summaryrefslogtreecommitdiffstats
path: root/test/std/containers/unord/unord.multiset
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/containers/unord/unord.multiset')
-rw-r--r--test/std/containers/unord/unord.multiset/bucket_count.pass.cpp6
-rw-r--r--test/std/containers/unord/unord.multiset/load_factor.pass.cpp2
-rw-r--r--test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp4
-rw-r--r--test/std/containers/unord/unord.multiset/swap_member.pass.cpp3
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp7
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp7
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp5
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp9
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp11
-rw-r--r--test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp3
10 files changed, 27 insertions, 30 deletions
diff --git a/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp b/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
index ec4d0e675..c60a81167 100644
--- a/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
@@ -25,14 +25,11 @@ int main()
{
{
typedef std::unordered_multiset<int> C;
- typedef C::const_iterator I;
- typedef int P;
const C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_multiset<int> C;
- typedef C::const_iterator I;
typedef int P;
P a[] =
{
@@ -52,15 +49,12 @@ int main()
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef C::const_iterator I;
- typedef int P;
const C c;
LIBCPP_ASSERT(c.bucket_count() == 0);
}
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef C::const_iterator I;
typedef int P;
P a[] =
{
diff --git a/test/std/containers/unord/unord.multiset/load_factor.pass.cpp b/test/std/containers/unord/unord.multiset/load_factor.pass.cpp
index fad1c182e..df2cb7bef 100644
--- a/test/std/containers/unord/unord.multiset/load_factor.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/load_factor.pass.cpp
@@ -43,7 +43,6 @@ int main()
}
{
typedef std::unordered_multiset<int> C;
- typedef int P;
const C c;
assert(c.load_factor() == 0);
}
@@ -69,7 +68,6 @@ int main()
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
const C c;
assert(c.load_factor() == 0);
}
diff --git a/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp b/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
index 00fe96232..f7ebaaf65 100644
--- a/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
@@ -29,13 +29,11 @@ int main()
{
{
typedef std::unordered_multiset<int> C;
- typedef int P;
const C c;
assert(c.max_load_factor() == 1);
}
{
typedef std::unordered_multiset<int> C;
- typedef int P;
C c;
assert(c.max_load_factor() == 1);
c.max_load_factor(2.5);
@@ -45,14 +43,12 @@ int main()
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
const C c;
assert(c.max_load_factor() == 1);
}
{
typedef std::unordered_multiset<int, std::hash<int>,
std::equal_to<int>, min_allocator<int>> C;
- typedef int P;
C c;
assert(c.max_load_factor() == 1);
c.max_load_factor(2.5);
diff --git a/test/std/containers/unord/unord.multiset/swap_member.pass.cpp b/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
index c0c9e9021..9ffe3ad48 100644
--- a/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
@@ -32,7 +32,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
c2.max_load_factor(2);
@@ -213,7 +212,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1));
C c2(0, Hash(2), Compare(2), Alloc(2));
c2.max_load_factor(2);
@@ -394,7 +392,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc());
C c2(0, Hash(2), Compare(2), Alloc());
c2.max_load_factor(2);
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
index fba024aed..3b69c1eed 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
@@ -42,19 +42,22 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, "");
+ static_assert(std::is_nothrow_default_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
index 62fe51e29..1e927b9b3 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
@@ -35,6 +35,7 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
~some_hash() noexcept(false);
+ std::size_t operator()(T const&) const;
};
int main()
@@ -53,13 +54,15 @@ int main()
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
static_assert(std::is_nothrow_destructible<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
some_comp<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
+ static_assert(!std::is_nothrow_destructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
}
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
index ac0a10a4b..7336bb5af 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
@@ -41,6 +41,7 @@ struct some_hash
some_hash();
some_hash(const some_hash&);
some_hash& operator=(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
@@ -54,11 +55,13 @@ int main()
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
+ static_assert(std::is_nothrow_move_assignable<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_assignable<C>::value, "");
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
index e44be18fa..fcf2a5af3 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
@@ -38,24 +38,27 @@ struct some_hash
typedef T value_type;
some_hash();
some_hash(const some_hash&);
+ std::size_t operator()(T const&) const;
};
int main()
{
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(std::is_nothrow_move_constructible<C>::value, "");
+ static_assert(std::is_nothrow_move_constructible<C>::value, "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!std::is_nothrow_move_constructible<C>::value, "");
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
index c221b6f2e..4afef42e6 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
@@ -125,16 +125,18 @@ int main()
typedef std::unordered_multiset<MoveOnly> C;
static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#if defined(_LIBCPP_VERSION)
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
{
typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
{
typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -178,10 +180,11 @@ int main()
typedef std::unordered_multiset<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
-
+#if defined(_LIBCPP_VERSION)
{ // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
typedef std::unordered_multiset<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
- LIBCPP_STATIC_ASSERT( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
+ static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
}
+#endif // _LIBCPP_VERSION
#endif
}
diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
index d4efb6868..ce290ff1c 100644
--- a/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
+++ b/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
@@ -32,7 +32,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef test_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1, 1));
C c2(0, Hash(2), Compare(2), Alloc(1, 2));
c2.max_load_factor(2);
@@ -213,7 +212,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef other_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc(1));
C c2(0, Hash(2), Compare(2), Alloc(2));
c2.max_load_factor(2);
@@ -394,7 +392,6 @@ int main()
typedef test_compare<std::equal_to<int> > Compare;
typedef min_allocator<int> Alloc;
typedef std::unordered_multiset<int, Hash, Compare, Alloc> C;
- typedef int P;
C c1(0, Hash(1), Compare(1), Alloc());
C c2(0, Hash(2), Compare(2), Alloc());
c2.max_load_factor(2);