[#bsl-set-0d-2constructor-006]
= xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::set
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Create an empty set&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/set-0d/2constructor-095.adoc[set]();
----

[.small]#xref:bsl/set-0d/2constructor-095.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/set-0d/2constructor-097.adoc[set](xref:bsl/set-0d.adoc[set] const& original);
----

[.small]#xref:bsl/set-0d/2constructor-097.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/set-0d/2constructor-02.adoc[set](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;set&gt;] original);
----

[.small]#xref:bsl/set-0d/2constructor-02.adoc[_» more&period;&period;&period;_]#

Create an empty set that uses the specified `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/set-0d/2constructor-0d6.adoc[set](ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/set-0d/2constructor-0d6.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/set-0d/2constructor-08.adoc[set](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;set&gt;] original,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/set-0d/2constructor-08.adoc[_» more&period;&period;&period;_]#

Create a set from `values` using the specified `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/set-0d/2constructor-05.adoc[set](
    std::initializer&lowbar;list&lt;KEY&gt; values,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/set-0d/2constructor-05.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/set-0d/2constructor-0e.adoc[set](
    COMPARATOR const& comparator,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

[.small]#xref:bsl/set-0d/2constructor-0e.adoc[_» more&period;&period;&period;_]#

Create a set with the value of `original`, using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/set-0d/2constructor-00b.adoc[set](
    xref:bsl/set-0d.adoc[set] const& original,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/set-0d/2constructor-00b.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/set-0d/2constructor-03.adoc[set](
    std::initializer&lowbar;list&lt;KEY&gt; values,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

[.small]#xref:bsl/set-0d/2constructor-03.adoc[_» more&period;&period;&period;_]#

Create a set from `&lsqb;first &period;&period; last)&rsqb;` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/set-0d/2constructor-06.adoc[set](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/set-0d/2constructor-06.adoc[_» more&period;&period;&period;_]#

Create a set from the specified `range`, using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RANGE&gt;
xref:bsl/set-0d/2constructor-0d1.adoc[set](
    std::from&lowbar;range&lowbar;t tag,
    RANGE&& range,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/set-0d/2constructor-0d1.adoc[_» more&period;&period;&period;_]#

Create a set from the iterator range `&lsqb;first &period;&period; last)&rsqb;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/set-0d/2constructor-01.adoc[set](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

[.small]#xref:bsl/set-0d/2constructor-01.adoc[_» more&period;&period;&period;_]#

Create a set from the values in the specified `range`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RANGE&gt;
xref:bsl/set-0d/2constructor-0b.adoc[set](
    std::from&lowbar;range&lowbar;t tag,
    RANGE&& range,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

[.small]#xref:bsl/set-0d/2constructor-0b.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| set whose value is copied
| *basicAllocator*
| allocator used to supply memory
| *values*
| initializer list of keys to insert
| *comparator*
| key&hyphen;comparison functor
| *first*
| beginning of the range (inclusive)
| *last*
| end of the range (exclusive)
| *tag*
| disambiguation tag for the range constructor
| *range*
| range of values to insert
|===


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