Home > Articles > Programming > C/C++

Item 2: Beware the illusion of container-independent code.

  • Print
  • + Share This
When you write your own containers, iterators, and algorithms, don't generalize the notion of a container--a vector is not a deque is not a list. Container-independent code is a nice idea, but almost always misguided. 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