[#BloombergLP-bdlc-PackedIntArrayImp-0a-reserveCapacity-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/PackedIntArrayImp-0a.adoc[PackedIntArrayImp]::reserveCapacity :relfileprefix: ../../../ :mrdocs: Reserve capacity for `numElements` in `[minValue, maxValue]`. == Synopsis Declared in `<bdlc_packedintarray.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void reserveCapacity( std::size_t numElements, xref:BloombergLP/bdlc/PackedIntArrayImp-0a/ElementType.adoc[ElementType] minValue, xref:BloombergLP/bdlc/PackedIntArrayImp-0a/ElementType.adoc[ElementType] maxValue); ---- == Description Make the capacity of this array at least the specified `numElements`. The specified `minValue` and `maxValue` denote, respectively, the minimum and maximum elements values that will be subsequently added to this array. After this call `numElements` having values in the range `[minValue, maxValue]` are guaranteed to not cause a reallocation. This method has no effect if the current capacity meets or exceeds the required capacity. The behavior is undefined unless `minValue <= maxValue`. == Parameters [cols="1,4"] |=== | Name| Description | *numElements* | minimum number of elements to reserve for | *minValue* | minimum element value expected after this call | *maxValue* | maximum element value expected after this call |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#