util/IntrusiveForwardList: add operator++(int)

This commit is contained in:
Max Kellermann 2023-09-06 15:28:41 +02:00 committed by Max Kellermann
parent 6c48f5ac63
commit b35e8a588f
1 changed files with 12 additions and 0 deletions

View File

@ -232,6 +232,12 @@ public:
cursor = cursor->next;
return *this;
}
iterator operator++(int) noexcept {
auto old = *this;
cursor = cursor->next;
return old;
}
};
constexpr iterator before_begin() noexcept {
@ -286,6 +292,12 @@ public:
cursor = cursor->next;
return *this;
}
const_iterator operator++(int) noexcept {
auto old = *this;
cursor = cursor->next;
return old;
}
};
constexpr const_iterator begin() const noexcept {