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

Namespace for utility functions that operate on arrays of elements&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct ArrayPrimitives;
----

== Description

This `struct` provides a namespace for a suite of independent utility functions that operate on arrays of elements of parameterized type `TARGET&lowbar;TYPE`&period; Depending on the traits of `TARGET&lowbar;TYPE`, the default and copy constructors, destructor, assignment operators, etcetera may not be invoked, optimized away by no&hyphen;op or bit&hyphen;wise move or copy&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/ArrayPrimitives/Imp.adoc[`Imp`] 
| Implementation detail for `ArrayPrimitives` utility functions&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/difference_type.adoc[`difference&lowbar;type`] 
| Standard signed difference type used by array primitive operations&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[`size&lowbar;type`] 
| Standard unsigned size type used by array primitive operations&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/ArrayPrimitives/copyConstruct-073.adoc[`copyConstruct`] 
| `copyConstruct` overloads
| xref:BloombergLP/bslalg/ArrayPrimitives/defaultConstruct-03.adoc[`defaultConstruct`] 
| Value&hyphen;initialize elements into an uninitialized array&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMove-08.adoc[`destructiveMove`] 
| Destructively move elements into an uninitialized array&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndEmplace.adoc[`destructiveMoveAndEmplace`] 
| Destructively move elements while emplacing one new element&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndInsert-08.adoc[`destructiveMoveAndInsert`] 
| `destructiveMoveAndInsert` overloads
| xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndMoveInsert-07c.adoc[`destructiveMoveAndMoveInsert`] 
| Destructively move elements while move&hyphen;inserting a source range&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/emplace-0e.adoc[`emplace`] 
| Emplace a newly constructed element, shifting subsequent elements&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/erase-00.adoc[`erase`] 
| Erase a range of elements and close the gap by moving&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/insert-0ad.adoc[`insert`] 
| `insert` overloads
| xref:BloombergLP/bslalg/ArrayPrimitives/moveConstruct-00.adoc[`moveConstruct`] 
| Move&hyphen;construct elements from a range into an uninitialized array&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-04d.adoc[`moveInsert`] 
| Move&hyphen;insert a source range, shifting subsequent elements&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/rotate.adoc[`rotate`] 
| Rotate elements so the middle becomes the new first element&period;
| xref:BloombergLP/bslalg/ArrayPrimitives/uninitializedFillN-04.adoc[`uninitializedFillN`] 
| Fill an uninitialized array with copies of a value&period;
|===



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