| 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