Insert or assign using a movable key and obj.
Synopsis
Declared in <bslstl_map.h>
template<class BDE_OTHER_TYPE>
pair<map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator, bool>
insert_or_assign(
BloombergLP::bslmf::MovableRef<KEY> key,
BDE_OTHER_TYPE&& obj);
Description
If a key equivalent to the specified movable key already exists in this map, assign the specified obj to the mapped value; otherwise insert a new entry constructed from key and obj.
Return Value
pair of iterator and whether a new element was inserted
Parameters
Name |
Description |
key |
key to move into the element |
obj |
mapped value to assign or insert |
Created with MrDocs