[#indirectmap]
= indirectmap
:mrdocs:

Map whose keys are pointers, but are compared by their dereferenced values&period;

== Synopsis

Declared in `&lt;indirectmap&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class K,
    class T&gt;
class indirectmap;
----

== Description

Differs from a plain std&colon;&colon;map&lt;const K&ast;, T, DereferencingComparator&lt;K&ast;&gt; &gt; in that methods that take a key for comparison take a K rather than taking a K&ast; (taking a K&ast; would be confusing, since it&apos;s the value rather than the address of the object for comparison that matters due to the dereferencing comparator)&period;

Objects pointed to by keys must not be modified in any way that changes the result of DereferencingComparator&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:indirectmap/const_iterator.adoc[`const&lowbar;iterator`] 
| Constant iterator over the map entries&period;
| xref:indirectmap/iterator.adoc[`iterator`] 
| Mutable iterator over the map entries&period;
| xref:indirectmap/size_type.adoc[`size&lowbar;type`] 
| Unsigned integer type used for sizes and counts&period;
| xref:indirectmap/value_type.adoc[`value&lowbar;type`] 
| The key&sol;value pair type stored in the map&period;
|===


== 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&period;
| xref:indirectmap/cend.adoc[`cend`] 
| Get a const iterator past the last entry&period;
| xref:indirectmap/clear.adoc[`clear`] 
| Remove all entries from the map&period;
| xref:indirectmap/count.adoc[`count`] 
| Count the entries whose key dereferences to the given value&period;
| xref:indirectmap/empty.adoc[`empty`] 
| Report whether the map has no entries&period;
| xref:indirectmap/end-0c.adoc[`end`] 
| `end` overloads
| xref:indirectmap/erase.adoc[`erase`] 
| Erase the entry whose key dereferences to the given value&period;
| xref:indirectmap/find-06.adoc[`find`] 
| Find the entry whose key dereferences to the given value&period;
| xref:indirectmap/insert.adoc[`insert`] 
| Insert a key&sol;value pair, where the key is a pointer&period;
| xref:indirectmap/lower_bound-0b.adoc[`lower&lowbar;bound`] 
| Find the first entry whose key is not ordered before the given value&period;
| xref:indirectmap/max_size.adoc[`max&lowbar;size`] 
| Get the maximum number of entries the map can hold&period;
| xref:indirectmap/size.adoc[`size`] 
| Get the number of entries in the map&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:memusage/DynamicUsage-09.adoc[`memusage&colon;&colon;DynamicUsage`]
| Dynamic memory used by an indirectmap&apos;s tree nodes&period;
| xref:memusage/IncrementalDynamicUsage-04.adoc[`memusage&colon;&colon;IncrementalDynamicUsage`]
| Dynamic memory used by a single additional indirectmap node&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
