Restore correct rowset_iterator post-increment operator

This operator needs to be defined to satisfy weakly_incrementable
concept required for input iterators, but it can be implemented to do
the same thing as pre-increment and, crucially, not return anything, as
doing this wouldn't make sense here because we can't preserve a copy of
the iterator before the increment.

See #1327.
This commit is contained in:
Vadim Zeitlin
2026-06-18 17:04:00 +02:00
parent a9bd7bd8d2
commit 38f6efb7ec

View File

@@ -58,8 +58,7 @@ public:
return &(operator*());
}
// Iteration operator: as this is an input operator, it only supports
// pre-increment
// Iteration operators
rowset_iterator & operator++()
{
@@ -75,6 +74,14 @@ public:
return (*this);
}
void operator++(int)
{
// This type is an input iterator and only satisfies "weakly
// incrementable" requirement, so we don't have to return the previous
// value which wouldn't make sense for it.
++(*this);
}
// Comparison operators
bool operator==(rowset_iterator const & rhs) const