[#bsl-multimap-0ae-2constructor-02e]
= xref:bsl.adoc[bsl]::xref:bsl/multimap-0ae.adoc[multimap]::multimap
:relfileprefix: ../../
:mrdocs:

Create a multimap, and insert each `value&lowbar;type` object in the sequence starting at the specified `first` element, and ending immediately before the specified `last` element&period; Optionally specify a `comparator` used to order key&hyphen;value pairs contained in this object&period; If `comparator` is not supplied, a default&hyphen;constructed object of the (template parameter) type `COMPARATOR` is used&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is not supplied, a default&hyphen;constructed object of the (template parameter) type `ALLOCATOR` is used&period; If the type `ALLOCATOR` is `bsl&colon;&colon;allocator` (the default), then `basicAllocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the type `ALLOCATOR` is `bsl&colon;&colon;allocator` and `basicAllocator` is not supplied, the currently installed default allocator is used&period; If the sequence `first` to `last` is ordered according to `comparator`, then this operation has `O&lsqb;N&rsqb;` complexity, where `N` is the number of elements between `first` and `last`&semi; otherwise, this operation has `O&lsqb;N &ast; log(N)&rsqb;` complexity&period; The (template parameter) type `INPUT&lowbar;ITERATOR` shall meet the requirements of an input iterator defined in the C&plus;&plus;11 standard &lsqb;24&period;2&period;3&rsqb;providing access to values of a type convertible to `value&lowbar;type`, and `value&lowbar;type` must be `emplace&hyphen;constructible` from `&ast;i` into this multimap, where `i` is a dereferenceable iterator in the range `&lsqb;first &period;&period; last)&rsqb;` (see &lcub;Requirements on `KEY` and `VALUE`&rcub;)&period; 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`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;multimap&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
multimap(
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
