Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::AlephIterator Concept Reference

An Aleph cursor-style iterator, as generic library code uses it. More...

#include <ah-concepts.H>

Concept definition

template<typename It>
requires(It & it)
{
static_cast<bool>(it.has_curr());
it.get_curr();
it.next_ne();
}
Generic filter iterator wrapper.
An Aleph cursor-style iterator, as generic library code uses it.

Detailed Description

An Aleph cursor-style iterator, as generic library code uses it.

On a non-const iterator (as loops hold it), has_curr() tells whether it is positioned on an item, get_curr() yields that item and next_ne() advances. get_curr() is not required on a const iterator: the chained hash tables' iterators only offer a non-const one, which hands out the mutable bucket. Generic loops always advance under a has_curr() guard, for (auto it = c.get_it(); it.has_curr(); it.next_ne()), which is exactly when the unchecked next_ne() is correct. The checked next() remains part of the iterators' API for code that advances without that guard, but generic code does not need it, so it is not required here.

Template Parameters
Itcandidate iterator type.

Definition at line 290 of file ah-concepts.H.