C++ Containers & Vocabulary Types
Prev: memory | Up: stdlib | Next: algorithm_and_ranges
Rel: Algorithms & Ranges, Structured Bindings
Ref: cppreference — Containers
Tags: #public #prog #cpp #stdlib #containers #index
Core (#tier/core)
- std::vector — Contiguous dynamic array (default sequence container in C++).
- std::string — Owning mutable UTF-8/byte string with Small String Optimization (SSO).
- std::string_view — Zero-copy non-owning view over contiguous characters (C++17).
- std::unordered_map — Average O(1) hash table key-value store.
- std::optional — Stack-allocated nullable value type without heap allocation (C++17).
Standard (#tier/standard)
- std::array — Fixed-size stack-allocated array with
.size()and zero pointer decay. - std::span — Zero-copy non-owning view over any contiguous sequence (C++20).
- std::map — Ordered red-black tree map with O(log n) lookup and range queries.
- std::variant — Type-safe tagged union / sum type (C++17).
- std::expected — Value-or-error return type (C++23, like Rust's
Result).
Linked from
- tuts/cpp/stdlib
- tuts/cpp/stdlib/algorithm_and_ranges
- tuts/cpp/stdlib/containers/array
- tuts/cpp/stdlib/containers/expected
- tuts/cpp/stdlib/containers/map
- tuts/cpp/stdlib/containers/optional
- tuts/cpp/stdlib/containers/span
- tuts/cpp/stdlib/containers/string
- tuts/cpp/stdlib/containers/string_view
- tuts/cpp/stdlib/containers/unordered_map
- tuts/cpp/stdlib/containers/variant
- tuts/cpp/stdlib/containers/vector
- tuts/cpp/stdlib/memory
- tuts/cpp/stdlib/memory/auto_ptr
Related notes
- tuts/cpp/stdlib Linked here; links to this page; shared tags: #cpp, #index, #prog, #stdlib
- tuts/cpp/stdlib/algorithm_and_ranges Linked here; links to this page; shared tags: #cpp, #index, #prog, #stdlib
- tuts/cpp/stdlib/containers/array Linked here; links to this page; shared tags: #containers, #cpp, #prog, #stdlib
- tuts/cpp/stdlib/containers/expected Linked here; links to this page; shared tags: #containers, #cpp, #prog, #stdlib
- tuts/cpp/stdlib/containers/map Linked here; links to this page; shared tags: #containers, #cpp, #prog, #stdlib
- tuts/cpp/stdlib/containers/optional Linked here; links to this page; shared tags: #containers, #cpp, #prog, #stdlib
- tuts/cpp/stdlib/containers/span Linked here; links to this page; shared tags: #containers, #cpp, #prog, #stdlib
- tuts/cpp/stdlib/containers/string Linked here; links to this page; shared tags: #containers, #cpp, #prog, #stdlib
- tuts/cpp/stdlib/containers/string_view Linked here; links to this page; shared tags: #containers, #cpp, #prog, #stdlib
- tuts/cpp/stdlib/containers/unordered_map Linked here; links to this page; shared tags: #containers, #cpp, #prog, #stdlib