[#BloombergLP-bdlc-CompactedArray-reserveCapacity-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]::reserveCapacity :relfileprefix: ../../../ :mrdocs: Make the capacity of this array at least the specified `numElements`. == Synopsis Declared in `<bdlc_compactedarray.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void reserveCapacity( std::size_t numElements, std::size_t numUniqueElements); ---- == Description Make the capacity of this array at least the specified `numElements`, assuming the number of unique elements in this array does not exceed the greater of the specified `numUniqueElements` and `uniqueLength()`. This method has no effect if the current capacity meets or exceeds the required capacity. The behavior is undefined unless `numUniqueElements <= numElements` and `0 < numUniqueElements || 0 == numElements`. == Parameters [cols="1,4"] |=== | Name| Description | *numElements* | minimum element capacity to reserve | *numUniqueElements* | assumed maximum unique‐element count |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#