Dune Core Modules (unstable)

Dune::IteratorRange< Iterator > Class Template Reference

Simple range between a begin and an end iterator. More...

#include <dune/common/iteratorrange.hh>

Public Types

typedef Iterator iterator
 The iterator belonging to this range.
 
typedef Iterator const_iterator
 The iterator belonging to this range. More...
 

Public Member Functions

 IteratorRange (const Iterator &begin, const Iterator &end)
 Constructs an iterator range on [begin,end).
 
 IteratorRange ()
 Default constructor, relies on iterators being default-constructible.
 
iterator begin () const
 Returns an iterator pointing to the begin of the range.
 
iterator end () const
 Returns an iterator pointing past the end of the range.
 

Detailed Description

template<typename Iterator>
class Dune::IteratorRange< Iterator >

Simple range between a begin and an end iterator.

IteratorRange is mainly useful as a lightweight adaptor class when adding support for range-based for loops to existing containers that lack a standard begin(), end() pair of member functions.

Template Parameters
IteratorThe type of iterator

Member Typedef Documentation

◆ const_iterator

template<typename Iterator >
typedef Iterator Dune::IteratorRange< Iterator >::const_iterator

The iterator belonging to this range.

This typedef is here mainly for compatibility reasons.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  generated with Hugo v0.69.0 (Mar 7, 23:27, 2021)