boost::gil::histogram::emplace

Attempts to build and insert a std::pair into the %unordered_map.

Synopsis

Declared in <boost/gil/histogram.hpp>

template<typename... _Args>
std::pair<iterator, bool>
emplace(_Args&&... __args);

Description

This function attempts to build and 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.

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

__args

Arguments used to generate a new pair instance (see std::piecewise_contruct for passing arguments to each part of the pair constructor).

Created with MrDocs