Insert or update using the move‐insertable value for key.
Synopsis
Declared in <bdlcc_stripedunorderedmap.h>
std::size_t
insert(
KEY const& key,
bslmf::MovableRef<VALUE> 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. The value object is left in a valid but unspecified state. If value is allocator‐enabled and allocator() != value.allocator() this operation may cost as much as a copy. 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
Name |
Description |
key |
key of the element to insert or update |
value |
move‐insertable value to assign or insert |
Created with MrDocs