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 insert(const_iterator p, const value_type& x);
18 #if _LIBCPP_DEBUG >= 1
19 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
22 #include <unordered_set>
25 #include "min_allocator.h"
30 typedef std::unordered_multiset<double> C;
31 typedef C::iterator R;
32 typedef C::value_type P;
34 C::const_iterator e = c.end();
35 R r = c.insert(e, P(3.5));
36 assert(c.size() == 1);
39 r = c.insert(c.end(), P(3.5));
40 assert(c.size() == 2);
43 r = c.insert(c.end(), P(4.5));
44 assert(c.size() == 3);
47 r = c.insert(c.end(), P(5.5));
48 assert(c.size() == 4);
51 #if TEST_STD_VER >= 11
53 typedef std::unordered_multiset<double, std::hash<double>,
54 std::equal_to<double>, min_allocator<double>> C;
55 typedef C::iterator R;
56 typedef C::value_type P;
58 C::const_iterator e = c.end();
59 R r = c.insert(e, P(3.5));
60 assert(c.size() == 1);
63 r = c.insert(c.end(), P(3.5));
64 assert(c.size() == 2);
67 r = c.insert(c.end(), P(4.5));
68 assert(c.size() == 3);
71 r = c.insert(c.end(), P(5.5));
72 assert(c.size() == 4);
76 #if _LIBCPP_DEBUG >= 1
78 typedef std::unordered_multiset<double> C;
79 typedef C::iterator R;
80 typedef C::value_type P;
83 C::const_iterator e = c2.end();