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 // iterator begin() {return __table_.begin();}
17 // iterator end() {return __table_.end();}
18 // const_iterator begin() const {return __table_.begin();}
19 // const_iterator end() const {return __table_.end();}
20 // const_iterator cbegin() const {return __table_.begin();}
21 // const_iterator cend() const {return __table_.end();}
23 #include <unordered_set>
26 #include "test_macros.h"
31 typedef std::unordered_multiset<int> C;
42 C c(a, a + sizeof(a)/sizeof(a[0]));
43 LIBCPP_ASSERT(c.bucket_count() == 7);
44 assert(c.size() == 6);
45 assert(std::distance(c.begin(), c.end()) == c.size());
46 assert(std::distance(c.cbegin(), c.cend()) == c.size());
47 C::iterator i = c.begin();
52 typedef std::unordered_multiset<int> C;
63 const C c(a, a + sizeof(a)/sizeof(a[0]));
64 LIBCPP_ASSERT(c.bucket_count() == 7);
65 assert(c.size() == 6);
66 assert(std::distance(c.begin(), c.end()) == c.size());
67 assert(std::distance(c.cbegin(), c.cend()) == c.size());