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

source code of lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/main.cpp