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 Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
13 // class Alloc = allocator<Value>>
14 // class unordered_multiset
16 // float load_factor() const
18 #include <unordered_set>
22 #include "min_allocator.h"
27 typedef std::unordered_multiset<int> C;
40 const C c(std::begin(a), std::end(a));
41 assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
44 typedef std::unordered_multiset<int> C;
47 assert(c.load_factor() == 0);
49 #if __cplusplus >= 201103L
51 typedef std::unordered_multiset<int, std::hash<int>,
52 std::equal_to<int>, min_allocator<int>> C;
65 const C c(std::begin(a), std::end(a));
66 assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON);
69 typedef std::unordered_multiset<int, std::hash<int>,
70 std::equal_to<int>, min_allocator<int>> C;
73 assert(c.load_factor() == 0);