Commit 946b3c1f authored by Max Kellermann's avatar Max Kellermann

util/IntrusiveList: add method erase_and_dispose()

parent a0dc398f
......@@ -325,6 +325,13 @@ public:
return result;
}
template<typename D>
iterator erase_and_dispose(iterator i, D &&disposer) noexcept {
auto result = erase(i);
disposer(&*i);
return result;
}
void push_front(T &t) noexcept {
insert(begin(), t);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment