In this section, we will tackle three advanced types of sequential containers which are built on std::deque.

C++ has with std::stack, std::queue and std::priority_queue three special sequential containers. I guess, most of you know these classic data structures from your education.

The adaptors for containers

  • support a reduced interface for existing sequential containers,
  • can not be used with algorithms of the Standard Template Library,
  • are class templates which are parametrised by their data type and their container (std::vector, std::list and std::deque),
  • use by default std::deque as the internal sequential container:

Get hands-on with 1000+ tech skills courses.