boost::gil::histogram::insert

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

Synopsis

Declared in <boost/gil/histogram.hpp>

iterator
insert(
    const_iterator __hint,
    value_type const& __x);

Description

@{

This function is not concerned about whether the insertion took place, and thus does not return a boolean like the single‐argument insert() does. Note that the first parameter is only a hint and can potentially improve the performance of the insertion process. A bad hint would cause no gains in efficiency.

See https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints for more on hinting.

Insertion requires amortized constant time.

Return Value

An iterator that points to the element with key of __x (may or may not be the %pair passed in).

Parameters

Name

Description

__hint

An iterator that serves as a hint as to where the pair should be inserted.

__x

Pair to be inserted (see std::make_pair for easy creation of pairs).

Created with MrDocs