18 std::is_same_v<
decltype(T::prev), T*>,
"T->prev must be a T*");
20 std::is_same_v<
decltype(T::next), T*>,
"T->next must be a T*");
51 return head ==
nullptr;
119 item->next =
nullptr;
142 if (item->next !=
nullptr)
144 item->next->prev = item->prev;
151 if (item->prev !=
nullptr)
153 item->prev->next = item->next;
167 while (head !=
nullptr)
188 assert(curr !=
nullptr);
202 while (curr !=
nullptr)
204 assert(curr != item);
218 while (item !=
nullptr)
220 assert(item->prev == prev);
void insert(T *item)
Definition dl_list.h:88
void debug_check_contains(T *item)
Definition dl_list.h:180
void debug_check_not_contains(T *item)
Definition dl_list.h:196
T * pop()
Definition dl_list.h:64
void remove(T *item)
Definition dl_list.h:136
void insert_back(T *item)
Definition dl_list.h:112
T * get_tail()
Definition dl_list.h:59
void clear()
Definition dl_list.h:165
T * get_head()
Definition dl_list.h:54
void debug_check()
Definition dl_list.h:212
~DLList()
Definition dl_list.h:34
DLList & operator=(DLList &&o) noexcept
Definition dl_list.h:39
DLList(DLList &&o) noexcept
Definition dl_list.h:28
bool is_empty()
Definition dl_list.h:49
T * pop_tail()
Definition dl_list.h:76