[#bsl-unordered_set-02a-2constructor-05]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_set-02a.adoc[unordered&lowbar;set&lt;ManagedAttribute, AttributeHash&gt;]::unordered&lowbar;set
:relfileprefix: ../../
:mrdocs:

Create an unordered set, and insert each `value&lowbar;type` object in the sequence starting at the specified `first` element, and ending immediately before the specified `last` element, ignoring those keys having a value equivalent to that which appears earlier in the sequence&period; Optionally specify an `initialNumBuckets` indicating the initial size of the array of buckets of this container&period; If `initialNumBuckets` is not supplied, a single bucket is used&period; Optionally specify a `hashFunction` used to generate hash values for the keys contained in this set&period; If `hashFunction` is not supplied, a default&hyphen;constructed object of (template parameter) type `HASH` is used&period; Optionally specify a key&hyphen;equality functor `keyEqual` used to verify that two key values are the same&period; If `keyEqual` is not supplied, a default&hyphen;constructed object of (template parameter) type `EQUAL` 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 to supply memory&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 unordered set, where `i` is a dereferenceable iterator in the range `&lsqb;first &period;&period; last)&rsqb;` (see &lcub;Requirements on `KEY`&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; 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;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
unordered&lowbar;set(
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    xref:bsl/unordered_set-02a/size_type.adoc[size&lowbar;type] initialNumBuckets = 0,
    xref:BloombergLP/ball/ManagedAttributeSet.adoc[AttributeHash] const& hashFunction = HASH(),
    xref:bsl/equal_to-0d.adoc[equal&lowbar;to&lt;ManagedAttribute&gt;] const& keyEqual = EQUAL(),
    xref:bsl/allocator-0df.adoc[allocator&lt;ManagedAttribute&gt;] const& basicAllocator = ALLOCATOR());
----


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