Standard C++ Library Class Reference
r value of type X&
t value of type T
Requirements for Random Access Iterators
The following expressions must be valid for random access iterators:
X u u might have a singular value
X() X() might be singular
X(a) copy constructor, a == X(a).
X u(a) copy constructor, u == a
X u = a assignment, u == a
a == b, a != b return value convertable to bool
*a return value convertable to T&
a->m equivalent to (*a).m
++r returns X&
r++ return value convertable to const X&
*r++ returns T&
--r returns X&
r-- return value convertable to const X&
*r-- returns T&
r += n Semantics of --r or ++r n times depending on the sign of n
a + n, n + a returns type X
r -= n returns X&, behaves as r += -n
a - n returns type X
b - a returns Distance
a[n] *(a+n), return value convertable to T
a < b total ordering relation
a > b total ordering relation opposite to <
a <= b !(a < b)
a >= b !(a > b)
Like forward iterators, random access iterators have the condition that a == b implies *a == *b.