Jonathan Boccara's blog

The World Map of C++ STL Algorithms

Published July 6, 2018 - 5 Comments

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

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.

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

Here are the two ways you can get it:

1- Get an electronic wallpaper version of the map. You can download it by subscribing to the Fluent C++ mailing list (no spam, you can unsubscribe any time).

2- Get a poster of the map: I will send you a high resolution version of the map, printed on a 84.1 cm X 59.4 cm poster. Price: 10 EUR + shipping (you can use Paypal with any currency). Get your poster here!

C++ STL algorithms

You may also like:

Don't want to miss out ? Follow:   twitterlinkedinrss
Share this post!Facebooktwitterlinkedin

Comments are closed