Lumiera  0.pre.03
»edit your freedom«
NumIter< INT > Class Template Reference

#include "lib/iter-adapter.hpp"

Description

template<typename INT>
class lib::NumIter< INT >

Enumerate all "numbers" within a range.

This allows to build pipelines based on all numbers "for `i` from `1...N`". This range is half open, i.e. the start is inclusive and the end point is exclusive.

Remarks
default constructed iters are empty and compare equal with any other exhausted NumIter; essential requirement for a Lumiera Forward Iterator (allows use in range-for-loops).
Template Parameters
INTa number like type, which can be incremented and compared.
Note
deliberately yields by-value and has no operator->

Definition at line 919 of file iter-adapter.hpp.

Public Types

typedef INT * pointer
 
typedef INT & reference
 
typedef INT value_type
 

Public Member Functions

 NumIter (INT start, INT end)
 
template<typename X >
 NumIter (X &&start, X &&end)
 
bool empty () const
 
 ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (NumIter)
 
INT & getEnd () const
 
INT & getPos () const
 access wrapped index elements
 
bool isValid () const
 
 operator bool () const
 
bool operator!= (NumIter const &o) const
 Supporting equality comparisons...
 
value_type operator* () const
 
NumIteroperator++ ()
 
bool operator== (NumIter const &o) const
 

Private Member Functions

void _maybe_throw () const
 

Private Attributes

INT e_
 
INT i_
 
+ Collaboration diagram for NumIter< INT >:

The documentation for this class was generated from the following file: