[#llvm-IndexedMap] = xref:llvm.adoc[llvm]::IndexedMap :relfileprefix: ../ :mrdocs: Dense map from keys to values, indexed through a key‐to‐index functor. == Synopsis Declared in `<llvm/ADT/IndexedMap.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, typename ToIndexT = /* implementation-defined */> class IndexedMap; ---- == Description Keys are mapped to `size_t` slots via `ToIndexT.` Missing entries are represented by a configurable null value. Call `grow` to ensure capacity for a given key. == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/IndexedMap/2constructor-0f.adoc[`IndexedMap`] [.small]#[constructor]# | Constructors | xref:llvm/IndexedMap/clear.adoc[`clear`] | Remove all entries, leaving the map empty. | xref:llvm/IndexedMap/grow.adoc[`grow`] | Ensure the map has space for key `N` (and all smaller indices). | xref:llvm/IndexedMap/inBounds.adoc[`inBounds`] | Return true if key `N` falls within the current storage size. | xref:llvm/IndexedMap/operator_subs-04.adoc[`operator[]`] | Subscript operators | xref:llvm/IndexedMap/reserve.adoc[`reserve`] | Reserve storage capacity for at least `S` mapped slots. | xref:llvm/IndexedMap/resize.adoc[`resize`] | Resize to `S` slots, filling new entries with the null sentinel. | xref:llvm/IndexedMap/size.adoc[`size`] | Return the number of indexed slots currently allocated. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#