Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
C++ Standard Template Library, The 1st Edition
With the C++ Standard Template Library (STL), C++ developers have a powerful toolset for maximizing productivity, software quality, and performance at the same time. STL provides both a comprehensive set of container classes and fundamental algorithms to go with them -- a large, systematic, clean, formally sound, comprehensible, elegant and efficient framework for C++ development. Now, in this long-awaited book, the creators of the C++ Standard Template Library explain it authoritatively and in depth.KEY TOPICS:Each chapter of The Standard Template Library covers one STL component, including background, a review of the standard, techniques for using and implementing the component, and hands-on exercises. Appendices present lists of reserved names, a detailed glossary of terms and references, and practical techniques for interfacing the STL with several leading C++ compilers.MARKET:For every experienced C++ programmer.
- ISBN-100134376331
- ISBN-13978-0134376332
- Edition1st
- PublisherPearson
- Publication dateDecember 11, 2000
- LanguageEnglish
- Dimensions7 x 1 x 9.1 inches
- Print length512 pages
Customers who viewed this item also viewed
Editorial Reviews
Amazon.com Review
As most C++ developers know, the STL bundles robust container classes and nearly 100 algorithms (used to efficiently search, sort, and manipulate data). However, tapping its power can be a challenge. Many books on STL resort to the arcane syntax of templates and can be couched in the language of computer science. The C++ Standard Template Library breaks this mold with a clearly presented tour of STL from top to bottom, based on the individual header files that make up this library. Because it was written by its original inventors, you get a true insider's perspective.
Starting with iterators (used to navigate through data) and an in-depth guide to STL algorithms, you'll learn the right way to use STL from the ground up, including specific features and APIs. Each chapter is organized so that newcomers can learn the basics first, with a reference and guide to APIs and how to use them. The nitty-gritty details follow. (Each chapter includes the full source code from Hewlett-Packard's implementation of each STL header file, along with annotations and suggested programming exercises to try out on your own.) Besides full source code, expert readers will benefit from the description of the design choices made by the STL author/inventors, as well as tips for performance.
The book closes with a full tour of STL containers (including the vector, list, set, and map classes), plus hints for selecting the right containers based on your programming needs. (It helps that the discussion on containers occurs after the material on algorithms, making STL containers even more flexible.) In all, The C++ Standard Template Library looks to be an important book, one that will help anyone with some C++ experience get productive with STL. --Richard Dragan
Topics covered:
- Introduction to the Standard Template Library (STL)
- Guidelines for using STL features and test code
- Programming exercises
- Iterators (output and input iterators, forward, bidirectional, and random access iterators)
- Utility templates
- Allocators and memory templates (including smart pointers with auto_ptr)
- Guide to over 90 STL algorithms (including searching, sorting, and manipulating STL data)
- Numeric templates
- Templates for function objects
- Guide to STL containers
- Vector and resizable arrays
- List and linked lists
- Deque and double-ended queues
- STL associative containers (set and map containers, trees (including balanced, mostly balanced, and red-black trees), multisets and multimaps, stacks, queues, and priority queues
- Reference and tutorial to all STL classes and APIs
- Full source code for the Hewlett-Packard implementation of STL
- Sample programming exercises
From the Publisher
From the Back Cover
With the ANSI/ISO C++ Standard Template Library (STL), C++ developers have a powerful toolset for maximizing productivity, software quality, and performance at the same time. STL provides both comprehensive sets of container classes and fundamental algorithms to go with them-a large, systematic, and efficient framework for C++ development. Now, in this long-awaited book, the creators of the C++ Standard Template Library explain it authoritatively and in depth. Each chapter of The C++ Standard Template Library covers one STL component, including:
- Detailed background about the component and its uses
- A thorough review of the relevant ANSI/ISO C++ standard
- Practical techniques for using and implementing the component
- Extensive sample code
- Hands-on exercises
Appendices present lists of reserved names, a detailed glossary of terms and references, and how STL interfaces with the rest of the Standard C++ library.
Fully reflective of the final ANSI/ISO STL standard, The C++ Standard Template Library is the last word on all aspects of STL development for every experienced C++ programmer.
About the Author
P.J. Plauger is President of Dinkumware, Ltd., which licenses standards-conforming C and C++ libraries and documentation. For many years, he served as Senior Editor of The C/C++ Users Journal and Contributing Editor to Embedded Systems Programming. Plauger has long been active in the development of C and C++ international standards.
Alex Stepanov, now at AT&T, formerly headed the Generic Programming Project at Hewlett-Packard Research Laboratories in Palo Alto, California.
Meng Lee is currently a Technical Contributor at Hewlett-Packard Research Labs where she and Stepanov developed the original STL. The STL was proposed to and accepted by the ANCI/ISO C++ Standards Committee.
David R. Musser, Professor of Computer Science at Rensselaer Polytechnic Institute, specializes in research on generic programming. His work with Stepanov provided the foundation for the STL.
Product details
- Publisher : Pearson
- Publication date : December 11, 2000
- Edition : 1st
- Language : English
- Print length : 512 pages
- ISBN-10 : 0134376331
- ISBN-13 : 978-0134376332
- Item Weight : 2.15 pounds
- Dimensions : 7 x 1 x 9.1 inches
- Best Sellers Rank: #2,417,952 in Books (See Top 100 in Books)
- #498 in C++ Programming Language
- #2,215 in Computer Programming Languages
- #6,650 in Computer Software (Books)
- Customer Reviews:
About the authors

Alexander Stepanov studied mathematics at Moscow State University from 1967 to 1972. He has been programming since 1972, first in the Soviet Union and then, after emigrating in 1977, in the United States. He has programmed operating systems, programming tools, compilers, and libraries. His work on foundations of programming has been supported by General Electric, Polytechnic Institute of New York, AT&T, Hewlett-Packard, Silicon Graphics, Adobe, and, since 2009, A9.com. In 1995, he received the Dr. Dobb's Excellence in Programming Award for the design of the C++ Standard Template Library. Alexander retired in February, 2016.
A collection of his papers can be found at: http://www.stepanovpapers.com/
The website for Elements of Programming: http://www.elementsofprogramming.com/
The website for From Mathematics to Generic Programming: http://www.fm2gp.com/

Discover more of the author’s books, see similar authors, read book recommendations and more.

P.J. Plauger:
-- began computer programming in 1963 and has largely
earned a living writing and licensing software ever
since.
-- earned an AB in Physics (Princeton) in 1965,
then a PhD in Nuclear Physics (Michigan State) in 1969,
and hasn't done a lick of physic since.
-- began writing textbooks and numerous magazine articles
on computer programming in 1973.
-- began writing science fiction in 1973 and, despite
early acclaim, hasn't found nearly enough time to
write it since.
-- moved to Concord, Massachusetts in 1980 and still
lives there with his wife Tana and sister Margaret.
-- is a member of the American Physical Society, a Life Member of IEEE,
and a Lifetime Active member of SFWA.
-- can be reached at books@plauger.com or www.facebook.com/plaugerbooks.
Customer reviews
- 5 star4 star3 star2 star1 star5 star71%21%0%8%0%71%
- 5 star4 star3 star2 star1 star4 star71%21%0%8%0%21%
- 5 star4 star3 star2 star1 star3 star71%21%0%8%0%0%
- 5 star4 star3 star2 star1 star2 star71%21%0%8%0%8%
- 5 star4 star3 star2 star1 star1 star71%21%0%8%0%0%
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on February 23, 2001Format: PaperbackIf you are new to STL or if you just want to sharpen your STL skills, this book is *not* for you. It's of very little use to STL client programmers, i.e. users of STL. It's even a little bit advanced for a programmer who is interested only in developing new STL algorithms but not containers/iterators.
But, if you're serious about extending STL, especially if you want to write new container and iterator classes, this is *the* book you need.
Personally, I make use of the information provided in this book to write a 3D container class and a couple of highly complex 3D iterators for an academic study demanding high speed and reliability. I have other STL books like Austern's Genetic Programming and the STL or, Musser's STL Tutorial and Reference Guide which are both extremely good references for *using* STL. But, those books did not help me even a little bit when I was trying to write a 3D iterator. I believe, The C++ Standard Template Library is the only book around that's really meant for serious STL developers.
So, if you ever want to develop a new container with a fair amount of new features or a new iterator with fancy tricks, buy this book. But, If you're only after using STL and/or developing new algorithms, stick with Austern's Genetic Programming or some other similar book...
- Reviewed in the United States on February 2, 2006Format: PaperbackVerified PurchaseHi,
I had read the reviews and ordered this book. It IS what the reviews say. I purchased the book as I wanted to learn more about C++ and collecting all the recommended books (accu.org). So I was not looking at developing new container or any generic algorithm.
Personally, I found this book containing too much of code and manual style writing - which does not make it a normal reading.
It will become too heavy going, if you don't understand a lot about STL. Use it as an indepth implementation reference guide only.
So if you looking for learning only STL and NOT interested HOW TO DESIGN or understand design of STL then this book is not for you.
bye
ketan
- Reviewed in the United States on April 5, 2001Format: PaperbackJust a few months ago, I bemoaned the fact that Plauger's _The Draft Standard C++ Library_ had never been updated to the actual standard. I'm happy to report that this book contains an answer to a considerable part of my prayers: It contains an in-depth discussion of the STL, along with a complete, high quality implementation in source code form (Contrary to what the "Topics Covered" section on this page implies, however, the source code is NOT the Hewlett-Packard implementation, but a proprietary derivative which is commercially licensed).
It's hard to pin down exactly why, but this book was not quite as pleasurable a read as its predecessors. One of the reasons might be the typography: The use of underlining for emphasis of the actual makes the standards sections of the book unpleasant to read. There might be an issue of the subject: For all its power, there is not all that much interesting algorithmic stuff going on in the STL. Lastly, it seems that C++ template code as such, no matter how brilliantly written and how useful to the library client, is rather unpleasant to read-a somewhat sobering insight to a C++ aficionado as myself. As a result, the code that *was* algorithmically interesting was quite hard to understand-I would not recommend this book to somebody trying to learn about red-black trees, for instance.
If you buy just one book about the STL, buy Josuttis' _The Standard C++ Library_. If you want additional in-depth insight into the workings of the STL, and are willing to invest the time it takes to study the code, buy this book. I certainly never regretted reading it, and I hope that Plauger will update his implementation of the rest of the C++ library to publish a standard compliant version of the iostream and string libraries sometime in the future.
- Reviewed in the United States on January 5, 2001Format: PaperbackLooking at the list of authors, I had high hopes for this book being an indepth guide to *using* the STL. So much so that I ordered it as soon as it was available, before seeing a review.
The book is a reference to the STL, why things were done the way they were, and what the features of the various components are. The extensive sample code is a reference implementation of the STL itself, comprising a good deal of the text. I found few examples of actually using or extending the STL, these were left as exercises for the reader.
The book is a strong reference for language purists (You know, those people on the newsgroups who quote from standards documents) or for someone implementing the STL (why?). In my opinion, someone learning to effectively use the STL would be better served with another reference.
- Reviewed in the United States on August 8, 2007Format: PaperbackThis is an excellent book for those of us who want to know why things where done the way they where; after all, the odds are that the author probably created, or was instrumental in creating, the version of the STL that you are using right now. The only thing that bothered me was what was not covered, such as strings. I have a habit of asking questions in areas that are not well known or are very complicated to explain. Therefore the book loses one point, because it was written by someone who knows the answers I have been seeking and did not include them.
Top reviews from other countries
Repent--change your thinkingReviewed in the United Kingdom on June 29, 20195.0 out of 5 stars Great
Format: PaperbackVerified PurchaseGreat
-
大介学生=科学者Reviewed in Japan on May 22, 20104.0 out of 5 stars 良い本です
Format: PaperbackVerified PurchaseC++ STLのソースコードを解説している本です。
元になったのはVCにも使われていたコードですが、VCのソースコードと違ってとても読みやすくなっています。
VCやlibstdc++よりも遙かに読みやすいので、STLの動作や細部の挙動を理解しようと思ったらまずこの本のSTLソースを読むべきでしょう。
とはいえ複雑…というよりも冗長な記述も目立ち(ライブラリですから…)、普通のコードを読むよりは少し退屈です。
また、テンプレートの実装が未成熟であった時代のコードのため、今となっては必要ないテクニック、コードも多数。
その辺は自分が使用しているコンパイラやC++の仕様をある程度理解して、この本を読むべきですね。
そしてこの本の最大の不満点は、索引がしょぼい事にあります。
あのコードどこにあったっけ…と何度もページをめくることになりました。
仕方ないと言えば仕方ないのですが、この辺は何とかして欲しかったですね。
VSのインテリセンスに頼ろうと思っても、テンプレートだからうまく効きませんし。
翻訳の質をあげられている人もいますが、自分はそんなに悪いと感じませんでした。コードばかり追っていたせいかもしれません。
翻訳よりもとにかく検索に苦労しました。
不満点をいっぱいあげていますが、STLのソースを理解するにはこの本が最適であると思います。
とはいえ上に上げたように冗長であり時代遅れなコードも多いので、他人にSTLを説明するときには自作のSTLコードを使っています。
STLをより理解し、互換のコンテナやアルゴリズムを書くときにはこの本くらいの理解は必須だと思います。
面白い本ですし、興味がある方は是非読んでみてください。
