Home > Articles > Programming > C/C++

Item 21: Always have comparison functions return false for equal values.

  • Print
  • + Share This
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.
From the author of View this Item in PDF format.
  • + Share This
  • 🔖 Save To Your Account