IRIX 6.5 » Books » Developer »
Standard Template Library Programmer's Guide
(document number: 007-3426-004 / published: 1999-05-21)
table of contents | additional info | download
find in page
| Category: iterators | Component type: concept |
A type that is a model of Forward Iterator may be either mutable or immutable, as defined in the Trivial Iterators requirements.
| X | A type that is a model of Forward Iterator |
| T | The value type of X |
| i, j | Object of type X |
| t | Object of type T |
| Name | Expression | Type requirements | Return type |
|---|---|---|---|
| Preincrement | ++i | X& | |
| Postincrement | i++ | X |
| Name | Expression | Precondition | Semantics | Postcondition |
|---|---|---|---|---|
| Preincrement | ++i | i is dereferenceable | i points to the next value | i is dereferenceable or past-the-end. &i == &++i. If i == j, then ++i == ++j. [1] |
| Postincrement | i++ | i is dereferenceable | Equivalent to {X tmp = i; ++i; return tmp;} | i is dereferenceable or past-the-end. [1] |
[1] The restrictions described in Input Iterator have been removed. Incrementing a forward iterator does not invalidate copies of the old value and it is guaranteed that, if i and j are dereferenceable and i == j, then ++i == ++j. As a consequence of these two facts, it is possible to pass through the same Forward Iterator twice.
Standard Template Library Programmer's Guide
(document number: 007-3426-004 / published: 1999-05-21)
table of contents | additional info | download
Copyright © 1993-2007 SGI, Inc. All rights reserved.