home | login | register | DMCA | contacts | help | donate |

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я

 fantasy space fantasy fantasy is horrors heroic prose   military   child   russian detective   action   child   ironical   historical   political western adventure adventure (child) child's stories love religion antique Scientific literature biography business home pets animals art history computers linguistics mathematics religion home_garden sport technique publicism philosophy chemistry close

## Expression semantics

Semantics of an expression is defined only where it differs from, or is not defined in, Bidirectional Iterator or LessThan Comparable.

Name Expression Precondition Semantics Postcondition
Forward motion `i += n` Including i itself, there must be n dereferenceable or past-the-end iterators following or preceding i, depending on whether n is positive or negative. If n > 0, equivalent to executing ++i n times. If n < 0, equivalent to executing --i n times. If n == 0 , this is a null operation. [1] i is dereferenceable or past-the-end.
Iterator addition `i + n `or `n + i` Same as for i += n Equivalent to { X tmp = i; return tmp += n; } . The two forms i + n and n + i are identical. Result is dereferenceable or past-the-end
Iterator subtraction `i –= n` Including i itself, there must be n dereferenceable or past-the-end iterators preceding or following i, depending on whether n is positive or negative. Equivalent to i += (-n). i is dereferenceable or past-the-end.
Iterator subtraction `i – n` Same as for i –= n Equivalent to { X tmp = i; return tmp –= n; }. Result is dereferenceable or past-the-end
Difference `i – j` Either i is reachable from j or j is reachable from i, or both. Returns a number n such that i == j + n
Element operator `i[n]` i + n exists and is dereferenceable. Equivalent to *(i + n) [2]
Element assignment `i[n] = t` i + n exists and is dereferenceable. Equivalent to *(i + n) = t [2] i[n] is a copy of t.
Less `i < j` Either i is reachable from j or j is reachable from i, or both. [3] As described in LessThan Comparable [4]

Valid expressions | Standard Template Library Programmer`s Guide | Complexity guarantees