If successful, make the capacity of the specified modifiable array at least the specified numElements and return zero.

Synopsis

Declared in <bdlat_arrayfunctions.h>

template<class TYPE>
int
reserve(
    TYPE* array,
    int numElements);

Description

If unsuccessful or unsupported, return a non‐zero value. This method has no effect, and returns zero, if the current capacity meets or exceeds the required capacity. The behavior is undefined unless 0 <= numElements.

Return Value

0 on success, and a non‐zero value if unsuccessful or unsupported

Parameters

Name

Description

array

array whose capacity is reserved

numElements

minimum capacity to reserve

Created with MrDocs