Item 44: Prefer member functions to algorithms with the same names.
Page 1 of 1
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.
Like this article? We recommend
View this Item in PDF format.
Page 1 of 1