util/IntrusiveForwardList: add pop_front_and_dispose()

This commit is contained in:
Max Kellermann 2023-09-13 13:41:38 +02:00 committed by Max Kellermann
parent b0da0bbf8b
commit 9fe813e572

View File

@ -200,6 +200,11 @@ public:
return i;
}
void pop_front_and_dispose(Disposer<value_type> auto disposer) noexcept {
auto &i = pop_front();
disposer(&i);
}
class const_iterator;
class iterator final {