FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
February 01, 1996

C++: Iterators

(Page 4 of 6)

February 1996/Standard C/C++: Iterators/Table 3

Table 3: Forward Iterator Properties

Expression Result Type Meaning Notes
X() X constructs a default value destructor is visible
value may be singular
X u X& u has default value -
X(a) X constructs a copy of a destructor is visible
X(a) = = a
X u(a)
X u = a
X& X u; u = a once constructed, u == a
r = a X& assigns a to r result: r = = a
a = = b convertible to bool compare for equivalence a and b in same domain of values
a != b convertible to bool !(a = = b) -
*a T& access element from sequence a was not "off the end"
a = = b implies *a = = *b
*a = t T& store in element a was not "off the end"
X is mutable
a->m type of m (*a).m a has member m
++r X& point to next element r was not "off the end"
&r = = &++r
r = = s implies ++r = = ++s
r++ convertible to const X&
{X tmp = r;
++r;
return tmp; }
-
*r++ T&
{ T tmp = *r;
++r;
return tmp;}
-


Notes: X is iterator type, a and b have type X, r and s have type X&
T is element type, t has type T

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 Next Page
RELATED ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK