31 #ifndef SRC_LIB_INDEX_ITER_H 32 #define SRC_LIB_INDEX_ITER_H 45 template<
typename PTR>
51 using ResVal = decltype(data_->operator[](0));
53 using value_type =
typename meta::RefTraits<ResVal>::Value;
54 using reference =
typename meta::RefTraits<ResVal>::Reference;
59 return isValidIDX(idx_);
65 return (*data_)[idx_];
76 isValidIDX (
size_t idx)
const 79 and idx < data_->size();
87 return c1.data_ == c2.data_ and (not c1.data_ or c1.idx_ == c2.idx_);
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 =
typename _Cor::IterWrapper;
122 : _Par{_Cor{pContainer, 0}}
129 _Par::__throw_if_empty();
130 return _Par::stateCore().idx_;
134 setIDX (
size_t newIDX)
136 auto& core = _Par::stateCore();
137 if (not core.isValidIDX (newIDX))
139 lumiera::error::LUMIERA_ERROR_INDEX_BOUNDS);
Helper template(s) for creating Lumiera Forward Iterators.
Implementation namespace for support and library code.
Derived specific exceptions within Lumiera's exception hierarchy.
Another Lumiera Forward Iterator building block, based on incorporating a state type as »*State Core*...
Subscript-index based access to a container, packaged as iterator.
Implementation of a »IterStateCore« to access the container through an embedded index variable...