|
dune-common 2.11
|
An iterator_traits class providing sensible defaults. More...
#include <dune/common/iteratorfacades.hh>
Public Types | |
| using | iterator_category = IteratorCategory |
| using | reference = Reference |
| using | value_type = Dune::AutonomousValue<reference> |
| using | pointer = std::conditional_t<std::is_lvalue_reference_v<reference>, value_type*, Dune::ProxyArrowResult<reference>> |
| using | difference_type = DifferenceType |
An iterator_traits class providing sensible defaults.
| IteratorCategory | Category of the iterator, e.g. std::forward_iterator_tag |
| Reference | Reference 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.
| using Dune::DefaultIteratorTraits< IteratorCategory, Reference, DifferenceType >::difference_type = DifferenceType |
| using Dune::DefaultIteratorTraits< IteratorCategory, Reference, DifferenceType >::iterator_category = IteratorCategory |
| using Dune::DefaultIteratorTraits< IteratorCategory, Reference, DifferenceType >::pointer = std::conditional_t<std::is_lvalue_reference_v<reference>, value_type*, Dune::ProxyArrowResult<reference>> |
| using Dune::DefaultIteratorTraits< IteratorCategory, Reference, DifferenceType >::reference = Reference |
| using Dune::DefaultIteratorTraits< IteratorCategory, Reference, DifferenceType >::value_type = Dune::AutonomousValue<reference> |