18 std::is_same<
decltype(T::prev), T*>::value,
"T->prev must be a T*");
20 std::is_same<
decltype(T::next), T*>::value,
"T->next must be a T*");
54 return head ==
nullptr;
114 item->next =
nullptr;
133 if (item->next !=
nullptr)
134 item->next->prev = item->prev;
138 if (item->prev !=
nullptr)
139 item->prev->next = item->next;
150 while (head !=
nullptr)
171 assert(curr !=
nullptr);
185 while (curr !=
nullptr)
187 assert(curr != item);
201 while (item !=
nullptr)
203 assert(item->prev == prev);
void insert(T *item)
Definition dl_list.h:87
void debug_check_contains(T *item)
Definition dl_list.h:163
void debug_check_not_contains(T *item)
Definition dl_list.h:179
T * pop()
Definition dl_list.h:67
void remove(T *item)
Definition dl_list.h:127
void insert_back(T *item)
Definition dl_list.h:107
T * get_tail()
Definition dl_list.h:62
void clear()
Definition dl_list.h:148
T * get_head()
Definition dl_list.h:57
void debug_check()
Definition dl_list.h:195
~DLList()
Definition dl_list.h:37
DLList & operator=(DLList &&o) noexcept
Definition dl_list.h:42
DLList(DLList &&o) noexcept
Definition dl_list.h:28
bool is_empty()
Definition dl_list.h:52
T * pop_tail()
Definition dl_list.h:77