util/IntrusiveList: add postfix operator++
This commit is contained in:

committed by
Max Kellermann

parent
57673136d8
commit
e2abade6aa
@@ -382,6 +382,12 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto operator++(int) noexcept {
|
||||||
|
auto old = *this;
|
||||||
|
cursor = cursor->next;
|
||||||
|
return old;
|
||||||
|
}
|
||||||
|
|
||||||
auto &operator--() noexcept {
|
auto &operator--() noexcept {
|
||||||
cursor = cursor->prev;
|
cursor = cursor->prev;
|
||||||
return *this;
|
return *this;
|
||||||
@@ -447,6 +453,12 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto operator++(int) noexcept {
|
||||||
|
auto old = *this;
|
||||||
|
cursor = cursor->next;
|
||||||
|
return old;
|
||||||
|
}
|
||||||
|
|
||||||
auto &operator--() noexcept {
|
auto &operator--() noexcept {
|
||||||
cursor = cursor->prev;
|
cursor = cursor->prev;
|
||||||
return *this;
|
return *this;
|
||||||
|
Reference in New Issue
Block a user