bsl::vector<VALUE_TYPE*, ALLOCATOR>

This partial specialization of vector for pointer types to a (template parameter) VALUE_TYPE type is implemented in terms of vector<UintPtr> to reduce.

Synopsis

Declared in <bslstl_vector.h>

template<
    class VALUE_TYPE,
    class ALLOCATOR>
class vector<VALUE_TYPE*, ALLOCATOR>;

Description

This partial specialization of vector for pointer types to a (template parameter) VALUE_TYPE type is implemented in terms of vector<UintPtr> to reduce the amount of code generated. Note that this specialization rebinds the (template parameter) ALLOCATOR type to an allocator of UintPtr so as to satisfy the invariant in the vector base class. Note that the contract for all members is the same as the primary template, so documentation is not repeated to avoid accidentally introducing inconsistency over time.

Type Aliases

NameDescription
allocator_type This typedef is an alias to the (template parameter) ALLOCATOR.
const_iterator This typedef is an alias to VALUE_TYPE *const *.
const_pointer This typedef is an alias to AllocatorTraits::const_pointer.
const_reference This typedef is an alias to const value_type&.
const_reverse_iterator This typedef is an alias to bsl::reverse_iterator<const_iterator>.
difference_type This typedef is an alias to std::ptrdiff_t.
iterator This typedef is an alias to VALUE_TYPE **.
pointer This typedef is an alias to AllocatorTraits::pointer.
reference This typedef is an alias to value_type&.
reverse_iterator This typedef is an alias to bsl::reverse_iterator<iterator>.
size_type This typedef is an alias to std::size_t.
value_type This typedef is an alias to VALUE_TYPE *.

Member Functions

NameDescription
vector [constructor]Create a vector object.
~vector [destructor]Destroy this vector and all of its elements.
operator= Assignment operators
append_range Append elements from a range to this vector.
assign Assign a new value to this vector.
assign_range Assign elements from a range to this vector.
at Return a reference to the element at the specified position.
back Return a reference to the last element of this vector.
begin begin overloads
capacity Return the capacity of this vector.
cbegin Return a const iterator to the first element of this vector.
cend Return a const past-the-end iterator for this vector.
clear Remove all elements from this vector.
crbegin Return a const reverse iterator to the last element.
crend Return a const past-the-end reverse iterator.
data Return a pointer to the contiguous element storage.
emplace Emplace a newly constructed element at the specified position.
emplace_back Emplace a newly constructed element at the end.
empty Return whether this vector contains no elements.
end end overloads
erase Erase elements from this vector.
front Return a reference to the first element of this vector.
get_allocator Return a copy of the allocator used by this vector.
insert Insert elements into this vector.
insert_range Insert elements from a range into this vector.
max_size Return a theoretical upper bound on this vector's size.
operator[] Return a reference to the element at the specified position.
pop_back Remove the last element of this vector.
push_back Append an element to the end of this vector.
rbegin rbegin overloads
rend rend overloads
reserve Request that the capacity be at least the specified value.
resize Change the size of this vector.
shrink_to_fit Request that unused capacity be released.
size Return the number of elements in this vector.
swap Exchange the contents of this vector with those of the specified other.

Friends

NameDescription
bsl::swapExchange the values of the specified a and b objects.
bsl::operator<=>Perform a three-way comparison of the specified lhs and rhs vectors and return the result of that comparison.
bsl::operator==Return true if the specified lhs and rhs vectors have the same value, and false otherwise.