12 template <
class InputIterator>
15 for (
auto it = first; it != last; ++it)
94 if (_front !=
nullptr)
104 template <
typename T>
107 if (_back !=
nullptr)
112 if (_front ==
nullptr)
117 template <
typename T>
120 item.next = base.next;
124 if (base.next !=
nullptr)
125 base.next->prev = &item;
130 template <
typename T>
134 item.prev = base.prev;
137 if (base.prev !=
nullptr)
138 base.prev->next = &item;
143 template <
typename T>
146 if (_front ==
nullptr)
150 _front = result->next;
151 result->next =
nullptr;
152 result->prev =
nullptr;
153 if (_front ==
nullptr)
156 _front->prev =
nullptr;
161 template <
typename T>
164 if (_back ==
nullptr)
168 _back = result->prev;
169 result->next =
nullptr;
170 result->prev =
nullptr;
171 if (_back ==
nullptr)
174 _back->next =
nullptr;
179 template <
typename T>
183 if (result->next !=
nullptr)
184 result->next->prev = result->prev;
186 _back = result->prev;
187 if (result->prev !=
nullptr)
188 result->prev->next = result->next;
190 _front = result->next;
191 result->next =
nullptr;
192 result->prev =
nullptr;
197 template <
typename T>
200 if (base.next ==
nullptr)
203 T* result = base.next;
204 if (result->next !=
nullptr)
205 result->next->prev = &base;
208 base.next = result->next;
209 result->next =
nullptr;
210 result->prev =
nullptr;
215 template <
typename T>
218 if (base.prev ==
nullptr)
221 T* result = base.prev;
222 if (result->prev !=
nullptr)
223 result->prev->next = &base;
226 base.prev = result->prev;
227 result->next =
nullptr;
228 result->prev =
nullptr;
233 template <
typename T>
241 while (current !=
nullptr)
243 next = current->next;
244 current->next = prev;
245 current->prev = next;
252 template <
typename T>
260 template <
typename T>
264 swap(_size, list._size);
265 swap(_front, list._front);
266 swap(_back, list._back);
269 template <
typename T>
275 template <
typename T>
278 if (_node !=
nullptr)
283 template <
typename T>
291 template <
typename T>
294 assert((_node !=
nullptr) &&
"Iterator must be valid!");
299 template <
typename T>
305 template <
typename T>
309 swap(_node, it._node);
312 template <
typename T>
318 template <
typename T>
321 if (_node !=
nullptr)
326 template <
typename T>
334 template <
typename T>
337 assert((_node !=
nullptr) &&
"Iterator must be valid!");
342 template <
typename T>
348 template <
typename T>
352 swap(_node, it._node);
355 template <
typename T>
361 template <
typename T>
364 if (_node !=
nullptr)
369 template <
typename T>
377 template <
typename T>
380 assert((_node !=
nullptr) &&
"Iterator must be valid!");
385 template <
typename T>
391 template <
typename T>
395 swap(_node, it._node);
398 template <
typename T>
404 template <
typename T>
407 if (_node !=
nullptr)
412 template <
typename T>
420 template <
typename T>
423 assert((_node !=
nullptr) &&
"Iterator must be valid!");
428 template <
typename T>
434 template <
typename T>
438 swap(_node, it._node);
441 template <
typename T>
Intrusive list constant iterator.
const value_type & const_reference
const_pointer operator->() const noexcept
const_reference operator*() const noexcept
const value_type * const_pointer
ListConstIterator & operator++() noexcept
void swap(ListConstIterator &it) noexcept
Swap two instances.
Intrusive list constant reverse iterator.
void swap(ListConstReverseIterator &it) noexcept
Swap two instances.
const_reference operator*() const noexcept
const value_type * const_pointer
const_pointer operator->() const noexcept
ListConstReverseIterator & operator++() noexcept
const value_type & const_reference
Intrusive list container.
const_reverse_iterator crbegin() const noexcept
const_reverse_iterator crend() const noexcept
void push_next(T &base, T &item) noexcept
Push a new item as a next to the given one.
iterator end() noexcept
Get the end list iterator.
void push_back(T &item) noexcept
Push a new item into the back of the list.
reverse_iterator rend() noexcept
Get the reverse end list iterator.
reverse_iterator rbegin() noexcept
Get the reverse begin list iterator.
const_iterator cend() const noexcept
T * pop_back() noexcept
Pop the item from the back of the list.
void push_prev(T &base, T &item) noexcept
Push a new item as a previous to the given one.
T * pop_front() noexcept
Pop the item from the front of the list.
void swap(List &list) noexcept
Swap two instances.
iterator begin() noexcept
Get the begin list iterator.
const_iterator cbegin() const noexcept
T * pop_current(T &base) noexcept
Pop the given item from the list.
T * pop_prev(T &base) noexcept
Pop the previous item of the given one from the list.
void push_front(T &item) noexcept
Push a new item into the front of the list.
void clear() noexcept
Clear the list.
void reverse() noexcept
Reverse the list.
T * pop_next(T &base) noexcept
Pop the next item of the given one from the list.
pointer operator->() noexcept
ListIterator & operator++() noexcept
void swap(ListIterator &it) noexcept
Swap two instances.
reference operator*() noexcept
Intrusive list reverse iterator.
ListReverseIterator & operator++() noexcept
reference operator*() noexcept
pointer operator->() noexcept
void swap(ListReverseIterator &it) noexcept
Swap two instances.
C++ Common project definitions.
void swap(ListConstReverseIterator< T > &it1, ListConstReverseIterator< T > &it2) noexcept
void swap(FileCache &cache1, FileCache &cache2) noexcept