1 #include <string> 2 #ifdef _LIBCPP_INLINE_VISIBILITY 3 #undef _LIBCPP_INLINE_VISIBILITY 4 #endif 5 #define _LIBCPP_INLINE_VISIBILITY 6 #include <set> 7 8 typedef std::multiset<int> intset; 9 typedef std::multiset<std::string> stringset; 10 11 int g_the_foo = 0; 12 13 int thefoo_rw(int arg = 1) 14 { 15 if (arg < 0) 16 arg = 0; 17 if (!arg) 18 arg = 1; 19 g_the_foo += arg; 20 return g_the_foo; 21 } 22 23 int main() 24 { 25 intset ii; 26 thefoo_rw(1); // Set break point at this line. 27 28 ii.insert(0); 29 ii.insert(1); 30 ii.insert(2); 31 ii.insert(3); 32 ii.insert(4); 33 ii.insert(5); 34 thefoo_rw(1); // Set break point at this line. 35 36 ii.insert(6); 37 thefoo_rw(1); // Set break point at this line. 38 39 ii.clear(); 40 thefoo_rw(1); // Set break point at this line. 41 42 stringset ss; 43 thefoo_rw(1); // Set break point at this line. 44 45 ss.insert("a"); 46 ss.insert("a very long string is right here"); 47 thefoo_rw(1); // Set break point at this line. 48 49 ss.insert("b"); 50 ss.insert("c"); 51 thefoo_rw(1); // Set break point at this line. 52 53 ss.erase("b"); 54 thefoo_rw(1); // Set break point at this line. 55 56 return 0; 57 } 58