util/IntrusiveList: add method erase()
This commit is contained in:
parent
664674913e
commit
4912466d50
@ -312,6 +312,10 @@ public:
|
|||||||
return {&t};
|
return {&t};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void erase(iterator i) noexcept {
|
||||||
|
IntrusiveListHook(*i).unlink();
|
||||||
|
}
|
||||||
|
|
||||||
void push_front(T &t) noexcept {
|
void push_front(T &t) noexcept {
|
||||||
auto &new_node = ToNode(t);
|
auto &new_node = ToNode(t);
|
||||||
head.next->prev = &new_node;
|
head.next->prev = &new_node;
|
||||||
|
Loading…
Reference in New Issue
Block a user