Skip to content
Snippets Groups Projects
Commit 72404890 authored by Steffen Müthing's avatar Steffen Müthing
Browse files

[Release] Merge branch 'feature/FS1683-improve-iteratorrange'

* feature/FS1683-improve-iteratorrange:
  [IteratorRange][Release] Make IteratorRange default-constructible and copyable
parents f6ab9f0f 2c9596f9
No related branches found
No related tags found
No related merge requests found
......@@ -23,12 +23,22 @@ namespace Dune {
//! The iterator belonging to this range.
typedef Iterator iterator;
//! The iterator belonging to this range.
/**
* This typedef is here mainly for compatibility reasons.
*/
typedef Iterator const_iterator;
//! Constructs an iterator range on [begin,end).
IteratorRange(const Iterator& begin, const Iterator& end)
: _begin(begin)
, _end(end)
{}
//! Default constructor, relies on iterators being default-constructible.
IteratorRange()
{}
//! Returns an iterator pointing to the begin of the range.
iterator begin() const
{
......@@ -43,8 +53,8 @@ namespace Dune {
private:
const Iterator _begin;
const Iterator _end;
Iterator _begin;
Iterator _end;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment