Skip to content
Snippets Groups Projects

Add sentinel support to IteratorRange

Merged Carsten Gräser requested to merge feature/iteratorrange-with-sentinel into master
  1. Mar 03, 2025
    • Carsten Gräser's avatar
      Adjust private varaible name to style guide · 2dcd75e5
      Carsten Gräser authored
      Our style guide suggests to use names ending
      with an underscore for private members.
      2dcd75e5
    • Carsten Gräser's avatar
      Add sentinel support to IteratorRange · 21d79b95
      Carsten Gräser authored
      As of C++20, range based `for` supports that the end
      iterator has a different type. This allows to implement
      so called sentinels tagging the end. This can make it
      simpler and more efficient to implement ranges where
      it's not straight forward to get the end in O(1) or
      where comparing real iterators is expensive.
      To support this approach, this adds support for using a
      different type for the end iterator to `Dune::IteratorRange`.
      21d79b95
Loading