From b35e8a588fa8ba4096db3537569fa2497916441f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 6 Sep 2023 15:28:41 +0200 Subject: [PATCH] util/IntrusiveForwardList: add operator++(int) --- src/util/IntrusiveForwardList.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/util/IntrusiveForwardList.hxx b/src/util/IntrusiveForwardList.hxx index d80cf78c1..09e852dbe 100644 --- a/src/util/IntrusiveForwardList.hxx +++ b/src/util/IntrusiveForwardList.hxx @@ -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 {