Geogram
Version 1.9.1-rc
A programming library of geometric algorithms
|
Wraps an integer to be used with the range-based for construct. More...
#include <geogram/basic/range.h>
Public Member Functions | |
index_as_iterator (index_t val) | |
void | operator++ () |
bool | operator== (index_as_iterator rhs) |
bool | operator!= (index_as_iterator rhs) |
bool | operator< (index_as_iterator rhs) |
index_t | operator* () const |
index_t | operator- (index_as_iterator it) const |
index_as_iterator | operator+ (index_t i) const |
Wraps an integer to be used with the range-based for construct.
Not really an iterator, rather a pseudo-index. Geogram mostly uses index-based data structures, where an element is an index in an array (whereas the STL uses pointer-like semantics). With indices, there is no indirection (an index is an element), so operator* does nothing (returns the stored index).