[#bsl-Vector_Util-computeNewCapacity] = xref:bsl.adoc[bsl]::xref:bsl/Vector_Util.adoc[Vector_Util]::computeNewCapacity :relfileprefix: ../../ :mrdocs: Return a new capacity for the requested length. == Synopsis Declared in `<bslstl_vector.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::size_t computeNewCapacity( std::size_t newLength, std::size_t capacity, std::size_t maxSize); ---- == Description Return a capacity that is at least the specified `newLength` and at least twice the specified `capacity` if this is less than the specified `maxSize`, but never more than `maxSize`. The behavior is undefined unless `capacity < newLength` and `newLength <= maxSize`. == Return Value new capacity at least `newLength` and within `maxSize` == Parameters [cols="1,4"] |=== | Name| Description | *newLength* | requested minimum length | *capacity* | current capacity of the vector | *maxSize* | maximum permitted capacity |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#