[#absl-linked_hash_map-insert_or_assign-03]
= xref:absl.adoc[absl]::xref:absl/linked_hash_map.adoc[linked&lowbar;hash&lowbar;map]::insert&lowbar;or&lowbar;assign
:relfileprefix: ../../
:mrdocs:

Inserts the given key&sol;value, or assigns the value if the key exists, ignoring the position hint&period;

== Synopsis

Declared in `&lt;absl&sol;container&sol;linked&lowbar;hash&lowbar;map&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class K = xref:absl/linked_hash_map/key_type.adoc[key&lowbar;type],
    class V = xref:absl/linked_hash_map/mapped_type.adoc[mapped&lowbar;type]&gt;
xref:absl/linked_hash_map/iterator.adoc[iterator]
insert&lowbar;or&lowbar;assign(
    xref:absl/linked_hash_map/const_iterator.adoc[const&lowbar;iterator] hint,
    xref:absl/linked_hash_map.adoc[key&lowbar;arg&lt;K&gt;] const& k,
    V const& v);
----

== Return Value

An iterator to the inserted or updated element&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *k*
| The key to insert or look up&period;
| *v*
| The value to assign&period;
| *hint*
| A position hint, which is ignored&period;
|===


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