util/IntrusiveList: add method erase()

This commit is contained in:
Max Kellermann 2021-02-17 20:19:19 +01:00
parent 664674913e
commit 4912466d50

View File

@ -312,6 +312,10 @@ public:
return {&t};
}
void erase(iterator i) noexcept {
IntrusiveListHook(*i).unlink();
}
void push_front(T &t) noexcept {
auto &new_node = ToNode(t);
head.next->prev = &new_node;