Jonathan Boccara's blog

A new post every Tuesday and Friday morning

STL learning resource

The aim of this page is to learn STL algorithms efficiently. As explained in this post, knowing STL algorithms provide you with a fantastic set of tools to express your intentions in code, making it clearer and more robust. Knowing your STL algorithms also gives you an idea of what types of abstractions are useful, which gives you a model to write your own ones. So we should strive to know our algorithms.

However there are many of them, more than 100 without counting overloads. This is a lot to learn.

For this reason, I have decided to break them down into groups in order to show how they are related to each other. Also,  learning them one bit at a time should make the process as effortless as can be. This is how I learned them, and it is also how I teach them in my company (@Work_at_murex) where I received a good feedback from my fellow developers, who now use them much more intensively than before in their code.

Additionally, there are some things you need to know about the general design of the STL in order to use it efficiently. For this reason, I’ve also included here a section about understanding the STL, just after the algorithms catalogue. Here is the list of groups of algorithms, that I’m fleshing out along with the writing of the corresponding posts. Further down you will find the posts about mastering the STL.

So in the upcoming weeks you’ll see a focus on posts dedicated to the STL, alternating with posts about expressive code in C++ in a more general way. I’m happy to take your feedback about this (comment, Tweet or email) and if you have suggestions about how to make the learning of STL algorithms even more efficient and painless.

Algorithms catalogue

Understanding the STL

Receive regular updates to make your code expressive.