Ch9: Sequential Containers
Overview
This chapter expands on the material from
Chapter 4 (dsal) and covers all sequential
containers available in fast_io_dsal.
The order of the elements in a sequential container corresponds to the positions in which the elements are added. The first element added is at position 0, the second at position 1, and so on. This is different from the associative containers (Chapter 10), where elements are stored based on a key associated with each element.
The container classes share a common interface. What you learn about one kind of container applies to another. Each kind of container offers a different set of performance and functionality trade-offs.
The default container is ::fast_io::vector. Unless you have
a specific reason to use another container, use a vector.
Contents
- Ch9.1: Overview of Sequential Containers
- Ch9.2: Common Operations
- Ch9.3: Insert and Erase by Index
- Ch9.4: Iterators, Left-Inclusive Ranges, and Invalidation
- Ch9.5: Unchecked Operations
- Ch9.6: forward_list
- Ch9.7: list
- Ch9.8: vector
- Ch9.9: deque
- Ch9.10: span and index_span
- Ch9.11: bitvec
- Ch9.12: string
- Ch9.13: string_view and cstring_view
- Ch9.14: Sequential Container Adaptors
- Ch9.15: Using Container Ranges with Algorithms
- Ch9.16: C++ Standard Library Containers