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.

Synopsis

Declared in <bslstl_vector.h>

struct Vector_Util;

Static Member Functions

Name

Description

computeNewCapacity

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.

swap

Exchange the value of the specified a vector with that of the specified b vector.

Created with MrDocs