1 #include <list>
2 #include <string>
3 
4 typedef std::list<int> int_list;
5 typedef std::list<std::string> string_list;
6 
7 
by_ref_and_ptr(T & ref,T * ptr)8 template <typename T> void by_ref_and_ptr(T &ref, T *ptr) {
9   // Check ref and ptr
10   return;
11 }
12 
main()13 int main()
14 {
15     int_list numbers_list;
16 
17     numbers_list.push_back(0x12345678); // Set break point at this line.
18     numbers_list.push_back(0x11223344);
19     numbers_list.push_back(0xBEEFFEED);
20     numbers_list.push_back(0x00ABBA00);
21     numbers_list.push_back(0x0ABCDEF0);
22     numbers_list.push_back(0x0CAB0CAB);
23 
24     numbers_list.clear();
25 
26     numbers_list.push_back(1);
27     numbers_list.push_back(2);
28     numbers_list.push_back(3);
29     numbers_list.push_back(4);
30 
31     by_ref_and_ptr(numbers_list, &numbers_list);
32 
33     string_list text_list;
34     text_list.push_back(std::string("goofy")); // Optional break point at this line.
35     text_list.push_back(std::string("is"));
36     text_list.push_back(std::string("smart"));
37     text_list.push_back(std::string("!!!"));
38 
39     by_ref_and_ptr(text_list, &text_list);
40 
41     return 0; // Set final break point at this line.
42 }
43 
44