This electronic edition is available only as a pdf-file. It is a revised and improved
version of the book mentioned in the copyright notice below.
This material is made available by Pearson Education Ltd in electronic form
subject to the condition that the material nor any part of the material may not
be copied, printed, downloaded, saved or transferred to any other computer file,
or distributed on a network. This material first appeared in Ulrich Breymann,
Designing Components with the C++ STL, ISBN 0 201 67488 2, c© Pearson
Education Limited 2000, published by Pearson Education Ltd.
Designing Components with the C++ STL
Date of print: September 22, 2002
for Lena, Niko and Anne
Ironically, it was in Waterloo that the STL was adopted as part of the ISO/ANSI Stan-
dard C++ Library, and from that day on it went onto a triumphal march. Alexander
Stepanov and Meng Lee had proposed the result of years of research at Hewlett-
Packard, a standard template library, to the standards committee. The committee
gracefully adopted the STL as part of the C++ Standard at a committee meeting in
Waterloo in the summer of 1994, after countless controversial discussions and much
work spent by committee members on making the STL fit for a standard. Most
importantly, the adoption was tied to the condition that the source code had to be
made publicly available. Since then the STL has become more and more popular in
the C++ community and conquered the hearts of quite a number of programmers.
Personally, I know of software developers who cannot imagine getting their work
done anymore without a general-purpose library like the STL. Obviously, not all
Waterloos are the same. This Waterloo was in Ontario – seemingly a good omen.
Much of the merit, however, is not seriously due to picking the right location
for presenting a library. The STL is an invaluable foundation library that makes
programmers more productive in two ways. It contains a lot of different components
that can be plugged together, so