[#bsl-vectorBase-06]
= xref:bsl.adoc[bsl]::vectorBase
:relfileprefix: ../
:mrdocs:

Allocator&hyphen;independent storage layout shared by `vector`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;vector&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class VALUE&lowbar;TYPE&gt;
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&colon;&colon;ContainerBase`) to take better advantage of cache prefetching&period; It is parameterized by `VALUE&lowbar;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)&period; This class intentionally has *no* creators (other than the compiler&hyphen;generated ones)&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:bsl/vectorBase-06/const_iterator.adoc[`const&lowbar;iterator`] 
| This `typedef` is an alias to `VALUE&lowbar;TYPE const &ast;`&period;
| xref:bsl/vectorBase-06/const_reference.adoc[`const&lowbar;reference`] 
| This `typedef` is an alias to `VALUE&lowbar;TYPE const&amp;`&period;
| xref:bsl/vectorBase-06/const_reverse_iterator.adoc[`const&lowbar;reverse&lowbar;iterator`] 
| This `typedef` is an alias to `bsl&colon;&colon;reverse&lowbar;iterator&lt;const&lowbar;iterator&gt;`&period;
| xref:bsl/vectorBase-06/difference_type.adoc[`difference&lowbar;type`] 
| This `typedef` is an alias to `std&colon;&colon;ptrdiff&lowbar;t`&period;
| xref:bsl/vectorBase-06/iterator.adoc[`iterator`] 
| This `typedef` is an alias to `VALUE&lowbar;TYPE &ast;`&period;
| xref:bsl/vectorBase-06/reference.adoc[`reference`] 
| This `typedef` is an alias to `VALUE&lowbar;TYPE&amp;`&period;
| xref:bsl/vectorBase-06/reverse_iterator.adoc[`reverse&lowbar;iterator`] 
| This `typedef` is an alias to `bsl&colon;&colon;reverse&lowbar;iterator&lt;iterator&gt;`&period;
| xref:bsl/vectorBase-06/size_type.adoc[`size&lowbar;type`] 
| This `typedef` is an alias to `std&colon;&colon;size&lowbar;t`&period;
| xref:bsl/vectorBase-06/value_type.adoc[`value&lowbar;type`] 
| This `typedef` is an alias to the (template parameter) `VALUE&lowbar;TYPE`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/vectorBase-06/2constructor.adoc[`vectorBase`]         [.small]#[constructor]#
| Create an empty base object with no capacity&period;
| xref:bsl/vectorBase-06/adopt.adoc[`adopt`] 
| Adopt memory allocations from the specified `base` object&period;
| xref:bsl/vectorBase-06/at-0cb.adoc[`at`] 
| `at` overloads
| xref:bsl/vectorBase-06/back-04.adoc[`back`] 
| `back` overloads
| xref:bsl/vectorBase-06/begin-0ce8.adoc[`begin`] 
| `begin` overloads
| xref:bsl/vectorBase-06/capacity.adoc[`capacity`] 
| Return the capacity of this vector, i&period;e&period;, the maximum number of elements for which resizing is guaranteed not to trigger a reallocation&period;
| xref:bsl/vectorBase-06/cbegin.adoc[`cbegin`] 
| Return a const iterator to the first element&period;
| xref:bsl/vectorBase-06/cend.adoc[`cend`] 
| Return the past&hyphen;the&hyphen;end (forward) iterator providing non&hyphen;modifiable access to this vector&period;
| xref:bsl/vectorBase-06/crbegin.adoc[`crbegin`] 
| Return a reverse iterator providing non&hyphen;modifiable access to the last element in this vector, and the past&hyphen;the&hyphen;end reverse iterator if this vector is empty&period;
| xref:bsl/vectorBase-06/crend.adoc[`crend`] 
| Return the past&hyphen;the&hyphen;end reverse iterator providing non&hyphen;modifiable access to this vector&period;
| xref:bsl/vectorBase-06/data-0e.adoc[`data`] 
| `data` overloads
| xref:bsl/vectorBase-06/empty.adoc[`empty`] 
| Return `true` if this vector has size 0, and `false` otherwise&period;
| xref:bsl/vectorBase-06/end-0c.adoc[`end`] 
| `end` overloads
| xref:bsl/vectorBase-06/front-05.adoc[`front`] 
| `front` overloads
| xref:bsl/vectorBase-06/operator_subs-02.adoc[`operator&lsqb;&rsqb;`] 
| Subscript operators
| xref:bsl/vectorBase-06/rbegin-09.adoc[`rbegin`] 
| `rbegin` overloads
| xref:bsl/vectorBase-06/rend-01.adoc[`rend`] 
| `rend` overloads
| xref:bsl/vectorBase-06/size.adoc[`size`] 
| Return the number of elements in this vector&period;
|===


== Protected Data Members

[cols="1,4"]
|===
| Name| Description
| xref:bsl/vectorBase-06/d_capacity.adoc[`d&lowbar;capacity`] 
| Capacity of data storage in number of elements&period;
| xref:bsl/vectorBase-06/d_dataBegin_p.adoc[`d&lowbar;dataBegin&lowbar;p`] 
| Beginning of data storage (owned)&period;
| xref:bsl/vectorBase-06/d_dataEnd_p.adoc[`d&lowbar;dataEnd&lowbar;p`] 
| One past the end of data storage&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:bsl/vector-00d.adoc[`vector`] 
| STL&hyphen;compliant sequence container conforming to the `bslma` model&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
