Allocator‐independent storage layout shared by vector.
Synopsis
Declared in <bslstl_vector.h>
template<class VALUE_TYPE>
class vectorBase;
Description
This class describes the basic layout for a vector class, to be included into the vector layout before the allocator (provided by bslalg::ContainerBase) to take better advantage of cache prefetching. It is parameterized by VALUE_TYPE only, and implements the portion of vector that does not need to know about its (template parameter) type ALLOCATOR (in order to generate shorter debug strings). This class intentionally has no creators (other than the compiler‐generated ones).
Type Aliases
Name |
Description |
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
Member Functions
Name |
Description |
|
Create an empty base object with no capacity. |
Adopt memory allocations from the specified |
|
|
|
|
|
|
|
Return the capacity of this vector, i.e., the maximum number of elements for which resizing is guaranteed not to trigger a reallocation. |
|
Return a const iterator to the first element. |
|
Return the past‐the‐end (forward) iterator providing non‐modifiable access to this vector. |
|
Return a reverse iterator providing non‐modifiable access to the last element in this vector, and the past‐the‐end reverse iterator if this vector is empty. |
|
Return the past‐the‐end reverse iterator providing non‐modifiable access to this vector. |
|
|
|
Return |
|
|
|
|
|
Subscript operators |
|
|
|
|
|
Return the number of elements in this vector. |
Protected Data Members
Name |
Description |
Capacity of data storage in number of elements. |
|
Beginning of data storage (owned). |
|
One past the end of data storage. |