Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Adaptor iterator to additionally call second dereference on the iterator dereference result. More...
#include <iterator.hpp>
Public Types | |
using | pointer = typename std::iterator_traits< Iterator >::value_type |
The pointer type is the value of adapted iterator. More... | |
using | value_type = typename std::conditional< std::is_const< typename std::remove_reference< typename std::iterator_traits< Iterator >::reference >::type >::value, typename std::add_const< typename std::remove_pointer< pointer >::type >::type, typename std::remove_pointer< pointer >::type >::type |
The value type is the value of adapted iterator without pointer. More... | |
using | difference_type = std::ptrdiff_t |
Difference_type is standard pointer difference type. More... | |
using | reference = value_type & |
Reference type is reference to the value type. More... | |
using | iterator_category = typename std::iterator_traits< Iterator >::iterator_category |
iterator_category is inherited. More... | |
Public Member Functions | |
dereferencing_iterator (Iterator base) | |
Constructor of the dereferencing iterator adaptor. More... | |
template<class Iter > | |
dereferencing_iterator (const dereferencing_iterator< Iter > &iter) | |
reference | operator* () const |
Dereference operator doing extra dereference. More... | |
pointer | operator-> () const |
Arrow operator doing extra dereference. More... | |
dereferencing_iterator< Iterator > & | operator++ () |
Increment operator. More... | |
dereferencing_iterator< Iterator > | operator++ (int) |
Increment operator. More... | |
dereferencing_iterator< Iterator > & | operator-- () |
Decrement operator. More... | |
dereferencing_iterator< Iterator > | operator-- (int) |
Decrement operator. More... | |
dereferencing_iterator< Iterator > & | operator+= (int distance) |
Shifs the iterator by distance . More... | |
dereferencing_iterator< Iterator > | operator+ (int distance) const |
Creates a new iterator and shifs it by distance . More... | |
dereferencing_iterator< Iterator > & | operator-= (int distance) |
Shifs the iterator back by distance . More... | |
dereferencing_iterator< Iterator > | operator- (int distance) const |
Creates a new iterator and shifs it back by distance . More... | |
reference | operator[] (int index) const |
Array subscript operator. More... | |
difference_type | operator- (const dereferencing_iterator< Iterator > &other) const |
Distance of two iterators computation operator. More... | |
bool | operator== (const dereferencing_iterator< Iterator > &other) const |
Comparison of iterators for equality. More... | |
auto | operator<=> (const dereferencing_iterator< Iterator > &other) const |
Less than comparison of iterators. More... | |
Iterator | base () const |
The underlying iterator getter. More... | |
Adaptor iterator to additionally call second dereference on the iterator dereference result.
Iterator | the adapted iterator |
using ext::dereferencing_iterator< Iterator >::difference_type = std::ptrdiff_t |
Difference_type is standard pointer difference type.
using ext::dereferencing_iterator< Iterator >::iterator_category = typename std::iterator_traits < Iterator >::iterator_category |
iterator_category is inherited.
using ext::dereferencing_iterator< Iterator >::pointer = typename std::iterator_traits < Iterator >::value_type |
The pointer type is the value of adapted iterator.
using ext::dereferencing_iterator< Iterator >::reference = value_type & |
Reference type is reference to the value type.
using ext::dereferencing_iterator< Iterator >::value_type = typename std::conditional < std::is_const < typename std::remove_reference < typename std::iterator_traits < Iterator >::reference >::type >::value, typename std::add_const < typename std::remove_pointer < pointer >::type >::type, typename std::remove_pointer < pointer >::type >::type |
The value type is the value of adapted iterator without pointer.
|
inlineexplicit |
Constructor of the dereferencing iterator adaptor.
base | the underlying iterator |
|
inline |
Cast constructor from dereferencing iterator adapting compatible iterator.
Iter | the underlying iterator type of dereference iterator |
iter | the casted dereferencing iterator |
|
inline |
The underlying iterator getter.
|
inline |
Dereference operator doing extra dereference.
|
inline |
Creates a new iterator and shifs it by distance
.
distance | the distance to shift by |
|
inline |
Increment operator.
Increments the underlying operator.
|
inline |
Increment operator.
Increments the underlying operator.
|
inline |
Shifs the iterator by distance
.
distance | the distance to shift by |
|
inline |
Distance of two iterators computation operator.
other | the other iterator |
|
inline |
Creates a new iterator and shifs it back by distance
.
distance | the distance to shift by |
|
inline |
Decrement operator.
Decrements the underlying operator.
|
inline |
Decrement operator.
Decrements the underlying operator.
|
inline |
Shifs the iterator back by distance
.
distance | the distance to shift by |
|
inline |
Arrow operator doing extra dereference.
|
inline |
Less than comparison of iterators.
other | the other iterator |
|
inline |
Comparison of iterators for equality.
other | the other iterator |
|
inline |
Array subscript operator.
Additionaly dereferences the result of subscript of the underlying iterator.
index | the subscript index |
index