[#btck-Iterator] = xref:btck.adoc[btck]::Iterator :relfileprefix: ../ :mrdocs: Random‐access iterator that lazily materializes views of a collection by index. == Synopsis Declared in `<kernel/bitcoinkernel_wrapper.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:btck/Iterator/difference_type.adoc[`difference_type`] | Signed distance between iterators. | xref:btck/Iterator/iterator_category.adoc[`iterator_category`] | Iterator category tag. | xref:btck/Iterator/iterator_concept.adoc[`iterator_concept`] | Iterator concept tag. | xref:btck/Iterator/value_type.adoc[`value_type`] | The element type produced on dereference. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:btck/Iterator/2constructor-0dc.adoc[`Iterator`] [.small]#[constructor]# | Constructors | xref:btck/Iterator/operator_star.adoc[`operator*`] | Returns the element at the current index. | xref:btck/Iterator/operator_plus.adoc[`operator+`] | Returns an iterator advanced by `n` positions. | xref:btck/Iterator/operator_inc-01c.adoc[`operator++`] | Increment operators | xref:btck/Iterator/operator_plus_eq.adoc[`operator+=`] | Advances the iterator by `n` positions. | xref:btck/Iterator/operator_minus-03.adoc[`operator‐`] | Subtraction operators | xref:btck/Iterator/operator_dec-02.adoc[`operator‐‐`] | Decrement operators | xref:btck/Iterator/operator_minus_eq.adoc[`operator‐=`] | Rewinds the iterator by `n` positions. | xref:btck/Iterator/operator_subs.adoc[`operator[]`] | Returns the element `n` positions from the current one. | xref:btck/Iterator/operator_eq.adoc[`operator==`] | Tests two iterators for equality. | xref:btck/Iterator/operator_3way.adoc[`operator<=>`] | Orders two iterators by index. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:btck/operator_plus.adoc[btck::operator+]` | Returns an iterator advanced by `n` positions (offset on the left). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#