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

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;

== 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;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:bsl/vectorBase-06a/const_iterator.adoc[`const&lowbar;iterator`] 
| This `typedef` is an alias to `VALUE&lowbar;TYPE const &ast;`&period;
| xref:bsl/vectorBase-06a/const_reference.adoc[`const&lowbar;reference`] 
| This `typedef` is an alias to `VALUE&lowbar;TYPE const&amp;`&period;
| xref:bsl/vectorBase-06a/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-06a/difference_type.adoc[`difference&lowbar;type`] 
| This `typedef` is an alias to `std&colon;&colon;ptrdiff&lowbar;t`&period;
| xref:bsl/vectorBase-06a/iterator.adoc[`iterator`] 
| This `typedef` is an alias to `VALUE&lowbar;TYPE &ast;`&period;
| xref:bsl/vectorBase-06a/reference.adoc[`reference`] 
| This `typedef` is an alias to `VALUE&lowbar;TYPE&amp;`&period;
| xref:bsl/vectorBase-06a/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-06a/size_type.adoc[`size&lowbar;type`] 
| This `typedef` is an alias to `std&colon;&colon;size&lowbar;t`&period;
| xref:bsl/vectorBase-06a/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-06a/2constructor.adoc[`vectorBase`]         [.small]#[constructor]#
| Create an empty base object with no capacity&period;
| xref:bsl/vectorBase-06a/adopt.adoc[`adopt`] 
| Adopt all outstanding memory allocations associated with the specified `base` object&period; The behavior is undefined unless this object is in a default&hyphen;constructed state&period;
| xref:bsl/vectorBase-06a/at-0cb.adoc[`at`] 
| `at` overloads
| xref:bsl/vectorBase-06a/back-04.adoc[`back`] 
| `back` overloads
| xref:bsl/vectorBase-06a/begin-0ce8.adoc[`begin`] 
| `begin` overloads
| xref:bsl/vectorBase-06a/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-06a/cbegin.adoc[`cbegin`] 
| Return an iterator providing non&hyphen;modifiable access to the first element in this vector, and the past&hyphen;the&hyphen;end iterator if this vector is empty&period;
| xref:bsl/vectorBase-06a/cend.adoc[`cend`] 
| Return the past&hyphen;the&hyphen;end (forward) iterator providing non&hyphen;modifiable access to this vector&period;
| xref:bsl/vectorBase-06a/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-06a/crend.adoc[`crend`] 
| Return the past&hyphen;the&hyphen;end reverse iterator providing non&hyphen;modifiable access to this vector&period;
| xref:bsl/vectorBase-06a/data-0e.adoc[`data`] 
| `data` overloads
| xref:bsl/vectorBase-06a/empty.adoc[`empty`] 
| Return `true` if this vector has size 0, and `false` otherwise&period;
| xref:bsl/vectorBase-06a/end-0c.adoc[`end`] 
| `end` overloads
| xref:bsl/vectorBase-06a/front-05.adoc[`front`] 
| `front` overloads
| xref:bsl/vectorBase-06a/operator_subs-02.adoc[`operator&lsqb;&rsqb;`] 
| Subscript operators
| xref:bsl/vectorBase-06a/rbegin-09.adoc[`rbegin`] 
| `rbegin` overloads
| xref:bsl/vectorBase-06a/rend-01.adoc[`rend`] 
| `rend` overloads
| xref:bsl/vectorBase-06a/size.adoc[`size`] 
| Return the number of elements in this vector&period;
|===


== Protected Data Members

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


== Specializations

[cols="1"]
|===
| Name
| xref:bsl/vectorBase-09.adoc[`vectorBase&lt;bool&gt;`] 
| xref:bsl/vectorBase-0aa3.adoc[`vectorBase&lt;char&gt;`] 
| xref:bsl/vectorBase-068.adoc[`vectorBase&lt;double&gt;`] 
| xref:bsl/vectorBase-06e.adoc[`vectorBase&lt;float&gt;`] 
| xref:bsl/vectorBase-03d.adoc[`vectorBase&lt;int&gt;`] 
| xref:bsl/vectorBase-0b2.adoc[`vectorBase&lt;long&gt;`] 
| xref:bsl/vectorBase-0cf.adoc[`vectorBase&lt;long double&gt;`] 
| xref:bsl/vectorBase-0f7.adoc[`vectorBase&lt;long long&gt;`] 
| xref:bsl/vectorBase-0fd.adoc[`vectorBase&lt;short&gt;`] 
| xref:bsl/vectorBase-0c1.adoc[`vectorBase&lt;signed char&gt;`] 
| xref:bsl/vectorBase-033.adoc[`vectorBase&lt;unsigned char&gt;`] 
| xref:bsl/vectorBase-08.adoc[`vectorBase&lt;unsigned int&gt;`] 
| xref:bsl/vectorBase-0e9.adoc[`vectorBase&lt;unsigned long&gt;`] 
| xref:bsl/vectorBase-0aa9.adoc[`vectorBase&lt;unsigned long long&gt;`] 
| xref:bsl/vectorBase-074.adoc[`vectorBase&lt;unsigned short&gt;`] 
| xref:bsl/vectorBase-0bb.adoc[`vectorBase&lt;void*&gt;`] 
| xref:bsl/vectorBase-0af.adoc[`vectorBase&lt;char const*&gt;`] 
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:bsl/vector-008.adoc[`vector&lt;Json&gt;`] 
| This class template provides an STL&hyphen;compliant `vector` that conforms to the `bslma&colon;&colon;Allocator` model&period; For the requirements of a vector class, consult the C&plus;&plus;11 standard&period; In particular, this implementation offers the general rules that&colon;
| xref:bsl/vector-00d.adoc[`vector`] 
| This class template provides an STL&hyphen;compliant `vector` that conforms to the `bslma&colon;&colon;Allocator` model&period; For the requirements of a vector class, consult the C&plus;&plus;11 standard&period; In particular, this implementation offers the general rules that&colon;
| xref:bsl/vector-020.adoc[`vector&lt;float&gt;`] 
| 
| xref:bsl/vector-027.adoc[`vector&lt;MetricSampleGroup&gt;`] 
| This class template provides an STL&hyphen;compliant `vector` that conforms to the `bslma&colon;&colon;Allocator` model&period; For the requirements of a vector class, consult the C&plus;&plus;11 standard&period; In particular, this implementation offers the general rules that&colon;
| xref:bsl/vector-029.adoc[`vector&lt;long long&gt;`] 
| 
| xref:bsl/vector-03.adoc[`vector&lt;bool&gt;`] 
| 
| xref:bsl/vector-044.adoc[`vector&lt;ZoneinfoTransition&gt;`] 
| This class template provides an STL&hyphen;compliant `vector` that conforms to the `bslma&colon;&colon;Allocator` model&period; For the requirements of a vector class, consult the C&plus;&plus;11 standard&period; In particular, this implementation offers the general rules that&colon;
| xref:bsl/vector-047.adoc[`vector&lt;unsigned long long&gt;`] 
| 
| xref:bsl/vector-095.adoc[`vector&lt;char&gt;`] 
| 
| xref:bsl/vector-099.adoc[`vector&lt;pair&lt;Date, DayOfWeekSet&gt;&gt;`] 
| This class template provides an STL&hyphen;compliant `vector` that conforms to the `bslma&colon;&colon;Allocator` model&period; For the requirements of a vector class, consult the C&plus;&plus;11 standard&period; In particular, this implementation offers the general rules that&colon;
| xref:bsl/vector-09a.adoc[`vector&lt;int&gt;`] 
| 
| xref:bsl/vector-09c.adoc[`vector&lt;short&gt;`] 
| 
| xref:bsl/vector-0a0.adoc[`vector&lt;signed char&gt;`] 
| 
| xref:bsl/vector-0a33.adoc[`vector&lt;long&gt;`] 
| 
| xref:bsl/vector-0aa7.adoc[`vector&lt;long double&gt;`] 
| 
| xref:bsl/vector-0aa9.adoc[`vector&lt;unsigned short&gt;`] 
| 
| xref:bsl/vector-0b.adoc[`vector&lt;UserFieldValue&gt;`] 
| This class template provides an STL&hyphen;compliant `vector` that conforms to the `bslma&colon;&colon;Allocator` model&period; For the requirements of a vector class, consult the C&plus;&plus;11 standard&period; In particular, this implementation offers the general rules that&colon;
| xref:bsl/vector-0cf.adoc[`vector&lt;unsigned char&gt;`] 
| 
| xref:bsl/vector-0e8.adoc[`vector&lt;unsigned long&gt;`] 
| 
| xref:bsl/vector-0ea.adoc[`vector&lt;double&gt;`] 
| 
| xref:bsl/vector-0ec.adoc[`vector&lt;unsigned int&gt;`] 
| 
|===


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