[#BloombergLP-bdlc-BitArray-2constructor-011]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::BitArray
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

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

Create an empty array of binary digits (bits)&period;


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

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

Create a bit array of the specified initial length&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdlc/BitArray/2constructor-04.adoc[BitArray](
    std::size&lowbar;t initialLength,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

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

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


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

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

Create a bit array of the specified length and bit value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/BitArray/2constructor-0c.adoc[BitArray](
    std::size&lowbar;t initialLength,
    bool value,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| memory allocator&semi; null uses the default
| *initialLength*
| initial number of bits in the array
| *original*
| array providing the value to copy
| *value*
| initial value for each bit
|===


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