[#bsl-deque-0c-emplace] = xref:bsl.adoc[bsl]::xref:bsl/deque-0c.adoc[deque]::emplace :relfileprefix: ../../ :mrdocs: Emplace a newly constructed element before `position`. == Synopsis Declared in `<bslstl_deque.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... Args> xref:bsl/deque-0c/iterator-02.adoc[deque<VALUE_TYPE, ALLOCATOR>::iterator] emplace( xref:bsl/deque-0c/const_iterator.adoc[const_iterator] position, Args&&... arguments); ---- == Description Insert at the specified `position` in this deque a newly created `value_type` object, constructed by forwarding `get_allocator()` (if required) and the specified (variable number of) `arguments` to the corresponding constructor of `value_type`, and return an iterator providing modifiable access to the newly created and inserted element. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, or move assignment operator of `value_type`), this method has no effect. This method requires that the (template parameter) `VALUE_TYPE` be `move‐insertable` into this deque and `emplace‐constructible` from `arguments` (see {Requirements on `VALUE_TYPE`}). The behavior is undefined unless `position` is an iterator in the range `[cbegin() .. cend()]` (both endpoints included). == Return Value iterator to the newly emplaced element == Parameters [cols="1,4"] |=== | Name| Description | *position* | iterator before which to emplace | *arguments* | constructor arguments for the new element |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#