[#BloombergLP-bdlc-CompactedArray-2constructor-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]::CompactedArray
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdlc&lowbar;compactedarray&period;h&gt;`

Create an empty `CompactedArray`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlc/CompactedArray/2constructor-028.adoc[CompactedArray](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/CompactedArray/2constructor-028.adoc[_» more&period;&period;&period;_]#

Create a `CompactedArray` having the same value as `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/CompactedArray/2constructor-05.adoc[CompactedArray](
    xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray] const& original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/CompactedArray/2constructor-05.adoc[_» more&period;&period;&period;_]#

Create a `CompactedArray` having the specified `numElements`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlc/CompactedArray/2constructor-02f.adoc[CompactedArray](
    std::size&lowbar;t numElements,
    TYPE const& value = TYPE(),
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlc/CompactedArray/2constructor-02f.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| allocator used to supply memory
| *original*
| array to copy
| *numElements*
| initial number of elements
| *value*
| value used to initialize each element
|===


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