Dune Core Modules (unstable)

Dune::DefaultIteratorTraits< IteratorCategory, Reference, DifferenceType > Struct Template Reference

An iterator_traits class providing sensible defaults. More...

#include <dune/common/iteratorfacades.hh>

Detailed Description

template<class IteratorCategory, class Reference, class DifferenceType = std::ptrdiff_t>
struct Dune::DefaultIteratorTraits< IteratorCategory, Reference, DifferenceType >

An iterator_traits class providing sensible defaults.

Template Parameters
IteratorCategoryCategory of the iterator, e.g. std::forward_iterator_tag
ReferenceReference type returns when dereferencing the iterator

This provides default types for value_type, pointer, and difference_type that should work for most iterator implementations including proxy iterators where the proxy types implement the Dune::AutonomousValue mechanism. The value_type is derived as Dune::AutonomousValue<reference>. The pointer type is a plain value_type* pointer if the reference is an l-value reference. Otherwise Dune::ProxyArrowResult<reference> is used to provide a suitable return type for operator-> for proxies.


The documentation for this struct was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Aug 31, 22:39, 2025)