| Category: containers | Component type: concept |
Iterators into a Forward Container satisfy the forward iterator requirements; consequently, Forward Containers support multipass algorithms and allow multiple iterators into the same container to be active at the same time.
| X | A type that is a model of Forward Container |
| a, b | Object of type X |
| T | The value type of X |
| Name | Expression | Type requirements | Return type |
|---|---|---|---|
| Equality | a == b | T is EqualityComparable | Convertible to bool |
| Inequality | a != b | T is EqualityComparable | Convertible to bool |
| Less | a < b | T is LessThanComparable | Convertible to bool |
| Greater | a > b | T is LessThanComparable | Convertible to bool |
| Less or equal | a <= b | T is LessThanComparable | Convertible to bool |
| Greater or equal | a >= b | T is LessThanComparable | Convertible to bool |
| Name | Expression | Precondition | Semantics | Postcondition |
|---|---|---|---|---|
| Equality | a == b | Returns true if a.size() == b.size() and if each element of a compares equal to the corresponding element of b. Otherwise returns false. | ||
| Less | a < b | Equivalent to lexicographical_compare(a,b) |
| Ordering | Two different iterations through a forward container will access its elements in the same order, providing that there have been no intervening mutative operations. |