[#bsl-Vector_Util] = xref:bsl.adoc[bsl]::Vector_Util :relfileprefix: ../ :mrdocs: Utility namespace for `vector` capacity and swap helpers. == Synopsis Declared in `<bslstl_vector.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct Vector_Util; ---- == Description This `struct` provides a namespace for implementing the `swap` member function of `vector<VALUE_TYPE, ALLOCATOR>`. `swap` can be implemented irrespective of the `VALUE_TYPE` or `ALLOCATOR` template parameters, which is why we implement it in this non‐parameterized, non‐inlined utility. == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/Vector_Util/computeNewCapacity.adoc[`computeNewCapacity`] | Return a new capacity for the requested length. | xref:bsl/Vector_Util/swap.adoc[`swap`] | Exchange the value of the specified `a` vector with that of the specified `b` vector. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#