31#ifndef SRC_LIB_INDEX_ITER_H
32#define SRC_LIB_INDEX_ITER_H
45 template<
typename PTR>
79 and idx <
data_->size();
91 return not (c1 == c2);
111 template<
class CON,
typename PTR = CON*>
113 :
public iter::IndexAccessCore<PTR>::IterWrapper
115 using _Cor = iter::IndexAccessCore<PTR>;
116 using _Par = _Cor::IterWrapper;
129 _Par::__throw_if_empty();
130 return _Par::stateCore().idx_;
136 auto& core = _Par::stateCore();
137 if (not core.isValidIDX (newIDX))
139 lumiera::error::LUMIERA_ERROR_INDEX_BOUNDS);
Subscript-index based access to a container, packaged as iterator.
void setIDX(size_t newIDX)
IndexIter(CON &container)
IndexIter(PTR pContainer)
iter::IndexAccessCore< PTR > _Cor
Another Lumiera Forward Iterator building block, based on incorporating a state type as »*State Core*...
Helper template(s) for creating Lumiera Forward Iterators.
Implementation namespace for support and library code.
LumieraError< LERR_(INVALID)> Invalid
Implementation of a »IterStateCore« to access the container through an embedded index variable.
bool isValidIDX(size_t idx) const
meta::RefTraits< ResVal >::Value value_type
decltype(data_->operator[](0)) ResVal
friend bool operator==(IndexAccessCore const &c1, IndexAccessCore const &c2)
friend bool operator!=(IndexAccessCore const &c1, IndexAccessCore const &c2)
meta::RefTraits< ResVal >::Reference reference