Static Value-Flow Analysis
|
#include <iterator.h>
Classes | |
class | ReferenceProxy |
Public Types | |
using | iterator_category = IteratorCategoryT |
using | value_type = T |
using | difference_type = DifferenceTypeT |
using | pointer = PointerT |
using | reference = ReferenceT |
Public Member Functions | |
DerivedT | operator+ (DifferenceTypeT n) const |
DerivedT | operator- (DifferenceTypeT n) const |
DerivedT & | operator++ () |
DerivedT | operator++ (int) |
DerivedT & | operator-- () |
DerivedT | operator-- (int) |
bool | operator!= (const DerivedT &RHS) const |
bool | operator> (const DerivedT &RHS) const |
bool | operator<= (const DerivedT &RHS) const |
bool | operator>= (const DerivedT &RHS) const |
PointerT | operator-> () |
PointerT | operator-> () const |
ReferenceProxy | operator[] (DifferenceTypeT n) |
ReferenceProxy | operator[] (DifferenceTypeT n) const |
Protected Types | |
enum | { IsRandomAccess , IsBidirectional } |
Friends | |
DerivedT | operator+ (DifferenceTypeT n, const DerivedT &i) |
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of the interface.
Use this when it is reasonable to implement most of the iterator functionality in terms of a core subset. If you need special behavior or there are performance implications for this, you may want to override the relevant members instead.
Note, one abstraction that this does not provide is implementing subtraction in terms of addition by negating the difference. Negation isn't always information preserving, and I can see very reasonable iterator designs where this doesn't work well. It doesn't really force much added boilerplate anyways.
Another abstraction that this doesn't provide is implementing increment in terms of addition of one. These aren't equivalent for all iterator categories, and respecting that adds a lot of complexity for little gain.
Classes wishing to use iter_facade_base
should implement the following methods:
Forward Iterators: (All of the following methods)
Bidirectional Iterators: (All methods of forward iterators, plus the following)
Random-access Iterators: (All methods of bidirectional iterators excluding the following)
Definition at line 67 of file iterator.h.
using SVF::iter_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::difference_type = DifferenceTypeT |
Definition at line 72 of file iterator.h.
using SVF::iter_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::iterator_category = IteratorCategoryT |
Definition at line 70 of file iterator.h.
using SVF::iter_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::pointer = PointerT |
Definition at line 73 of file iterator.h.
using SVF::iter_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::reference = ReferenceT |
Definition at line 74 of file iterator.h.
using SVF::iter_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >::value_type = T |
Definition at line 71 of file iterator.h.
|
protected |
Enumerator | |
---|---|
IsRandomAccess | |
IsBidirectional |
Definition at line 77 of file iterator.h.
|
inline |
Definition at line 164 of file iterator.h.
|
inline |
Definition at line 106 of file iterator.h.
|
inline |
Definition at line 134 of file iterator.h.
|
inline |
|
inline |
Definition at line 124 of file iterator.h.
|
inline |
Definition at line 146 of file iterator.h.
|
inline |
Definition at line 153 of file iterator.h.
|
inline |
Definition at line 193 of file iterator.h.
|
inline |
Definition at line 197 of file iterator.h.
|
inline |
Definition at line 178 of file iterator.h.
|
inline |
Definition at line 170 of file iterator.h.
|
inline |
Definition at line 185 of file iterator.h.
|
inline |
Definition at line 201 of file iterator.h.
|
inline |
Definition at line 207 of file iterator.h.
|
friend |
Definition at line 117 of file iterator.h.