ModErn Text Analysis
META Enumerates Textual Applications
|
Implements a range that spans a loop's extension and termination conditions, most useful for iterating over a range of numbers with a range-based for loop. More...
#include <range.h>
Classes | |
class | iterator_t |
Iterator to traverse the generic range. More... | |
Public Types | |
using | iterator = iterator_t< std::plus< T >> |
the iterator for the range class | |
using | const_iterator = iterator |
the const_iterator for the range class (same as the iterator) | |
using | reverse_iterator = iterator_t< std::minus< T >> |
the reverse_iterator for the range class | |
using | const_reverse_iterator = reverse_iterator |
the const_reverse_iterator for the range class | |
Public Member Functions | |
iterator | begin () const |
iterator | end () const |
reverse_iterator | rbegin () const |
reverse_iterator | rend () const |
basic_range (const T &begin, const T &end, const T &step) | |
Constructs a range. More... | |
basic_range (const basic_range &)=default | |
basic_range (basic_range &&)=default | |
basic_range & | operator= (const basic_range &)=default |
basic_range & | operator= (basic_range &&)=default |
~basic_range ()=default | |
Defaulted destructor. | |
Public Attributes | |
friend | iterator |
friend | reverse_iterator |
Private Attributes | |
T | _begin |
the beginning value for the range | |
T | _end |
the ending value for the range | |
size_t | _num |
the number of values contained in the range | |
T | _step |
the step size of the range | |
Implements a range that spans a loop's extension and termination conditions, most useful for iterating over a range of numbers with a range-based for loop.
|
inline |
Constructs a range.
begin | The starting value for the range |
end | The ending value for the range |
step | The step size of the range |
|
inline |
|
inline |
|
inline |
|
inline |