[#BloombergLP-bslalg-DequePrimitives-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::DequePrimitives
:relfileprefix: ../../
:mrdocs:

Namespace for primitive algorithms that operate on deques&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;dequeprimitives&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE&lowbar;TYPE,
    int BLOCK&lowbar;LENGTH&gt;
struct DequePrimitives;
----

== Description

This `struct` provides a namespace for a suite of utility functions that operate on deques parameterized by the `VALUE&lowbar;TYPE` and `BLOCK&lowbar;LENGTH`&period; Depending on the traits of `VALUE&lowbar;TYPE`, the default and copy constructors, destructor, assignment operators, etcetera may not be invoked, and instead the operation can be optimized using a no&hyphen;op, bitwise move, or bitwise copy&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/DequePrimitives-01/Iterator.adoc[`Iterator`] 
| Iterator type used to traverse elements in a deque&period;
| xref:BloombergLP/bslalg/DequePrimitives-01/size_type.adoc[`size&lowbar;type`] 
| Unsigned size type used by deque primitive operations&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/DequePrimitives-01/destruct-0e.adoc[`destruct`] 
| `destruct` overloads
| xref:BloombergLP/bslalg/DequePrimitives-01/emplaceAndMoveToBack.adoc[`emplaceAndMoveToBack`] 
| Emplace a value, shifting existing elements toward the back&period;
| xref:BloombergLP/bslalg/DequePrimitives-01/emplaceAndMoveToBackDispatch-0e.adoc[`emplaceAndMoveToBackDispatch`] 
| `emplaceAndMoveToBackDispatch` overloads
| xref:BloombergLP/bslalg/DequePrimitives-01/emplaceAndMoveToFront.adoc[`emplaceAndMoveToFront`] 
| Emplace a value, shifting existing elements toward the front&period;
| xref:BloombergLP/bslalg/DequePrimitives-01/emplaceAndMoveToFrontDispatch-08.adoc[`emplaceAndMoveToFrontDispatch`] 
| `emplaceAndMoveToFrontDispatch` overloads
| xref:BloombergLP/bslalg/DequePrimitives-01/erase-0c.adoc[`erase`] 
| `erase` overloads
| xref:BloombergLP/bslalg/DequePrimitives-01/insertAndMoveToBack-0d.adoc[`insertAndMoveToBack`] 
| `insertAndMoveToBack` overloads
| xref:BloombergLP/bslalg/DequePrimitives-01/insertAndMoveToFront-00.adoc[`insertAndMoveToFront`] 
| `insertAndMoveToFront` overloads
| xref:BloombergLP/bslalg/DequePrimitives-01/moveBack.adoc[`moveBack`] 
| Move elements backward with `std&colon;&colon;memmove` and update the iterators&period;
| xref:BloombergLP/bslalg/DequePrimitives-01/moveFront.adoc[`moveFront`] 
| Move elements forward with `std&colon;&colon;memmove` and update the iterators&period;
| xref:BloombergLP/bslalg/DequePrimitives-01/moveInsertAndMoveToBack-0f.adoc[`moveInsertAndMoveToBack`] 
| `moveInsertAndMoveToBack` overloads
| xref:BloombergLP/bslalg/DequePrimitives-01/moveInsertAndMoveToFront-00.adoc[`moveInsertAndMoveToFront`] 
| `moveInsertAndMoveToFront` overloads
| xref:BloombergLP/bslalg/DequePrimitives-01/uninitializedFillNBack.adoc[`uninitializedFillNBack`] 
| Append copies of a value to the back of an uninitialized deque range&period;
| xref:BloombergLP/bslalg/DequePrimitives-01/uninitializedFillNFront.adoc[`uninitializedFillNFront`] 
| Prepend copies of a value to the front of an uninitialized deque range&period;
| xref:BloombergLP/bslalg/DequePrimitives-01/valueInititalizeN.adoc[`valueInititalizeN`] 
| Append value&hyphen;initialized elements to the back of a deque&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/DequePrimitives-0c.adoc[`DequePrimitives&lt;VALUE&lowbar;TYPE, 1&gt;`] 
| Partial specialization of `DequePrimitives` for one element per block&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
