[#bsl-set-0d-2constructor-006] = xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::set :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<bslstl_set.h>` Create an empty set. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/2constructor-095.adoc[set](); ---- [.small]#xref:bsl/set-0d/2constructor-095.adoc[_» more..._]# Create a set having the same value as the specified `original`. [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..._]# Create a set by moving the contents of the specified `original`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/2constructor-02.adoc[set](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<set>] original); ---- [.small]#xref:bsl/set-0d/2constructor-02.adoc[_» more..._]# Create an empty set that uses the specified `basicAllocator`. [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..._]# Create a set by moving `original`, using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/2constructor-08.adoc[set]( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<set>] original, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/set-0d/2constructor-08.adoc[_» more..._]# Create a set from `values` using the specified `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/2constructor-05.adoc[set]( std::initializer_list<KEY> values, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/set-0d/2constructor-05.adoc[_» more..._]# Create an empty set using the specified `comparator` and `basicAllocator`. [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..._]# Create a set with the value of `original`, using `basicAllocator`. [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..._]# Create a set from the specified `values` initializer list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/2constructor-03.adoc[set]( std::initializer_list<KEY> values, COMPARATOR const& comparator = COMPARATOR(), ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/set-0d/2constructor-03.adoc[_» more..._]# Create a set from `[first .. last)]` using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> xref:bsl/set-0d/2constructor-06.adoc[set]( INPUT_ITERATOR first, INPUT_ITERATOR last, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/set-0d/2constructor-06.adoc[_» more..._]# Create a set from the specified `range`, using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class RANGE> xref:bsl/set-0d/2constructor-0d1.adoc[set]( std::from_range_t tag, RANGE&& range, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/set-0d/2constructor-0d1.adoc[_» more..._]# Create a set from the iterator range `[first .. last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> xref:bsl/set-0d/2constructor-01.adoc[set]( INPUT_ITERATOR first, INPUT_ITERATOR last, COMPARATOR const& comparator = COMPARATOR(), ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/set-0d/2constructor-01.adoc[_» more..._]# Create a set from the values in the specified `range`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class RANGE> xref:bsl/set-0d/2constructor-0b.adoc[set]( std::from_range_t tag, RANGE&& range, COMPARATOR const& comparator = COMPARATOR(), ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/set-0d/2constructor-0b.adoc[_» more..._]# == 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‐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]#