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

Detects Aleph iterators that opted in to random-access promotion. More...

#include <ah-iterator.H>

Concept definition

template<class I>
concept AlephRandomAccessItor = requires { typename I::aleph_random_access_iterator; } and
std::same_as<typename I::aleph_random_access_iterator, I> and
requires(I &it, const I &cit, long n) {
{ cit.get_pos() } -> std::convertible_to<long>;
it.set_pos(n);
it.prev();
}
Detects Aleph iterators that opted in to random-access promotion.
Definition ah-iterator.H:73

Detailed Description

Detects Aleph iterators that opted in to random-access promotion.

An underlying Aleph iterator I qualifies only when it:

  • declares the self-referential marker aleph_random_access_iterator == I (so derived iterators that reuse a base iterator without redefining positioning consistently do NOT inherit the promotion), and
  • exposes the logical-position interface get_pos() / set_pos() together with backward movement prev().

Definition at line 73 of file ah-iterator.H.