boost::gil::histogram::insert_or_assign
Attempts to insert a std::pair into the %unordered_map.
Synopsis
Declared in <boost/gil/histogram.hpp>
template<typename _Obj>
pair<iterator, bool>
insert_or_assign(
key_type const& __k,
_Obj&& __obj);
Description
This function attempts to insert a (key, value) %pair into the %unordered_map. An %unordered_map relies on unique keys and thus a %pair is only inserted if its first element (the key) is not already present in the %unordered_map. If the %pair was already in the %unordered_map, the .second of the %pair is assigned from __obj.
Insertion requires amortized constant time.
Return Value
A pair, of which the first element is an iterator that points to the possibly inserted pair, and the second is a bool that is true if the pair was actually inserted.
Parameters
Name |
Description |
__k |
Key to use for finding a possibly existing pair in the map. |
__obj |
Argument used to generate the .second for a pair instance. |
Created with MrDocs