August 2005
Intermediate to advanced
432 pages
9h 41m
English
• Provides a complete set of comparison operators
• Provides a complete set of arithmetic operators
• Provides a complete set of operators for iterators
Among the operators defined in C++, there are a number of related sets. When you encounter a class with one operator from one of these sets, you typically expect to find the others, too. For instance, when a class provides operator==, you expect to find operator!= and probably operator<, operator<=, operator>, and operator>=. Sometimes, a class only provides operator< in order to define an ordering so objects of that class can be used in associative containers, but that often leaves class users wanting more. Likewise, ...
Read now
Unlock full access