[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / libcxx / test / std / containers / unord / unord.set / insert_init.pass.cpp
blob345025249faecc8eab5d76d15ecb45ad253cf98c
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++98, c++03
11 // <unordered_set>
13 // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>,
14 // class Alloc = allocator<Value>>
15 // class unordered_set
17 // void insert(initializer_list<value_type> il);
19 #include <unordered_set>
20 #include <cassert>
22 #include "test_macros.h"
23 #include "test_iterators.h"
24 #include "min_allocator.h"
26 int main(int, char**)
29 typedef std::unordered_set<int> C;
30 typedef int P;
31 C c;
32 c.insert(
34 P(1),
35 P(2),
36 P(3),
37 P(4),
38 P(1),
39 P(2)
42 assert(c.size() == 4);
43 assert(c.count(1) == 1);
44 assert(c.count(2) == 1);
45 assert(c.count(3) == 1);
46 assert(c.count(4) == 1);
49 typedef std::unordered_set<int, std::hash<int>,
50 std::equal_to<int>, min_allocator<int>> C;
51 typedef int P;
52 C c;
53 c.insert(
55 P(1),
56 P(2),
57 P(3),
58 P(4),
59 P(1),
60 P(2)
63 assert(c.size() == 4);
64 assert(c.count(1) == 1);
65 assert(c.count(2) == 1);
66 assert(c.count(3) == 1);
67 assert(c.count(4) == 1);
70 return 0;