CXXIter 0.2
|
Trait, that is used for the chaining and the operation of iterator pipelines. More...
#include <Traits.h>
Public Types | |
using | Self = trait::Iterator< T > |
Self-Type. This is the type of the struct for which the trait::Iterator is being specialized. More... | |
using | Item = void |
Item-Type. This is the type of elements that can be pulled from this pipeline-element. More... | |
Static Public Member Functions | |
static constexpr IterValue< Item > | next (Self &self)=delete |
Pull one element from the iterator pipeline previous to this pipeline-element. More... | |
static constexpr SizeHint | sizeHint (const Self &self)=delete |
Get the bounds on the remaining length of the iterator pipeline until this pipeline-element, estimated from the source and all of the chained iterations until after this pipeline-element. More... | |
static constexpr size_t | advanceBy (Self &self, size_t n)=delete |
Advance the iterator by n elements. More... | |
Trait, that is used for the chaining and the operation of iterator pipelines.
This allows making any class or struct iterable, to be able to interact with CXXIter's iterator pipelines. It essentially provides two functions:
CXXIter::trait::Iterator
using CXXIter::trait::Iterator< T >::Item = void |
using CXXIter::trait::Iterator< T >::Self = trait::Iterator<T> |
Self-Type. This is the type of the struct for which the trait::Iterator is being specialized.
|
inlinestaticconstexprdelete |
Advance the iterator by n elements.
If possible, this should be forwarded to the previous pipeline element, because then the pipeline source has the possibility to implement this as a O(1) operation, if supported.
n | The amount of elements to advance the iterator by. |
n
elements remaining)
|
inlinestaticconstexprdelete |
Pull one element from the iterator pipeline previous to this pipeline-element.
self | Reference to the instance of the class for which trait::Iterator is being specialized. |
|
inlinestaticconstexprdelete |
Get the bounds on the remaining length of the iterator pipeline until this pipeline-element, estimated from the source and all of the chained iterations until after this pipeline-element.