[#indirectmap] = indirectmap :mrdocs: Map whose keys are pointers, but are compared by their dereferenced values. == Synopsis Declared in `<indirectmap.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class K, class T> class indirectmap; ---- == Description Differs from a plain std::map<const K*, T, DereferencingComparator<K*> > in that methods that take a key for comparison take a K rather than taking a K* (taking a K* would be confusing, since it's the value rather than the address of the object for comparison that matters due to the dereferencing comparator). Objects pointed to by keys must not be modified in any way that changes the result of DereferencingComparator. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:indirectmap/const_iterator.adoc[`const_iterator`] | Constant iterator over the map entries. | xref:indirectmap/iterator.adoc[`iterator`] | Mutable iterator over the map entries. | xref:indirectmap/size_type.adoc[`size_type`] | Unsigned integer type used for sizes and counts. | xref:indirectmap/value_type.adoc[`value_type`] | The key/value pair type stored in the map. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:indirectmap/begin-0c.adoc[`begin`] | `begin` overloads | xref:indirectmap/cbegin.adoc[`cbegin`] | Get a const iterator to the first entry. | xref:indirectmap/cend.adoc[`cend`] | Get a const iterator past the last entry. | xref:indirectmap/clear.adoc[`clear`] | Remove all entries from the map. | xref:indirectmap/count.adoc[`count`] | Count the entries whose key dereferences to the given value. | xref:indirectmap/empty.adoc[`empty`] | Report whether the map has no entries. | xref:indirectmap/end-0c.adoc[`end`] | `end` overloads | xref:indirectmap/erase.adoc[`erase`] | Erase the entry whose key dereferences to the given value. | xref:indirectmap/find-06.adoc[`find`] | Find the entry whose key dereferences to the given value. | xref:indirectmap/insert.adoc[`insert`] | Insert a key/value pair, where the key is a pointer. | xref:indirectmap/lower_bound-0b.adoc[`lower_bound`] | Find the first entry whose key is not ordered before the given value. | xref:indirectmap/max_size.adoc[`max_size`] | Get the maximum number of entries the map can hold. | xref:indirectmap/size.adoc[`size`] | Get the number of entries in the map. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:memusage/DynamicUsage-09.adoc[`memusage::DynamicUsage`] | Dynamic memory used by an indirectmap's tree nodes. | xref:memusage/IncrementalDynamicUsage-04.adoc[`memusage::IncrementalDynamicUsage`] | Dynamic memory used by a single additional indirectmap node. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#