Reserve capacity for numElements with values up to maxValue.
Synopsis
Declared in <bdlc_packedintarray.h>
void
reserveCapacity(
std::size_t numElements,
TYPE maxValue);
Description
Make the capacity of this array at least the specified numElements. The specified maxValue denotes the maximum element value that will be subsequently added to this array. After this call numElements having values in the range [0, 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 0 <= maxValue.
Parameters
Name |
Description |
numElements |
minimum number of elements to reserve for |
maxValue |
maximum element value expected after this call |
Created with MrDocs