Item 21: Always have comparison functions return false for equal values.
If you use the wrong comparison function, equal values are, by definition, not equivalent! Isn't that cool? Well, not really. The following is an excerpt from Scott Meyers' book, Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library.Like this article? We recommend View this Item in PDF format.