mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-21 06:12:09 +00:00
3c4e5de42f
Change-Id: I18d1529088beb41b37be00a77ba8999f6b6f810a
31 lines
893 B
ReStructuredText
31 lines
893 B
ReStructuredText
.. default-domain:: cpp
|
|
|
|
.. highlight:: sh
|
|
|
|
-------------
|
|
pw_containers
|
|
-------------
|
|
The pw_containers module provides embedded-friendly container classes.
|
|
|
|
pw_vector
|
|
=========
|
|
The Vector class is similar to std::vector, except it is backed by a
|
|
fixed-size buffer. Vectors must be declared with an explicit maximum size
|
|
(e.g. ``Vector<int, 10>``) but vectors can be used and referred to without the
|
|
max size template parameter (e.g. ``Vector<int>``).
|
|
|
|
To allow referring to a ``pw::Vector`` without an explicit maximum size, all
|
|
Vector classes inherit from the generic ``Vector<T>``, which stores the maximum
|
|
size in a variable. This allows Vectors to be used without having to know
|
|
their maximum size at compile time. It also keeps code size small since
|
|
function implementations are shared for all maximum sizes.
|
|
|
|
Compatibility
|
|
=============
|
|
* C
|
|
* C++17
|
|
|
|
Dependencies
|
|
============
|
|
* pw_span
|