[#bsl-multiset-03-2constructor-0f]
= xref:bsl.adoc[bsl]::xref:bsl/multiset-03.adoc[multiset]::multiset
:relfileprefix: ../../
:mrdocs:

Create a multiset from the specified `values` initializer list&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
multiset(
    std::initializer&lowbar;list&lt;KEY&gt; values,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

== Description

Optionally specify a `comparator` used to order keys 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` and `basicAllocator` is not supplied, the currently installed default allocator is used&period; If `values` is ordered according to `comparator`, then this operation has `O&lsqb;N&rsqb;` complexity, where `N` is the number of elements in `values`&semi; otherwise this operation has `O&lsqb;N &ast; log(N)&rsqb;` complexity&period; This method requires that the (template parameter) type `KEY` be `copy&hyphen;insertable` into this multiset (see &lcub;Requirements on `KEY`&rcub;)&period; Note that a `bslma&colon;&colon;Allocator &ast;` can be supplied for `basicAllocator` if the type `ALLOCATOR` is `bsl&colon;&colon;allocator` (the default)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *values*
| initializer list of elements to insert
| *comparator*
| key&hyphen;ordering comparator for this multiset
| *basicAllocator*
| allocator used to supply memory
|===


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