We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec449af commit 9d831efCopy full SHA for 9d831ef
1 file changed
src/snapshots/ContainerImpls.cpp
@@ -352,14 +352,14 @@ RandomAccessIteratorContainer &RandomAccessIteratorContainer::operator=(
352
auto RandomAccessIteratorContainer::currentIteration() const
353
-> std::optional<value_type const *>
354
{
355
- if (auto begin = m_cont.begin(); begin != m_cont.end())
+ for (auto begin = m_cont.rbegin(); begin != m_cont.rend(); ++begin)
356
357
- return std::make_optional<value_type const *>(&*begin);
358
- }
359
- else
360
- {
361
- return std::nullopt;
+ if (!begin->second.closed())
+ {
+ return std::make_optional<value_type const *>(&*begin);
+ }
362
}
+ return std::nullopt;
363
364
365
auto RandomAccessIteratorContainer::begin() -> iterator
0 commit comments