[#BloombergLP-bdlcc-StripedUnorderedContainerImpl-setValueFirst-0c] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/StripedUnorderedContainerImpl.adoc[StripedUnorderedContainerImpl]::setValueFirst :relfileprefix: ../../../ :mrdocs: Set the first element with `key` to the move‐insertable `value`. == Synopsis Declared in `<bdlcc_stripedunorderedcontainerimpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::size_t setValueFirst( KEY const& key, xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<VALUE>] value); ---- == Description If no such element exists, insert `(key, value)`. If there are multiple elements in this hash map having `key` then set the value of the first such element found. Return the number of elements found having `key`. Note that if no elements were found, and a new value was inserted, `0` is returned. Also note that, when there are multiple elements having `key`, the selection of "first" is unspecified and subject to change. == Return Value number of elements found having `key` == Parameters [cols="1,4"] |=== | Name| Description | *key* | key of the element to set or insert | *value* | move‐insertable value to assign or insert |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#