[#BloombergLP-bdlc-BitArray-reserveCapacity]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::reserveCapacity
:relfileprefix: ../../../
:mrdocs:

Reserve capacity for at least `numBits` without reallocation&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
reserveCapacity(std::size&lowbar;t numBits);
----

== Description

Reserve sufficient internal capacity to accommodate a length of at least the specified `numBits` without reallocation&period; If an exception is thrown during this reallocation attempt (i&period;e&period;, by the memory allocator indicated at construction) the value of this array is guaranteed to be unchanged&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *numBits*
| minimum capacity, in bits, to reserve
|===


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