9

Advanced Container Adaptor Usage

Container adaptors, as their name suggests, adapt underlying containers to provide specific interfaces and functionalities. Think of them as a way to enhance or modify an existing container so that it serves a different purpose without having to reinvent the wheel. They wrap around base containers and provide a distinct set of member functions, imbuing them with behavior that can be useful in various programming scenarios.

This chapter provides references for the following containers:

  • std::stack
  • std::queue
  • std::priority_queue
  • std::flat_set
  • std::flat_map
  • std::flat_multiset
  • std::flat_multimap

Technical requirements

The code in this chapter can be found on GitHub:

https://github.com/PacktPublishing/Data-Structures-and-Algorithms-with-the-CPP-STL ...

Get Data Structures and Algorithms with the C++ STL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.