56 static constexpr inline size_t advanceBy(
Self& self,
size_t n) =
delete;
83 using ItemPtr = std::add_pointer_t<std::remove_reference_t<typename Iterator<T>::Item>>;
121 template<
typename TContainer>
struct Source {
125 using Item =
typename TContainer::value_type;
129 using ItemRef =
typename TContainer::reference;
141 typename TContainer::iterator
left;
143 typename TContainer::iterator
right;
152 typename TContainer::const_iterator
left;
154 typename TContainer::const_iterator
right;
243 static constexpr inline size_t skipN([[maybe_unused]]
const TContainer& container,
IteratorState& iter,
size_t n) {
244 size_t skipN = std::min(n,
static_cast<size_t>(std::distance(iter.
left, iter.
right)));
257 size_t skipN = std::min(n,
static_cast<size_t>(std::distance(iter.
left, iter.
right)));
294 size_t skipN = std::min(n,
static_cast<size_t>(std::distance(iter.
left, iter.
right)));
307 size_t skipN = std::min(n,
static_cast<size_t>(std::distance(iter.
left, iter.
right)));
Container that is used to pass elements through CXXIter's iterator pipelines.
Trait namespace. This namespaces contains all public traits that cover all of the iterator's inner wo...
Structure holding the bounds of a CXXIter iterator's estimated length.
Trait, that iterators implement whose elements are stored in a contiguous block of memory.
static constexpr ItemPtr currentPtr(typename trait::Iterator< T >::Self &self)=delete
Get the pointer of the current element.
std::add_pointer_t< std::remove_reference_t< typename Iterator< T >::Item > > ItemPtr
Pointer type to an item of this iterator.
Trait that extends the Iterator trait with double-ended functionality.
static constexpr IterValue< typename Iterator< T >::Item > nextBack(Self &self)=delete
Pull the next last element from the iterator pipeline previous to this pipeline-element.
Trait, that extends iterators for which an exact length is known.
static constexpr size_t size(const typename trait::Iterator< T >::Self &self)=delete
Get the iterator's exact number of elements.
Trait, that is used for the chaining and the operation of iterator pipelines.
static constexpr IterValue< Item > next(Self &self)=delete
Pull one element from the iterator pipeline previous to this pipeline-element.
void Item
Item-Type. This is the type of elements that can be pulled from this pipeline-element.
static constexpr SizeHint sizeHint(const Self &self)=delete
Get the bounds on the remaining length of the iterator pipeline until this pipeline-element,...
static constexpr size_t advanceBy(Self &self, size_t n)=delete
Advance the iterator by n elements.
Type of the state structure stored in CXXIter's source classes, used to keep track of the iteration p...
TContainer::const_iterator left
TContainer::const_iterator right
Type of the state structure stored in CXXIter's source classes, used to keep track of the iteration p...
TContainer::iterator left
TContainer::iterator right
SourceTrait, that is used by CXXIter's standard source classes CXXIter::SrcMov, CXXIter::SrcRef and C...
static constexpr ItemRef next(TContainer &container, IteratorState &iter)
Return the next item in the iteration with the given iter state on the given container.
static constexpr ItemRef nextBack(TContainer &container, IteratorState &iter)
Return the next item from the back of the iteration with the given iter state on the given container.
typename TContainer::value_type Item
Type of the item TContainer holds and provides for the iterator.
static constexpr ItemConstRef next(const TContainer &container, ConstIteratorState &iter)
Return the next item in the iteration with the given iter state on the given container.
static constexpr ItemConstRef nextBack(const TContainer &container, ConstIteratorState &iter)
Return the next item from the back of the iteration with the given iter state on the given container.
static constexpr SizeHint sizeHint(const TContainer &container)
Report a size hint for a source on the given container.
static constexpr size_t skipNBack(const TContainer &container, IteratorState &iter, size_t n)
Skip the next n elements from the back of this iterator.
static constexpr size_t skipN(const TContainer &container, ConstIteratorState &iter, size_t n)
Skip the next n elements from the container.
static constexpr ItemRef peekNext(TContainer &container, IteratorState &iter)
Return the next item in the iteration with the given iter state on the given container,...
static constexpr IteratorState initIterator(TContainer &container)
Return an initial IteratorState instance for iteration on the given container.
static constexpr bool hasNext(TContainer &container, IteratorState &iter)
Checks whether there is a next item in the iteration with the given iter state on the given container...
static constexpr ConstIteratorState initIterator(const TContainer &container)
Return an initial IteratorState instance for iteration on the given container.
static constexpr bool hasNext(const TContainer &container, ConstIteratorState &iter)
Checks whether there is a next item in the iteration with the given iter state on the given container...
static constexpr size_t skipNBack(const TContainer &container, ConstIteratorState &iter, size_t n)
Skip the next n elements from the back of this iterator.
static constexpr size_t skipN(const TContainer &container, IteratorState &iter, size_t n)
Skip the next n elements from the container.
static constexpr ItemConstRef peekNext(const TContainer &container, ConstIteratorState &iter)
Return the next item in the iteration with the given iter state on the given container,...
typename TContainer::reference ItemRef
Type of the item TContainer holds and provides for the iterator, in referenced form.
typename TContainer::const_reference ItemConstRef
Type of the item TContainer holds and provides for the iterator, in const referenced form.