This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
/
cpp-deque.json
171 lines (165 loc) · 6.53 KB
/
cpp-deque.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
"id": "cpp_deque_cheat_sheet",
"name": "C++ Deque",
"description": "C++ <deque> is an indexed sequence container that allows fast insertion and deletion at both its beginning and its end",
"metadata": {
"sourceName": "cplusplus.com",
"sourceUrl" : "http://www.cplusplus.com/reference/deque/deque/"
},
"aliases": [
"c++ deque",
"c++ double ended queue",
"cpp double ended queue"
],
"template_type": "terminal",
"section_order": [
"Iterators",
"Capacity",
"Element Access",
"Modifiers",
"Allocator",
"Function Overloads"
],
"sections": {
"Iterators": [
{
"key": "deque.begin()",
"val": "Returns an iterator pointing to the first element in the deque container"
},
{
"key": "deque.end()",
"val": "Returns an iterator referring to the past-the-end element in the deque container"
},
{
"key": "deque.rbegin()",
"val": "Returns a reverse iterator pointing to the last element in the container"
},
{
"key": "deque.rend()",
"val": "Returns a reverse iterator pointing to the theoretical element preceding the first element in the deque container"
},
{
"key": "deque.cbegin()",
"val": "Returns a const_iterator pointing to the first element in the container (C++ 11 only)"
},
{
"key": "deque.cend()",
"val": "Returns a const_iterator pointing to the past-the-end element in the container (C++11 only)"
},
{
"key": "deque.crbegin()",
"val": "Returns a const_reverse_iterator pointing to the last element in the container (C++11 only)"
},
{
"key": "deque.crend()",
"val": "Returns a const_reverse_iterator pointing to the theoretical element preceding the first element in the container (C++11 only)"
}
],
"Capacity": [
{
"key": "deque.size()",
"val": "Returns the number of elements in the deque container"
},
{
"key": "deque.max_size()",
"val": "Returns the maximum number of elements that the deque container can hold"
},
{
"key": "deque.resize()",
"val": "Resizes the container so that it contains n elements"
},
{
"key": "deque.empty()",
"val": "Returns whether the deque container is empty"
},
{
"key": "deque.shrink_to_fit()",
"val": "Requests the container to reduce its memory usage to fit its size (C++11 only)"
}
],
"Element Access": [
{
"key": "deque[i]",
"val": "Returns a reference to the element at position n in the deque container"
},
{
"key": "deque.at(i)",
"val": "Returns a reference to the element at position n in the deque container object"
},
{
"key": "deque.front()",
"val": "Returns a reference to the first element in the deque container"
},
{
"key": "deque.back()",
"val": "Returns a reference to the last element in the container"
}
],
"Modifiers": [
{
"key": "deque.assign(5, 'a')",
"val": "Assigns new contents to the deque container, replacing its current contents, and modifying its size accordingly"
},
{
"key": "deque.push_back(x)",
"val": "Adds a new element at the end of the deque container, after its current last element"
},
{
"key": "deque.push_front(x)",
"val": "Inserts a new element at the beginning of the deque container, right before its current first element"
},
{
"key": "deque.pop_back()",
"val": "Removes the last element in the deque container, effectively reducing the container size by one"
},
{
"key": "deque.pop_front()",
"val": "Removes the first element in the deque container, effectively reducing its size by one"
},
{
"key": "deque.insert(it,10)",
"val": "Inserts elements at the specified location in the container"
},
{
"key": "deque.erase (deque.begin()+5)",
"val": "Removes from the deque container either a single element (position) or a range of elements ([first,last))"
},
{
"key": "first.swap(second)",
"val": "Exchanges the content of the container by the content of x, which is another deque object containing elements of the same type"
},
{
"key": "deque.clear()",
"val": "Removes all elements from the deque (which are destroyed), leaving the container with a size of 0"
},
{
"key": "deque.emplace(it, x)",
"val": "The container is extended by inserting a new element at position (C++11 only)"
},
{
"key": "deque.emplace_front(x)",
"val": "Inserts a new element at the beginning of the deque, right before its current first element (C++11 only)"
},
{
"key": "deque.emplace_back(x)",
"val": "Inserts a new element at the end of the deque, right after its current last element (C++11 only)"
}
],
"Allocator": [
{
"key": "deque.get_allocator()",
"val": "Returns a copy of the allocator object associated with the deque object"
}
],
"Function Overloads": [
{
"key": "Operators: ==, !=, <, <=, >, >=",
"val": "Performs the appropriate comparison operation between the deque containers lhs and rhs"
},
{
"key": "swap(x, y)",
"val": "Contents of container x are exchanged with those of y"
}
]
}
}