Item 2: Beware the illusion of container-independent code.
Page 1 of 1
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.
Like this article? We recommend
View this Item in PDF format.
Page 1 of 1