| Expression | Precondition | Semantics | |
|---|---|---|---|
| Equality | x == y | ||
| Inequality | x != y | Equivalent to |
| Identity | |
| Reflexivity | |
| Symmetry | |
| Transitivity |
• int
• vector<int>
LessThanComparable.
LessThan Comparable
Category: utilities
Component type: concept
A type is LessThanComparable if it is ordered: it must be possible to compare two objects of that type using
X A type that is a model of LessThanComparable
x, y, z Object of type
Consider the relation
If
| Name | Expression | Return type |
|---|---|---|
| Less | x < y | Convertible to |
| Greater | x > y | Convertible to |
| Less or equal | x <= y | Convertible to |
| Greater or equal | x >= y | Convertible to |
| Name |
|---|
Вы читаете Standard Template Library Programmer's Guide
