aboutsummaryrefslogtreecommitdiff
path: root/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp')
-rw-r--r--test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp
index 6eb258db4960..392f375c4b6c 100644
--- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp
+++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp
@@ -65,6 +65,24 @@ int main()
assert(c.load_factor() == 0);
assert(c.max_load_factor() == 1);
}
+ {
+ typedef explicit_allocator<std::pair<const NotConstructible, NotConstructible>> A;
+ typedef std::unordered_multimap<NotConstructible, NotConstructible,
+ test_hash<std::hash<NotConstructible> >,
+ test_compare<std::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.key_eq() == test_compare<std::equal_to<NotConstructible> >());
+ assert(c.get_allocator() == A{});
+ assert(c.size() == 0);
+ assert(c.empty());
+ assert(std::distance(c.begin(), c.end()) == 0);
+ assert(c.load_factor() == 0);
+ assert(c.max_load_factor() == 1);
+ }
#if _LIBCPP_STD_VER > 11
{
typedef NotConstructible T;