Create a FlatHashMap object initialized by insertion of the values from the input iterator range specified by first through last (including first, excluding last). Optionally specify a capacity indicating the minimum initial size of the underlying array of entries of this container. If capacity is not supplied or is 0, no memory is allocated. Optionally specify a hash functor used to generate hash values associated with the keys of the elements in this container. If hash is not supplied, a default‐constructed object of the (template parameter) type HASH is used. Optionally specify an equality functor equal used to determine whether the keys of two elements are equivalent. If equal is not supplied, a default‐constructed object of the (template parameter) type EQUAL is used. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not supplied or is 0, the currently installed default allocator is used. The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last. Note that if a member of the input sequence has an equivalent key to an earlier member, the later member will not be inserted.

Synopsis

Declared in <bdlc_flathashmap.h>

template<class INPUT_ITERATOR>
FlatHashMap(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    bslma::Allocator* basicAllocator = 0);

Created with MrDocs