[#BloombergLP-bdlcc-StripedUnorderedMap-setComputedValue]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/StripedUnorderedMap.adoc[StripedUnorderedMap]::setComputedValue
:relfileprefix: ../../../
:mrdocs:

Invoke the specified `visitor` on the value associated with the specified `key`&period; The `visitor` will be passed the address of the value, and `key`&period; If `key` is not in the map, `value` will be default constructed&period; That is, `visitor` must be invocable with the `VisitorFunction` signature&colon; &grave; bool visitor(VALUE &ast;value, const Key&amp; key)&semi; &grave; If no element in the map has `key`, insert `(key, VALUE())` and invoke `visitor` with `value` pointing to the default constructed value&period; Return 1 if `key` was found and `visitor` returned `true`, 0 if `key` was not found, and &hyphen;1 if `key` was found and `visitor` returned `false`&period; `visitor`, when invoked, has exclusive access (i&period;e&period;, write access) to the element&period; The behavior is undefined if hash map manipulators and `getValue&ast;` methods are invoked from within `visitor`, as it may lead to a deadlock&period; Note that the return value equals the number of elements found having `key`&period; Also note that a return value of `0` implies that an element was inserted&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;stripedunorderedmap&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
setComputedValue(
    KEY const& key,
    xref:BloombergLP/bdlcc/StripedUnorderedMap/VisitorFunction.adoc[VisitorFunction] const& visitor);
----


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