Home > Articles > Programming > C/C++

Item 44: Prefer member functions to algorithms with the same names.

  • Print
  • + Share This
When choosing between an STL algorithm or a container member function with the same name, go for the member function. It's probably more efficient, and better integrated with the container's usual behavior. 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