1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // <unordered_set> 11 12 // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, 13 // class Alloc = allocator<Value>> 14 // class unordered_multiset 15 16 // float max_load_factor() const; 17 // void max_load_factor(float mlf); 18 19 #include <unordered_set> 20 #include <cassert> 21 22 int main() 23 { 24 { 25 typedef std::unordered_multiset<int> C; 26 typedef int P; 27 const C c; 28 assert(c.max_load_factor() == 1); 29 } 30 { 31 typedef std::unordered_multiset<int> C; 32 typedef int P; 33 C c; 34 assert(c.max_load_factor() == 1); 35 c.max_load_factor(2.5); 36 assert(c.max_load_factor() == 2.5); 37 } 38 } 39