[#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 array of binary digits (bits)&period; By default, the array is empty and has a capacity of 0 bits&period; Optionally specify the `initialLength` (in bits) of the array&period; If `initialLength` is not specified, the default length is 0&period; If `initialLength` is specified, optionally specify the `value` for each bit in the `initialLength`&period; If `value` is not specified, the default value for each bit is `false` (0)&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&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 an array of binary digits having the specified `initialLength` and using the optionally specified `basicAllocator` to supply memory&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 an array of binary digits (bits) having the same value as the specified `original` array&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&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 an array of binary digits having the specified `initialLength` and `value`, using the optionally specified `basicAllocator` to supply memory&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;_]#


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