DUNE PDELab (unstable)
Dune::IteratorRange< Iterator, Sentinel > 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 Sentinel | sentinel |
| 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 Sentinel &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. | |
| sentinel | end () const |
| Returns an iterator pointing past the end of the range. | |
Detailed Description
template<typename Iterator, typename Sentinel = Iterator>
class Dune::IteratorRange< Iterator, Sentinel >
class Dune::IteratorRange< Iterator, Sentinel >
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.
This supports to use a different type for the end iterator (a so called sentinel).
- Template Parameters
-
Iterator The type of iterator Sentinel The type of the end iterator (default=Iterator)
Member Typedef Documentation
◆ const_iterator
template<typename Iterator , typename Sentinel = Iterator>
| typedef Iterator Dune::IteratorRange< Iterator, Sentinel >::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:
- dune/common/iteratorrange.hh
|
Legal Statements / Impressum |
Hosted by TU Dresden & Uni Heidelberg |
generated with Hugo v0.111.3
(Nov 2, 23:43, 2025)