BloombergLP::bdlcc::StripedUnorderedContainerImpl::insertUnique

Insert or update the element having the specified key and value.

Synopsis

Declared in <bdlcc_stripedunorderedcontainerimpl.h>

std::size_t
insertUnique(
    KEY const& key,
    VALUE const& value);

Description

If key already exists in this hash map, the value attribute of that element is set to value. Return 1 if an element is inserted, and 0 if an existing element is updated. Note that the return value equals the number of elements inserted.

Return Value

1 if an element is inserted, and 0 if an existing element is updated

Parameters

NameDescription
keykey of the element to insert or update
valuevalue to assign or insert