Navigating the C++ standard library

Slide header

Masterclass on the C++ standard library.

Abstract

The standard library is the most valuable resource of building blocks for any C++ programmer. It’s an extensive toolbox packed with containers, algorithms and other utilities. Aside from the productivity gains from using the standard library, you will also build on the correctness of its implementation, which is often overseen. But exactly how well do you know your toolbox? Do you know the difference between std::accumulate and std::reduce? Can you distinguish between the algebraic data types std::variant and std::optional? Do you know there is such a thing as the erase-remove idiom? And why it is there? The standard library is such a vast collection of useful tools, a strategy for navigating and internalizing it is helpful. In this session, I will categorically handle the various sets of items in the standard library, such that we can build an overview understanding of it. With this knowledge, you will be able to effectively use it to choose the right tools for the job, and be a more productive C++ programmer.

Audience

This session is for professionals in software engineering, level novice to advanced, interested in C++.

Because the C++ standard library is part of the standard specification, each full implementation of the language will have one. Knowing what’s in the standard library and knowing how and where to find it is an essential skill for every C++ programmer.

Topic listing

These are the main topics addressed in the talk:

  1. Library overview
  • Library overview
  1. Iterators and containers
  • Iterators
  • Ranges
  • Operations on iterators
  • Containers
  • Types of containers
  • Choosing the right container
  • Sequence containers
  • Ordered associative containers
  • Unordered associative containers
  • Container adaptors
  • Allocators
  1. Algorithms
  • Algorithm categories
  • Non-modifying sequence operations
  • Modifying sequence operations
  • Partitioning operations
  • Sorting operations
  • Binary search operations (on sorted ranges)
  • Set operations (on sorted ranges)
  • Heap operations
  • Minimum/maximum operations
  • Comparison operations
  • Permutation operations
  • Operations on uninitialized memory
  • Numeric operations
  1. Miscellaneous examples
  • Various practical applications of standard library utilities