btck::Iterator

Random-access iterator that lazily materializes views of a collection by index.

Synopsis

Declared in <kernel/bitcoinkernel_wrapper.h>

template<
    typename Collection,
    typename ValueType,
    auto GetFunc>
class Iterator;

Description

Dereferencing invokes GetFunc on the collection with the current index, returning a copy (a lightweight view), so the iterator does not hold elements.

Type Aliases

NameDescription
difference_type Signed distance between iterators.
iterator_category Iterator category tag.
iterator_concept Iterator concept tag.
value_type The element type produced on dereference.

Member Functions

NameDescription
Iterator [constructor]Constructors
operator* Returns the element at the current index.
operator+ Returns an iterator advanced by n positions.
operator++ Increment operators
operator+= Advances the iterator by n positions.
operator- Subtraction operators
operator-- Decrement operators
operator-= Rewinds the iterator by n positions.
operator[] Returns the element n positions from the current one.
operator== Tests two iterators for equality.
operator<=> Orders two iterators by index.

Friends

NameDescription
btck::operator+Returns an iterator advanced by n positions (offset on the left).