Expression | Return type | Operational | Assertion/note |
semantics | pre-/post-condition | ||
a!= b | decltype(a!= b) modelsboolean-testable | !(a== b) | |
*a | reference, convertible toT | ||
a->m | (*a).m | Preconditions:a is dereferenceable. | |
++r | X& | ||
(void)r++ | equivalent to(void)++r | ||
*r++ | convertible toT | { T tmp=*r; ++r; return tmp;} |
Expression | Return type | Operational | Assertion/note |
semantics | pre-/post-condition | ||
*r= o | result is not used | ||
++r | X& | ||
r++ | convertible toconst X& | { X tmp= r; ++r; return tmp;} | |
*r++= o | result is not used |
Expression | Return type | Operational | Assertion/note |
semantics | pre-/post-condition | ||
--r | X& | ||
r-- | convertible toconst X& | { X tmp= r; --r; return tmp;} | |
*r-- | reference |
Expression | Return type | Operational | Assertion/note |
semantics | pre-/post-condition | ||
r+= n | X& | { difference_type m= n; if(m>=0) while(m--) ++r; else while(m++) --r; return r;} | |
a+ n n+ a | X | { X tmp= a; return tmp+= n;} | a+ n== n+ a. |
r-= n | X& | return r+=-n; | |
a- n | X | { X tmp= a; return tmp-= n;} | |
b- a | difference_type | return n; | |
a[n] | convertible toreference | *(a+ n) | |
a< b | decltype(a< b) modelsboolean-testable | Effects: Equivalent to:return b- a>0; | < is a total ordering relation |
a> b | decltype(a> b) modelsboolean-testable | b< a | |
a>= b | decltype(a>= b) modelsboolean-testable | !(a< b) | |
a<= b | decltype(a<= b) modelsboolean-testable | !(a> b) |