iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::IteratorRange< IteratorType > Class Template Reference

#include <nrt/Core/Design/IteratorRange.H>

template<class IteratorType>
class nrt::IteratorRange< IteratorType >

A rudimentary implementation of an iterator range.

Iterator ranges are a currently under discussion addition to C++, which can be followed here in detail:

Two example implementations can be found at and

This range class presented here is a lightweight wrapper for two iterators that offers easy use with range based for loops introduced in C++11.

Template Parameters
IteratorTypeThe type of the iterator to wrap up

Definition at line 52 of file IteratorRange.H.

Public Types

typedef std::iterator_traits
< IteratorType >
typedef std::iterator_traits
< IteratorType >::value_type 
typedef std::iterator_traits
< IteratorType >
typedef std::iterator_traits
< IteratorType >::reference 
typedef std::iterator_traits
< IteratorType >::pointer 

Public Member Functions

 IteratorRange ()
 Create an empty, likely invalid range.
 IteratorRange (IteratorType &&begin, IteratorType &&end)
 Create a range from two iterators.
 IteratorRange (IteratorRange const &other)=default
 Copy construction.
 IteratorRange (IteratorRange &&other)=default
 Move construction.
IteratorRangeoperator= (IteratorRange const &other)=default
 Copy assignment.
IteratorRangeoperator= (IteratorRange &&other)=default
 Move assignment.
IteratorType begin () const
 Get the begin iterator.
IteratorType end () const
 Get the end iterator.

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