util/IntrusiveList: add insert_after()

This commit is contained in:
Max Kellermann 2023-07-21 13:16:32 +02:00 committed by Max Kellermann
parent f1b497fb0c
commit 91437d9e63
1 changed files with 7 additions and 0 deletions

View File

@ -507,6 +507,13 @@ public:
++counter;
}
/**
* Like insert(), but insert after the given position.
*/
void insert_after(iterator p, reference t) noexcept {
insert(std::next(p), t);
}
/**
* Move one item of the given list to this one before the
* given position.