[#BloombergLP-bslalg-DequePrimitives-0c-insertAndMoveToFront-08] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/DequePrimitives-0c.adoc[DequePrimitives<VALUE_TYPE, 1>]::insertAndMoveToFront :relfileprefix: ../../../ :mrdocs: Insert copies of a value, shifting existing elements toward the front. == Synopsis Declared in `<bslalg_dequeprimitives.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static void insertAndMoveToFront( xref:BloombergLP/bslalg/DequePrimitives-0c/Iterator.adoc[Iterator]* toBegin, xref:BloombergLP/bslalg/DequePrimitives-0c/Iterator.adoc[Iterator] fromBegin, xref:BloombergLP/bslalg/DequePrimitives-0c/Iterator.adoc[Iterator] position, xref:BloombergLP/bslalg/DequePrimitives-0c/size_type.adoc[size_type] numElements, VALUE_TYPE const& value, ALLOCATOR allocator); ---- == Parameters [cols="1,4"] |=== | Name| Description | *toBegin* | loads the beginning iterator after insertion | *fromBegin* | current beginning of the deque | *position* | insertion position within the deque | *numElements* | number of copies of `value` to insert | *value* | value copied into each inserted element | *allocator* | allocator passed to element constructors |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#