1 #include <string>
2 #ifdef _LIBCPP_INLINE_VISIBILITY
3 #undef _LIBCPP_INLINE_VISIBILITY
4 #endif
5 #define _LIBCPP_INLINE_VISIBILITY
6 #include <map>
7
8 #define intint_map std::multimap<int, int>
9 #define strint_map std::multimap<std::string, int>
10 #define intstr_map std::multimap<int, std::string>
11 #define strstr_map std::multimap<std::string, std::string>
12
13 int g_the_foo = 0;
14
thefoo_rw(int arg=1)15 int thefoo_rw(int arg = 1)
16 {
17 if (arg < 0)
18 arg = 0;
19 if (!arg)
20 arg = 1;
21 g_the_foo += arg;
22 return g_the_foo;
23 }
24
main()25 int main()
26 {
27 intint_map ii;
28
29 ii.emplace(0,0); // Set break point at this line.
30 ii.emplace(1,1);
31 thefoo_rw(1); // Set break point at this line.
32 ii.emplace(2,0);
33 ii.emplace(3,1);
34 thefoo_rw(1); // Set break point at this line.
35 ii.emplace(4,0);
36 ii.emplace(5,1);
37 ii.emplace(6,0);
38 ii.emplace(7,1);
39 thefoo_rw(1); // Set break point at this line.
40 ii.emplace(85,1234567);
41
42 ii.clear();
43
44 strint_map si;
45 thefoo_rw(1); // Set break point at this line.
46
47 si.emplace("zero",0);
48 thefoo_rw(1); // Set break point at this line.
49 si.emplace("one",1);
50 si.emplace("two",2);
51 si.emplace("three",3);
52 thefoo_rw(1); // Set break point at this line.
53 si.emplace("four",4);
54
55 si.clear();
56 thefoo_rw(1); // Set break point at this line.
57
58 intstr_map is;
59 thefoo_rw(1); // Set break point at this line.
60 is.emplace(85,"goofy");
61 is.emplace(1,"is");
62 is.emplace(2,"smart");
63 is.emplace(3,"!!!");
64 thefoo_rw(1); // Set break point at this line.
65
66 is.clear();
67 thefoo_rw(1); // Set break point at this line.
68
69 strstr_map ss;
70 thefoo_rw(1); // Set break point at this line.
71
72 ss.emplace("ciao","hello");
73 ss.emplace("casa","house");
74 ss.emplace("gatto","cat");
75 thefoo_rw(1); // Set break point at this line.
76 ss.emplace("a Mac..","..is always a Mac!");
77
78 ss.clear();
79 thefoo_rw(1); // Set break point at this line.
80 return 0;
81 }