Luna::SelfIndexedHashMap::insert_or_assign
Pair< iterator, bool > insert_or_assign(value_type &&value)
Assigns the value to the element with the specified key, or inserts the value pair to the map if such element is not found. The key is extracted from the value.
Parameters
-
in value
The element value to assign or insert.
Return value
Returns one iterator-bool pair indicating the result:* If the returned Boolean value is true
, then the element is inserted to the map, and the returned iterator points to the inserted element.
- If the returned Boolean value is
false
, then one existing element is found and is assigned to the specified value, and the returned iterator points to the existing element in the map.