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::map<int, int> 9 #define strint_map std::map<std::string, int> 10 #define intstr_map std::map<int, std::string> 11 #define strstr_map std::map<std::string, std::string> 12 13 int g_the_foo = 0; 14 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 25 int main() 26 { 27 intint_map ii; 28 29 ii[0] = 0; // Set break point at this line. 30 ii[1] = 1; 31 thefoo_rw(1); // Set break point at this line. 32 ii[2] = 0; 33 ii[3] = 1; 34 thefoo_rw(1); // Set break point at this line. 35 ii[4] = 0; 36 ii[5] = 1; 37 ii[6] = 0; 38 ii[7] = 1; 39 thefoo_rw(1); // Set break point at this line. 40 ii[85] = 1234567; 41 42 ii.clear(); 43 44 strint_map si; 45 thefoo_rw(1); // Set break point at this line. 46 47 si["zero"] = 0; 48 thefoo_rw(1); // Set break point at this line. 49 si["one"] = 1; 50 si["two"] = 2; 51 si["three"] = 3; 52 thefoo_rw(1); // Set break point at this line. 53 si["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[85] = "goofy"; 61 is[1] = "is"; 62 is[2] = "smart"; 63 is[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["ciao"] = "hello"; 73 ss["casa"] = "house"; 74 ss["gatto"] = "cat"; 75 thefoo_rw(1); // Set break point at this line. 76 ss["a Mac.."] = "..is always a Mac!"; 77 78 ss.clear(); 79 thefoo_rw(1); // Set break point at this line. 80 return 0; 81 }