tfel
Loading...
Searching...
No Matches
tfel::math::DifferenceRandomAccessIterator< iterator_base > Struct Template Reference

an adaptator to random access iterator More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/General/DifferenceRandomAccessIterator.hxx>

Inheritance diagram for tfel::math::DifferenceRandomAccessIterator< iterator_base >:
tfel::math::DifferenceRandomAccessIteratorBase

Classes

struct  proxy
 a proxy class More...

Public Types

using traits = std::iterator_traits<iterator_base>
 a simple alias
using value_type = typename traits::value_type
 STL requirements https://www.sgi.com/tech/stl/trivial.html.
using reference = proxy
 STL requirement.
using pointer = typename traits::pointer
 STL requirement.
using iterator_category = typename traits::iterator_category
 STL requirement.
using difference_type = typename traits::difference_type
 STL requirement.

Public Member Functions

 DifferenceRandomAccessIterator (const iterator_base i1, const iterator_base i2)
 constructor
 DifferenceRandomAccessIterator ()
 default constructor
 DifferenceRandomAccessIterator (DifferenceRandomAccessIterator &&)=default
 move constructor
 DifferenceRandomAccessIterator (const DifferenceRandomAccessIterator &)=default
 copy constructor
DifferenceRandomAccessIterator & operator= (DifferenceRandomAccessIterator &&)=default
 move assignement
DifferenceRandomAccessIterator & operator= (const DifferenceRandomAccessIterator &)=default
 standard assignement
auto operator* () const
 dereference operator
auto operator[] (const difference_type n) const
 access operator
DifferenceRandomAccessIterator operator++ ()
DifferenceRandomAccessIterator operator++ (int)
DifferenceRandomAccessIterator operator+ (const difference_type n) const
DifferenceRandomAccessIterator operator- (const difference_type n) const
DifferenceRandomAccessIterator operator+= (const difference_type n)
bool operator== (const DifferenceRandomAccessIterator &o) const
bool operator!= (const DifferenceRandomAccessIterator &o) const
difference_type operator- (const DifferenceRandomAccessIterator &s) const

Additional Inherited Members

Static Public Member Functions inherited from tfel::math::DifferenceRandomAccessIteratorBase
static void throwInconsistentIteratorDifference ()

Detailed Description

template<typename iterator_base>
struct tfel::math::DifferenceRandomAccessIterator< iterator_base >

an adaptator to random access iterator

Template Parameters
iterator_base

Member Typedef Documentation

◆ value_type

template<typename iterator_base>
using tfel::math::DifferenceRandomAccessIterator< iterator_base >::value_type = typename traits::value_type

STL requirements https://www.sgi.com/tech/stl/trivial.html.

The requirement for the return type of *x is specified as "convertible to T", rather than simply T, because it sometimes makes sense for an iterator to return some sort of proxy object instead of the object that the iterator conceptually points to. Proxy objects are implementation details rather than part of an interface (one use of them, for example, is to allow an iterator to behave differently depending on whether its value is being read or written), so the value type of an iterator that returns a proxy is still T.

Constructor & Destructor Documentation

◆ DifferenceRandomAccessIterator()

template<typename iterator_base>
tfel::math::DifferenceRandomAccessIterator< iterator_base >::DifferenceRandomAccessIterator ( const iterator_base i1,
const iterator_base i2 )
inlineexplicit

constructor

Parameters
[in]ccurrent position
[in]sstride

The documentation for this struct was generated from the following file: