[#bsl-map-0a7-2constructor-0bc] = xref:bsl.adoc[bsl]::xref:bsl/map-0a7.adoc[map]::map :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<bslstl_map.h>` Create an empty map. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/map-0a7/2constructor-098.adoc[map](); ---- [.small]#xref:bsl/map-0a7/2constructor-098.adoc[_» more..._]# Create a map with the same value as `original`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/map-0a7/2constructor-06.adoc[map](xref:bsl/map-0a7.adoc[map] const& original); ---- [.small]#xref:bsl/map-0a7/2constructor-06.adoc[_» more..._]# Create a map by moving from `original`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/map-0a7/2constructor-0e.adoc[map](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<map>] original); ---- [.small]#xref:bsl/map-0a7/2constructor-0e.adoc[_» more..._]# Create an empty map that uses `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:bsl/map-0a7/2constructor-0c.adoc[map](ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/map-0a7/2constructor-0c.adoc[_» more..._]# Create a map by moving from `original` using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/map-0a7/2constructor-008.adoc[map]( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<map>] original, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/map-0a7/2constructor-008.adoc[_» more..._]# Create a map from `values` using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/map-0a7/2constructor-090.adoc[map]( std::initializer_list<value_type> values, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/map-0a7/2constructor-090.adoc[_» more..._]# Create an empty map using `comparator` and `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:bsl/map-0a7/2constructor-01a.adoc[map]( COMPARATOR const& comparator, ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/map-0a7/2constructor-01a.adoc[_» more..._]# Create a map with the value of `original` using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/map-0a7/2constructor-016.adoc[map]( xref:bsl/map-0a7.adoc[map] const& original, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/map-0a7/2constructor-016.adoc[_» more..._]# Create a map from `values`, optionally with comparator and allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/map-0a7/2constructor-0ba.adoc[map]( std::initializer_list<value_type> values, COMPARATOR const& comparator = COMPARATOR(), ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/map-0a7/2constructor-0ba.adoc[_» more..._]# Create a map from `[first, last)]` using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> xref:bsl/map-0a7/2constructor-0f.adoc[map]( INPUT_ITERATOR first, INPUT_ITERATOR last, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/map-0a7/2constructor-0f.adoc[_» more..._]# Create a map from `range` using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class RANGE> xref:bsl/map-0a7/2constructor-03.adoc[map]( std::from_range_t tag, RANGE&& range, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/map-0a7/2constructor-03.adoc[_» more..._]# Create a map from `[first, last)]`, optionally with comparator and allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> xref:bsl/map-0a7/2constructor-0a.adoc[map]( INPUT_ITERATOR first, INPUT_ITERATOR last, COMPARATOR const& comparator = COMPARATOR(), ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/map-0a7/2constructor-0a.adoc[_» more..._]# Create a map from `range`, optionally with comparator and allocator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class RANGE> xref:bsl/map-0a7/2constructor-001.adoc[map]( std::from_range_t tag, RANGE&& range, COMPARATOR const& comparator = COMPARATOR(), ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/map-0a7/2constructor-001.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *original* | map to copy | *basicAllocator* | allocator used to supply memory | *values* | initializer list of elements to insert | *comparator* | functor used to order keys | *first* | beginning of the range to copy | *last* | end of the range to copy | *tag* | disambiguation tag for range construction | *range* | input range of elements to insert |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#