EqualityComparable | ||||||||||||||||||||||||||||||||||||||||
Detailed Description
A type is EqualityComparable if objects of that type can be compared for equality using operator==, and if operator== is an equivalence relation.
- Refinement Of:
- Associated Types:
- Notation:
XA type that is a model of EqualityComparable x,y,zObject of type X
- Definitions:
- Valid Expressions:
Name Expression Type requirements Return type Equality x == yConvertible to boolInequality x != yConvertible to bool
- Expression Semantics:
Name Expression Precondition Semantics Postcondition Equality x == yxandyare in the domain of==Inequality x != yxandyare in the domain of==Equivalent to !(x == y)
- Complexity Guarantees:
- Invariants:
Identity &x == &yimpliesx==yReflexivity x == xSymmetry x == yimpliesy == xTransitivity x == yandy == zimpliesx == z
- Type(s) Modeling this Concept:
- int
std::vector<T>
- Notes:
- See Also:

