ivl 679
|
#include <same_place_reverse_iterator.hpp>
Public Member Functions | |
iterator_type | base () const |
reference | operator* () |
same_place_reverse_iterator | operator+ (difference_type __n) const |
same_place_reverse_iterator & | operator++ () |
same_place_reverse_iterator | operator++ (int) |
same_place_reverse_iterator & | operator+= (difference_type __n) |
same_place_reverse_iterator | operator- (difference_type __n) const |
same_place_reverse_iterator & | operator-- () |
same_place_reverse_iterator | operator-- (int) |
same_place_reverse_iterator & | operator-= (difference_type __n) |
pointer | operator-> () const |
reference | operator[] (difference_type __n) const |
same_place_reverse_iterator (iterator_type __x) | |
same_place_reverse_iterator (const same_place_reverse_iterator &__x) | |
same_place_reverse_iterator () | |
template<typename _Iter > | |
same_place_reverse_iterator (const same_place_reverse_iterator< _Iter > &__x) |
This is a class taken from the std::reverse_iterator with the difference that instead of the relation &*(reverse_iterator(i)) == &*(i - 1) we have &*(reverse_iterator(i)) == &*(i). When using this type of relation we need to ensure that there is a valid pointer right before the beginning of the data pointer, or, an invalid pointer that will "do the trick", meaning that it will never be dereferenced, and will only be checked for inequality versus another pointer. There reason for this class is an expected (but not proven) speed improvement for removing the (i - 1) overhead in &*(i - 1). It is thought to be a legal iterator for our rbegin() and rend() based on the stl standards, however (TODO) this needs to be researched furthermore and in case there are contradictions with the std standards or in case there is no speed improvement we will probably need to fall back to std::reverse_iterator and do the proper changes in all member functions that return or manipulate reverse iterators. There is probably an unsafety issue in the cases that a pointer before the beginning of the data is invalid. If same_place_reverse_iterator is not used for pointers, in some cases like subarray there is a chance (needs to be researched too) that the unsafety issue is not there at all.
ivl::same_place_reverse_iterator< _Iterator >::same_place_reverse_iterator | ( | ) | [inline] |
The default constructor default-initializes member current
. If it is a pointer, that means it is zero-initialized.
ivl::same_place_reverse_iterator< _Iterator >::same_place_reverse_iterator | ( | iterator_type | __x | ) | [inline, explicit] |
This iterator will move in the opposite direction that x
does.
ivl::same_place_reverse_iterator< _Iterator >::same_place_reverse_iterator | ( | const same_place_reverse_iterator< _Iterator > & | __x | ) | [inline] |
The copy constructor is normal.
ivl::same_place_reverse_iterator< _Iterator >::same_place_reverse_iterator | ( | const same_place_reverse_iterator< _Iter > & | __x | ) | [inline] |
A same_place_reverse_iterator across other types can be copied in the normal fashion.
iterator_type ivl::same_place_reverse_iterator< _Iterator >::base | ( | ) | const [inline] |
current
, the iterator used for underlying work. reference ivl::same_place_reverse_iterator< _Iterator >::operator* | ( | ) | [inline] |
same_place_reverse_iterator ivl::same_place_reverse_iterator< _Iterator >::operator+ | ( | difference_type | __n | ) | const [inline] |
same_place_reverse_iterator& ivl::same_place_reverse_iterator< _Iterator >::operator++ | ( | ) | [inline] |
same_place_reverse_iterator ivl::same_place_reverse_iterator< _Iterator >::operator++ | ( | int | ) | [inline] |
same_place_reverse_iterator& ivl::same_place_reverse_iterator< _Iterator >::operator+= | ( | difference_type | __n | ) | [inline] |
same_place_reverse_iterator ivl::same_place_reverse_iterator< _Iterator >::operator- | ( | difference_type | __n | ) | const [inline] |
same_place_reverse_iterator ivl::same_place_reverse_iterator< _Iterator >::operator-- | ( | int | ) | [inline] |
same_place_reverse_iterator& ivl::same_place_reverse_iterator< _Iterator >::operator-- | ( | ) | [inline] |
same_place_reverse_iterator& ivl::same_place_reverse_iterator< _Iterator >::operator-= | ( | difference_type | __n | ) | [inline] |
pointer ivl::same_place_reverse_iterator< _Iterator >::operator-> | ( | ) | const [inline] |
reference ivl::same_place_reverse_iterator< _Iterator >::operator[] | ( | difference_type | __n | ) | const [inline] |