Jonathan Boccara's blog

The World Map of C++ STL Algorithms

We all know that we should know our STL algorithms, because they help make our code more expressive and more robust (sometimes in spectacular ways!).

But do you know all your STL algorithms?

There are 105 of them if we include those of C++17, and every one of them has a chance to be useful in your code.

One way to remember those useful functions is by grouping them into 7 families of algorithms:

  • the queriers,
  • the permutationers,
  • the algos on sets,
  • the movers,
  • the value modifiers,
  • the structure changers,
  • and the algos of raw memory.

And each of those families have sub-families: the searchers, the property queriers, the partitioners, etc.

To provide a visual representation of the families and an easy access for reference (and also have a cool geek accessory!), here is the World Map Of The STL Algorithms:

world map C++ STL algorithms

The map is available in electronic wallpaper version. You can download it by subscribing to the Fluent C++ mailing list (no spam, you can unsubscribe any time).

Each family of algorithms owns a piece of land and a shield:

remve unique C++ STL algorithms

And sub-families are represented in regions:

make_heap push_heap pop_heap C++ STL algorithms

And every city on the map is an STL algorithm! The visual layout shows what the STL has, and which algorithms are closely related to each other. This is how I memorize them.

Interested in travelling the world of the STL to learn all the STL algorithms too? Watch my CppCon talk that presents the 105 STL algorithms, with the World Map as a support:

Do you find this map would also make it practical and fun for you to learn the STL algorithms?

You can download it by subscribing to the Fluent C++ mailing list (no spam, you can unsubscribe any time).

 

C++ STL algorithms

You may also like: