1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>,
13 // class Alloc = allocator<pair<const Key, T>>>
14 // class unordered_multimap
16 // unordered_multimap();
18 #include <unordered_map>
21 #include "../../../NotConstructible.h"
22 #include "../../../test_compare.h"
23 #include "../../../test_hash.h"
24 #include "test_allocator.h"
25 #include "min_allocator.h"
30 typedef std::unordered_multimap<NotConstructible, NotConstructible,
31 test_hash<std::hash<NotConstructible> >,
32 test_compare<std::equal_to<NotConstructible> >,
33 test_allocator<std::pair<const NotConstructible,
37 assert(c.bucket_count() == 0);
38 assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
39 assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
40 assert(c.get_allocator() ==
41 (test_allocator<std::pair<const NotConstructible, NotConstructible> >()));
42 assert(c.size() == 0);
44 assert(std::distance(c.begin(), c.end()) == 0);
45 assert(c.load_factor() == 0);
46 assert(c.max_load_factor() == 1);
48 #if __cplusplus >= 201103L
50 typedef std::unordered_multimap<NotConstructible, NotConstructible,
51 test_hash<std::hash<NotConstructible> >,
52 test_compare<std::equal_to<NotConstructible> >,
53 min_allocator<std::pair<const NotConstructible,
57 assert(c.bucket_count() == 0);
58 assert(c.hash_function() == test_hash<std::hash<NotConstructible> >());
59 assert(c.key_eq() == test_compare<std::equal_to<NotConstructible> >());
60 assert(c.get_allocator() ==
61 (min_allocator<std::pair<const NotConstructible, NotConstructible> >()));
62 assert(c.size() == 0);
64 assert(std::distance(c.begin(), c.end()) == 0);
65 assert(c.load_factor() == 0);
66 assert(c.max_load_factor() == 1);