Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

bsl::Vector_Util Struct Reference
[Component bslstl_vector]

#include <bslstl_vector.h>

List of all members.

Static Public Member Functions

static std::size_t computeNewCapacity (std::size_t newLength, std::size_t capacity, std::size_t maxSize)
static void swap (void *a, void *b)

Detailed 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.

See Component bslstl_vector


Member Function Documentation

static std::size_t bsl::Vector_Util::computeNewCapacity ( std::size_t  newLength,
std::size_t  capacity,
std::size_t  maxSize 
) [static]

Return a capacity that is at least the specified newLength and at least the minimum of twice the specified capacity and the specified maxSize. The behavior is undefined unless capacity < newLength and newLength <= maxSize. Note that the returned value is always at most maxSize.

Referenced by bsl::vector< ThreadUtil::Handle >::emplace().


The documentation for this struct was generated from the following file: