Introduction to C++ Containers - Know Your Data Structures

Speaker: Michael Shah

Audience level: [ Beginner ]

The C++ Standard Library provides a common set of data structures (known as containers) for inserting, updating, and removing data. Since the most recent standardization of C++ 23, additional container and container adaptors have been added. In this talk, I will discuss how C++ organizes these containers (sequence, associative, unordered associative, and adaptors) targeted at a beginner who wants to understand how to navigate the STL. ALong this journey trade-offs with each data structure will be discussed. Listeners to this talk will leave with a cheat-sheet of data structures, so they know immediately which data structures to use when starting a project. C++ examples will be shown for how to use each container, the time complexity of the operations, the common implementation of each container. Some other common 'gotchas' regarding thread-safety and iterator invalidation will be displayed in these examples. Finally, time will be spent at the end of this talk highlighting the new C++ 23 flat container containers.