Post

Explore C++ STL Part1 Introduction

If you are familiar with C++, you must be aware of its STL(standard template library) which consists of Containers, Algorithms, Iterators, Function Objects and Adapters, it’s powerful but also difficult for a learner like me to master. So I am reading a book named “The Annotated STL Sources” written by Hou Jie to help me understand it, and I will record what I learned here.

Get Sources

There are many implemtations of C++ STL, the book choose SGI’s version because it is widely used and highly readable.

You can get sources here.

Run Sources

Though the sources are easy to read, we still need to run and debug it for deeper understanding. However, if you download and run it, you will find it having so many errors! Its headers are designed for system use, so there are a lot of name conflicts, thanks to C++’s namespace, I don’t have to change a lot.

Here is the runnable code.

Enjoy Sources

Now you can run and debug SGI STL happilly!

This post is licensed under CC BY 4.0 by the author.