From e2abade6aa69a4537b56a733a8806c23afe8ecab Mon Sep 17 00:00:00 2001
From: Max Kellermann <mk@cm4all.com>
Date: Thu, 1 Dec 2022 16:29:47 +0100
Subject: [PATCH] util/IntrusiveList: add postfix operator++

---
 src/util/IntrusiveList.hxx | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/util/IntrusiveList.hxx b/src/util/IntrusiveList.hxx
index 0006d190a..183e98c93 100644
--- a/src/util/IntrusiveList.hxx
+++ b/src/util/IntrusiveList.hxx
@@ -382,6 +382,12 @@ public:
 			return *this;
 		}
 
+		auto operator++(int) noexcept {
+			auto old = *this;
+			cursor = cursor->next;
+			return old;
+		}
+
 		auto &operator--() noexcept {
 			cursor = cursor->prev;
 			return *this;
@@ -447,6 +453,12 @@ public:
 			return *this;
 		}
 
+		auto operator++(int) noexcept {
+			auto old = *this;
+			cursor = cursor->next;
+			return old;
+		}
+
 		auto &operator--() noexcept {
 			cursor = cursor->prev;
 			return *this;