[#BloombergLP-bdlc-FlatHashSet-2constructor-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet]::FlatHashSet
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdlc&lowbar;flathashset&period;h&gt;`

Create an empty `FlatHashSet` object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-077.adoc[FlatHashSet]();
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-077.adoc[_» more&period;&period;&period;_]#

Create an empty set with at least the specified `capacity`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlc/FlatHashSet/2constructor-0f1.adoc[FlatHashSet](std::size&lowbar;t capacity);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-0f1.adoc[_» more&period;&period;&period;_]#

Create a set by moving from the specified `original` set&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-075.adoc[FlatHashSet](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;FlatHashSet&gt;] original);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-075.adoc[_» more&period;&period;&period;_]#

Create an empty set using the specified `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlc/FlatHashSet/2constructor-05a0.adoc[FlatHashSet](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-05a0.adoc[_» more&period;&period;&period;_]#

Create an empty set with at least the specified `capacity`, using the specified `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-00.adoc[FlatHashSet](
    std::size&lowbar;t capacity,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-00.adoc[_» more&period;&period;&period;_]#

Create a set by moving from `original` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-0fc.adoc[FlatHashSet](
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;FlatHashSet&gt;] original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-0fc.adoc[_» more&period;&period;&period;_]#

Create a set populated from the specified initializer list&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-05aa.adoc[FlatHashSet](
    bsl::initializer&lowbar;list&lt;KEY&gt; values,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-05aa.adoc[_» more&period;&period;&period;_]#

Create a set having the value of the specified `original` set&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-01.adoc[FlatHashSet](
    xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet] const& original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-01.adoc[_» more&period;&period;&period;_]#

Create an empty set with at least the specified `capacity` and `hash` functor&semi; optionally use `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-06.adoc[FlatHashSet](
    std::size&lowbar;t capacity,
    HASH const& hash,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-06.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, also requesting at least the specified `capacity`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-0c.adoc[FlatHashSet](
    bsl::initializer&lowbar;list&lt;KEY&gt; values,
    std::size&lowbar;t capacity,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Create a set populated from the specified iterator range&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:BloombergLP/bdlc/FlatHashSet/2constructor-0b.adoc[FlatHashSet](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Create an empty set with at least the specified `capacity`, `hash`, and `equal` predicate&semi; optionally use `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-09.adoc[FlatHashSet](
    std::size&lowbar;t capacity,
    HASH const& hash,
    EQUAL const& equal,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-09.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, also using the specified `hash`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-081.adoc[FlatHashSet](
    bsl::initializer&lowbar;list&lt;KEY&gt; values,
    std::size&lowbar;t capacity,
    HASH const& hash,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-081.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, also requesting at least the specified `capacity`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:BloombergLP/bdlc/FlatHashSet/2constructor-085.adoc[FlatHashSet](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    std::size&lowbar;t capacity,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-085.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, also using the specified `equal`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/FlatHashSet/2constructor-080.adoc[FlatHashSet](
    bsl::initializer&lowbar;list&lt;KEY&gt; values,
    std::size&lowbar;t capacity,
    HASH const& hash,
    EQUAL const& equal,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-080.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, also using the specified `hash`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:BloombergLP/bdlc/FlatHashSet/2constructor-0d.adoc[FlatHashSet](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    std::size&lowbar;t capacity,
    HASH const& hash,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-0d.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, also using the specified `equal`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:BloombergLP/bdlc/FlatHashSet/2constructor-0f7.adoc[FlatHashSet](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    std::size&lowbar;t capacity,
    HASH const& hash,
    EQUAL const& equal,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/FlatHashSet/2constructor-0f7.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *capacity*
| minimum initial capacity of the underlying array
| *original*
| set to move from
| *basicAllocator*
| memory allocator&semi; null uses the default
| *values*
| initializer list of elements to insert
| *hash*
| hash functor used by this set
| *first*
| beginning of the input range
| *last*
| end of the input range (exclusive)
| *equal*
| key&hyphen;equality predicate used by this set
|===


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