[#bsl-deque-0c-2constructor-0f62] = xref:bsl.adoc[bsl]::xref:bsl/deque-0c.adoc[deque]::deque :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<bslstl_deque.h>` Create an empty deque. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/2constructor-0d6.adoc[deque](); ---- [.small]#xref:bsl/deque-0c/2constructor-0d6.adoc[_» more..._]# Create a deque with the same value as `original`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/2constructor-0e.adoc[deque](xref:bsl/deque-0c.adoc[deque] const& original); ---- [.small]#xref:bsl/deque-0c/2constructor-0e.adoc[_» more..._]# Create a deque by moving from `original`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/2constructor-0a.adoc[deque](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<deque>] original); ---- [.small]#xref:bsl/deque-0c/2constructor-0a.adoc[_» more..._]# Create an empty deque using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:bsl/deque-0c/2constructor-01.adoc[deque](ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/deque-0c/2constructor-01.adoc[_» more..._]# Create a deque of `numElements` value‐initialized elements. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:bsl/deque-0c/2constructor-0db.adoc[deque]( xref:bsl/deque-0c/size_type.adoc[size_type] numElements, ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/deque-0c/2constructor-0db.adoc[_» more..._]# Create a deque by moving from `original` using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/2constructor-08.adoc[deque]( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<deque>] original, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/deque-0c/2constructor-08.adoc[_» more..._]# Create a deque from the elements of `values`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/2constructor-0c.adoc[deque]( std::initializer_list<value_type> values, ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/deque-0c/2constructor-0c.adoc[_» more..._]# Create a deque with the value of `original` using `basicAllocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/2constructor-02.adoc[deque]( xref:bsl/deque-0c.adoc[deque] const& original, ALLOCATOR const& basicAllocator); ---- [.small]#xref:bsl/deque-0c/2constructor-02.adoc[_» more..._]# Create a deque of `numElements` copies of `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/deque-0c/2constructor-05.adoc[deque]( xref:bsl/deque-0c/size_type.adoc[size_type] numElements, VALUE_TYPE const& value, ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/deque-0c/2constructor-05.adoc[_» more..._]# Create a deque from the range `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> xref:bsl/deque-0c/2constructor-0f6d.adoc[deque]( INPUT_ITERATOR first, INPUT_ITERATOR last, ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/deque-0c/2constructor-0f6d.adoc[_» more..._]# Create a deque from the elements of `range`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_RANGE> xref:bsl/deque-0c/2constructor-06.adoc[deque]( std::from_range_t tag, t_RANGE&& range, ALLOCATOR const& basicAllocator = ALLOCATOR()); ---- [.small]#xref:bsl/deque-0c/2constructor-06.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *original* | deque to copy | *basicAllocator* | allocator used to supply memory | *numElements* | number of elements to create | *values* | initializer list of elements to insert | *value* | value used to initialize each element | *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]#