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 // float load_factor() const
18 #include <unordered_map>
23 #include "min_allocator.h"
28 typedef std::unordered_multimap<int, std::string> C;
29 typedef std::pair<int, std::string> P;
41 const C c(std::begin(a), std::end(a));
42 assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
45 typedef std::unordered_multimap<int, std::string> C;
46 typedef std::pair<int, std::string> P;
48 assert(c.load_factor() == 0);
50 #if __cplusplus >= 201103L
52 typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
53 min_allocator<std::pair<const int, std::string>>> C;
54 typedef std::pair<int, std::string> P;
66 const C c(std::begin(a), std::end(a));
67 assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
70 typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>,
71 min_allocator<std::pair<const int, std::string>>> C;
72 typedef std::pair<int, std::string> P;
74 assert(c.load_factor() == 0);