pw_containers: FlatMap class
pw::containers::FlatMap implements the std::map interface, but only
the accessors. pw::containers::FlatMap does not contain any methods
for modifying the data in the map. The FlatMap data during construction
does not have to be sorted and will automatically sort during
construction.
Testing:
Host test -- OK
Change-Id: I01740d0765ea18d81d9db7947a7f61e1ca563058
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/29320
Commit-Queue: Kevin Zeng <zengk@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
diff --git a/pw_containers/docs.rst b/pw_containers/docs.rst
index dd36fc5..a4ffafa 100644
--- a/pw_containers/docs.rst
+++ b/pw_containers/docs.rst
@@ -34,6 +34,16 @@
list.
+pw::containers::FlatMap
+=======================
+FlatMap provides a simple, fixed-size associative array with lookup by key or
+value. ``pw::containers::FlatMap`` contains the same methods and features for
+looking up data as std::map. However, there are no methods that modify the
+underlying data. The underlying array in ``pw::containers::FlatMap`` does not
+need to be sorted. During construction, ``pw::containers::FlatMap`` will
+perform a constexpr insertion sort.
+
+
Usage
-----
While the API of `pw::IntrusiveList` is relatively similar to a