![]() |
Home | Libraries | People | FAQ | More |
A Forward Iterator traverses a Sequence allowing movement in only one direction through it's elements, one element at a time.
Notation
i,
jI,
JMNA type models Forward Iterator if, in addition to being CopyConstructable, the following expressions are valid:
| Expression | Return type | Runtime Complexity |
|---|---|---|
|
Forward Iterator | Constant |
i ==
j |
Convertible to bool | Constant |
i !=
j |
Convertible to bool | Constant |
|
Forward Iterator | Constant |
|
Forward Iterator | Constant |
|
|
Constant |
|
|
Constant |
*i |
|
Constant |
| Expression | Compile Time Complexity |
|---|---|
|
Amortized constant time |
|
Amortized constant time |
|
Linear |
|
Linear |
|
Linear |
|
Amortized constant time |
|
Amortized constant time |
| Expression | Semantics |
|---|---|
|
An
iterator to the element following i
|
i ==
j |
Iterator equality comparison |
i !=
j |
Iterator inequality comparison |
|
An
iterator n elements after i
in the sequence |
|
Equivalent
to advance_c<M::value>(i)
|
|
The
number of elements between i
and j
|
|
The
element at positioni
|
*i |
Equivalent
to deref(i)
|
The following invariants always hold:
std::pair
iterator
boost::array
iterator
vector
iterator
cons
iterator
list
iterator
set
iterator
map
iterator
single_view
iterator
filter_view
iterator
iterator_range
iterator
joint_view
iterator
transform_view
iterator
reverse_view
iterator
| Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger |