.TH "std::vector< _Tp, _Alloc >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::vector< _Tp, _Alloc > \- A standard container which offers fixed time access to individual elements in any order\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBstd::_Vector_base< _Tp, _Alloc >\fP\&. .PP Inherited by \fBstd::match_results< _Bi_iter, _Alloc >\fP\fC [private]\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP _Alloc \fBallocator_type\fP" .br .ti -1c .RI "\fBtypedef\fP __gnu_cxx::__normal_iterator< const_pointer, \fBvector\fP > \fBconst_iterator\fP" .br .ti -1c .RI "\fBtypedef\fP _Alloc_traits::const_pointer \fBconst_pointer\fP" .br .ti -1c .RI "\fBtypedef\fP _Alloc_traits::const_reference \fBconst_reference\fP" .br .ti -1c .RI "\fBtypedef\fP \fBstd::reverse_iterator\fP< const_iterator > \fBconst_reverse_iterator\fP" .br .ti -1c .RI "\fBtypedef\fP \fBptrdiff_t\fP \fBdifference_type\fP" .br .ti -1c .RI "\fBtypedef\fP __gnu_cxx::__normal_iterator< pointer, \fBvector\fP > \fBiterator\fP" .br .ti -1c .RI "\fBtypedef\fP _Base::pointer \fBpointer\fP" .br .ti -1c .RI "\fBtypedef\fP _Alloc_traits::reference \fBreference\fP" .br .ti -1c .RI "\fBtypedef\fP \fBstd::reverse_iterator\fP< iterator > \fBreverse_iterator\fP" .br .ti -1c .RI "\fBtypedef\fP size_t \fBsize_type\fP" .br .ti -1c .RI "\fBtypedef\fP _Tp \fBvalue_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBvector\fP ()=\fBdefault\fP" .br .RI "Creates a vector with no elements\&. " .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> \fBvector\fP (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBconst\fP allocator_type &__a=allocator_type())" .br .RI "Builds a vector from a range\&. " .ti -1c .RI "\fBvector\fP (\fBconst\fP allocator_type &__a) \fBnoexcept\fP" .br .RI "Creates a vector with no elements\&. " .ti -1c .RI "\fBvector\fP (\fBconst\fP \fBvector\fP &__x)" .br .RI "Vector copy constructor\&. " .ti -1c .RI "\fBvector\fP (\fBconst\fP \fBvector\fP &__x, \fBconst\fP allocator_type &__a)" .br .RI "Copy constructor with alternative allocator\&. " .ti -1c .RI "\fBvector\fP (\fBinitializer_list\fP< value_type > \fB__l\fP, \fBconst\fP allocator_type &__a=allocator_type())" .br .RI "Builds a vector from an initializer list\&. " .ti -1c .RI "\fBvector\fP (size_type __n, \fBconst\fP allocator_type &__a=allocator_type())" .br .RI "Creates a vector with default constructed elements\&. " .ti -1c .RI "\fBvector\fP (size_type __n, \fBconst\fP value_type &__value, \fBconst\fP allocator_type &__a=allocator_type())" .br .RI "Creates a vector with copies of an exemplar element\&. " .ti -1c .RI "\fBvector\fP (\fBvector\fP &&) \fBnoexcept\fP=\fBdefault\fP" .br .RI "Vector move constructor\&. " .ti -1c .RI "\fBvector\fP (\fBvector\fP &&\fB__rv\fP, \fBconst\fP allocator_type &__m) \fBnoexcept\fP(\fBnoexcept\fP(\fBvector\fP(std::declval< \fBvector\fP && >(), std::declval< \fBconst\fP allocator_type & >(), std::declval< \fBtypename\fP \fB_Alloc_traits::is_always_equal\fP >())))" .br .RI "Move constructor with alternative allocator\&. " .ti -1c .RI "\fB~vector\fP () \fBnoexcept\fP" .br .ti -1c .RI "template \fBauto\fP \fB_M_emplace_aux\fP (const_iterator \fB__position\fP, \fB_Args\fP &&\&.\&.\&. \fB__args\fP) \-> iterator" .br .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> \fBvoid\fP \fBassign\fP (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last)" .br .RI "Assigns a range to a vector\&. " .ti -1c .RI "\fBvoid\fP \fBassign\fP (\fBinitializer_list\fP< value_type > \fB__l\fP)" .br .RI "Assigns an initializer list to a vector\&. " .ti -1c .RI "\fBvoid\fP \fBassign\fP (size_type __n, \fBconst\fP value_type &__val)" .br .RI "Assigns a given value to a vector\&. " .ti -1c .RI "reference \fBat\fP (size_type __n)" .br .RI "Provides access to the data contained in the vector\&. " .ti -1c .RI "const_reference \fBat\fP (size_type __n) \fBconst\fP" .br .RI "Provides access to the data contained in the vector\&. " .ti -1c .RI "const_reference \fBback\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "reference \fBback\fP () \fBnoexcept\fP" .br .ti -1c .RI "const_iterator \fBbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "iterator \fBbegin\fP () \fBnoexcept\fP" .br .ti -1c .RI "size_type \fBcapacity\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "const_iterator \fBcbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "const_iterator \fBcend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBclear\fP () \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBcrbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBcrend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBconst\fP _Tp * \fBdata\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "_Tp * \fBdata\fP () \fBnoexcept\fP" .br .ti -1c .RI "template iterator \fBemplace\fP (const_iterator \fB__position\fP, \fB_Args\fP &&\&.\&.\&. \fB__args\fP)" .br .RI "Inserts an object in vector before specified iterator\&. " .ti -1c .RI "template \fBvoid\fP \fBemplace_back\fP (\fB_Args\fP &&\&.\&.\&. \fB__args\fP)" .br .ti -1c .RI "_GLIBCXX_NODISCARD bool \fBempty\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "const_iterator \fBend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "iterator \fBend\fP () \fBnoexcept\fP" .br .ti -1c .RI "iterator \fBerase\fP (const_iterator __first, const_iterator __last)" .br .RI "Remove a range of elements\&. " .ti -1c .RI "iterator \fBerase\fP (const_iterator \fB__position\fP)" .br .RI "Remove element at given position\&. " .ti -1c .RI "const_reference \fBfront\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "reference \fBfront\fP () \fBnoexcept\fP" .br .ti -1c .RI "allocator_type \fBget_allocator\fP () \fBconst\fP \fBnoexcept\fP" .br .RI "Get a copy of the memory allocation object\&. " .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> iterator \fBinsert\fP (const_iterator \fB__position\fP, \fB_InputIterator\fP __first, \fB_InputIterator\fP __last)" .br .RI "Inserts a range into the vector\&. " .ti -1c .RI "iterator \fBinsert\fP (const_iterator \fB__position\fP, \fBconst\fP value_type &__x)" .br .RI "Inserts given value into vector before specified iterator\&. " .ti -1c .RI "iterator \fBinsert\fP (const_iterator \fB__position\fP, \fBinitializer_list\fP< value_type > \fB__l\fP)" .br .RI "Inserts an initializer_list into the vector\&. " .ti -1c .RI "iterator \fBinsert\fP (const_iterator \fB__position\fP, size_type __n, \fBconst\fP value_type &__x)" .br .RI "Inserts a number of copies of given data into the vector\&. " .ti -1c .RI "iterator \fBinsert\fP (const_iterator \fB__position\fP, value_type &&__x)" .br .RI "Inserts given rvalue into vector before specified iterator\&. " .ti -1c .RI "size_type \fBmax_size\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBvector\fP & \fBoperator=\fP (\fBconst\fP \fBvector\fP &__x)" .br .RI "Vector assignment operator\&. " .ti -1c .RI "\fBvector\fP & \fBoperator=\fP (\fBinitializer_list\fP< value_type > \fB__l\fP)" .br .RI "Vector list assignment operator\&. " .ti -1c .RI "\fBvector\fP & \fBoperator=\fP (\fBvector\fP &&__x) \fBnoexcept\fP(_Alloc_traits::_S_nothrow_move())" .br .RI "Vector move assignment operator\&. " .ti -1c .RI "const_reference \fBoperator[]\fP (size_type __n) \fBconst\fP \fBnoexcept\fP" .br .RI "Subscript access to the data contained in the vector\&. " .ti -1c .RI "reference \fBoperator[]\fP (size_type __n) \fBnoexcept\fP" .br .RI "Subscript access to the data contained in the vector\&. " .ti -1c .RI "\fBvoid\fP \fBpop_back\fP () \fBnoexcept\fP" .br .RI "Removes last element\&. " .ti -1c .RI "\fBvoid\fP \fBpush_back\fP (\fBconst\fP value_type &__x)" .br .RI "Add data to the end of the vector\&. " .ti -1c .RI "\fBvoid\fP \fBpush_back\fP (value_type &&__x)" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBrbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBreverse_iterator\fP \fBrbegin\fP () \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBrend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBreverse_iterator\fP \fBrend\fP () \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBreserve\fP (size_type __n)" .br .RI "Attempt to preallocate enough memory for specified number of elements\&. " .ti -1c .RI "\fBvoid\fP \fBresize\fP (size_type \fB__new_size\fP)" .br .RI "Resizes the vector to the specified number of elements\&. " .ti -1c .RI "\fBvoid\fP \fBresize\fP (size_type \fB__new_size\fP, \fBconst\fP value_type &__x)" .br .RI "Resizes the vector to the specified number of elements\&. " .ti -1c .RI "\fBvoid\fP \fBshrink_to_fit\fP ()" .br .ti -1c .RI "size_type \fBsize\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBswap\fP (\fBvector\fP &__x) \fBnoexcept\fP" .br .RI "Swaps data with another vector\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "pointer \fB_M_allocate\fP (size_t __n)" .br .ti -1c .RI "template<\fBtypename\fP \fB_ForwardIterator\fP > pointer \fB_M_allocate_and_copy\fP (size_type __n, \fB_ForwardIterator\fP __first, \fB_ForwardIterator\fP __last)" .br .ti -1c .RI "template<\fBtypename\fP \fB_ForwardIterator\fP > \fBvoid\fP \fB_M_assign_aux\fP (\fB_ForwardIterator\fP __first, \fB_ForwardIterator\fP __last, \fBstd::forward_iterator_tag\fP)" .br .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP \fB_M_assign_aux\fP (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBstd::input_iterator_tag\fP)" .br .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP \fB_M_assign_dispatch\fP (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, __false_type)" .br .ti -1c .RI "template<\fBtypename\fP \fB_Integer\fP > \fBvoid\fP \fB_M_assign_dispatch\fP (\fB_Integer\fP __n, \fB_Integer\fP __val, __true_type)" .br .ti -1c .RI "size_type \fB_M_check_len\fP (size_type __n, \fBconst\fP char *\fB__s\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fB_M_create_storage\fP (size_t __n)" .br .ti -1c .RI "\fBvoid\fP \fB_M_deallocate\fP (pointer __p, size_t __n)" .br .ti -1c .RI "\fBvoid\fP \fB_M_default_append\fP (size_type __n)" .br .ti -1c .RI "\fBvoid\fP \fB_M_default_initialize\fP (size_type __n)" .br .ti -1c .RI "template iterator \fB_M_emplace_aux\fP (const_iterator \fB__position\fP, \fB_Args\fP &&\&.\&.\&. \fB__args\fP)" .br .ti -1c .RI "iterator \fB_M_emplace_aux\fP (const_iterator \fB__position\fP, value_type &&\fB__v\fP)" .br .ti -1c .RI "iterator \fB_M_erase\fP (iterator __first, iterator __last)" .br .ti -1c .RI "iterator \fB_M_erase\fP (iterator \fB__position\fP)" .br .ti -1c .RI "\fBvoid\fP \fB_M_erase_at_end\fP (pointer \fB__pos\fP) \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fB_M_fill_assign\fP (size_type __n, \fBconst\fP value_type &__val)" .br .ti -1c .RI "\fBvoid\fP \fB_M_fill_initialize\fP (size_type __n, \fBconst\fP value_type &__value)" .br .ti -1c .RI "\fBvoid\fP \fB_M_fill_insert\fP (iterator \fB__pos\fP, size_type __n, \fBconst\fP value_type &__x)" .br .ti -1c .RI "\fBconst\fP _Tp_alloc_type & \fB_M_get_Tp_allocator\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "_Tp_alloc_type & \fB_M_get_Tp_allocator\fP () \fBnoexcept\fP" .br .ti -1c .RI "template<\fBtypename\fP _Arg > \fBvoid\fP \fB_M_insert_aux\fP (iterator \fB__position\fP, _Arg &&__arg)" .br .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP \fB_M_insert_dispatch\fP (iterator \fB__pos\fP, \fB_InputIterator\fP __first, \fB_InputIterator\fP __last, __false_type)" .br .ti -1c .RI "template<\fBtypename\fP \fB_Integer\fP > \fBvoid\fP \fB_M_insert_dispatch\fP (iterator \fB__pos\fP, \fB_Integer\fP __n, \fB_Integer\fP __val, __true_type)" .br .ti -1c .RI "iterator \fB_M_insert_rval\fP (const_iterator \fB__position\fP, value_type &&\fB__v\fP)" .br .ti -1c .RI "\fBvoid\fP \fB_M_range_check\fP (size_type __n) \fBconst\fP" .br .RI "Safety check used only from at()\&. " .ti -1c .RI "template<\fBtypename\fP \fB_ForwardIterator\fP > \fBvoid\fP \fB_M_range_initialize\fP (\fB_ForwardIterator\fP __first, \fB_ForwardIterator\fP __last, \fBstd::forward_iterator_tag\fP)" .br .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP \fB_M_range_initialize\fP (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBstd::input_iterator_tag\fP)" .br .ti -1c .RI "template<\fBtypename\fP \fB_ForwardIterator\fP > \fBvoid\fP \fB_M_range_insert\fP (iterator \fB__pos\fP, \fB_ForwardIterator\fP __first, \fB_ForwardIterator\fP __last, \fBstd::forward_iterator_tag\fP)" .br .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP \fB_M_range_insert\fP (iterator \fB__pos\fP, \fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBstd::input_iterator_tag\fP)" .br .ti -1c .RI "template \fBvoid\fP \fB_M_realloc_insert\fP (iterator \fB__position\fP, \fB_Args\fP &&\&.\&.\&. \fB__args\fP)" .br .ti -1c .RI "bool \fB_M_shrink_to_fit\fP ()" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "\fBstatic\fP size_type \fB_S_check_init_len\fP (size_type __n, \fBconst\fP allocator_type &__a)" .br .ti -1c .RI "\fBstatic\fP size_type \fB_S_max_size\fP (\fBconst\fP _Tp_alloc_type &__a) \fBnoexcept\fP" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "_Vector_impl \fB_M_impl\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP _Tp, \fBtypename\fP _Alloc = std::allocator<_Tp>> .br class std::vector< _Tp, _Alloc >"A standard container which offers fixed time access to individual elements in any order\&. .PP \fBTemplate Parameters\fP .RS 4 \fI_Tp\fP Type of element\&. .br \fI_Alloc\fP Allocator type, defaults to allocator<_Tp>\&. .RE .PP Meets the requirements of a \fCcontainer\fP, a \fCreversible container\fP, and a \fCsequence\fP, including the \fCoptional sequence requirements\fP with the exception of \fCpush_front\fP and \fCpop_front\fP\&. .PP In some terminology a vector can be described as a dynamic C-style array, it offers fast and efficient access to individual elements in any order and saves the user from worrying about memory and size allocation\&. Subscripting ( \fC\fP[] ) access is also provided as with C-style arrays\&. .PP Definition at line \fB386\fP of file \fBstl_vector\&.h\fP\&. .SH "Member Typedef Documentation" .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP _Alloc \fBstd::vector\fP< _Tp, _Alloc >::allocator_type" .PP Definition at line \fB423\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP __gnu_cxx::__normal_iterator \fBstd::vector\fP< _Tp, _Alloc >::const_iterator" .PP Definition at line \fB418\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP _Alloc_traits::const_pointer \fBstd::vector\fP< _Tp, _Alloc >::const_pointer" .PP Definition at line \fB413\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP _Alloc_traits::const_reference \fBstd::vector\fP< _Tp, _Alloc >::const_reference" .PP Definition at line \fB415\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP \fBstd::reverse_iterator\fP \fBstd::vector\fP< _Tp, _Alloc >::const_reverse_iterator" .PP Definition at line \fB419\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP \fBptrdiff_t\fP \fBstd::vector\fP< _Tp, _Alloc >::difference_type" .PP Definition at line \fB422\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP __gnu_cxx::__normal_iterator \fBstd::vector\fP< _Tp, _Alloc >::iterator" .PP Definition at line \fB416\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP _Base::pointer \fBstd::vector\fP< _Tp, _Alloc >::pointer" .PP Definition at line \fB412\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP _Alloc_traits::reference \fBstd::vector\fP< _Tp, _Alloc >::reference" .PP Definition at line \fB414\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP \fBstd::reverse_iterator\fP \fBstd::vector\fP< _Tp, _Alloc >::reverse_iterator" .PP Definition at line \fB420\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP size_t \fBstd::vector\fP< _Tp, _Alloc >::size_type" .PP Definition at line \fB421\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBtypedef\fP _Tp \fBstd::vector\fP< _Tp, _Alloc >::value_type" .PP Definition at line \fB411\fP of file \fBstl_vector\&.h\fP\&. .SH "Constructor & Destructor Documentation" .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector ()\fC [default]\fP" .PP Creates a vector with no elements\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector (\fBconst\fP allocator_type & __a)\fC [inline]\fP, \fC [explicit]\fP, \fC [noexcept]\fP" .PP Creates a vector with no elements\&. .PP \fBParameters\fP .RS 4 \fI__a\fP An allocator object\&. .RE .PP .PP Definition at line \fB494\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector (size_type __n, \fBconst\fP allocator_type & __a = \fCallocator_type()\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Creates a vector with default constructed elements\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The number of elements to initially create\&. .br \fI__a\fP An allocator\&. .RE .PP This constructor fills the vector with \fI__n\fP default constructed elements\&. .PP Definition at line \fB507\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector (size_type __n, \fBconst\fP value_type & __value, \fBconst\fP allocator_type & __a = \fCallocator_type()\fP)\fC [inline]\fP" .PP Creates a vector with copies of an exemplar element\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The number of elements to initially create\&. .br \fI__value\fP An element to copy\&. .br \fI__a\fP An allocator\&. .RE .PP This constructor fills the vector with \fI__n\fP copies of \fI__value\fP\&. .PP Definition at line \fB519\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector (\fBconst\fP \fBvector\fP< _Tp, _Alloc > & __x)\fC [inline]\fP" .PP Vector copy constructor\&. .PP \fBParameters\fP .RS 4 \fI__x\fP A vector of identical element and allocator types\&. .RE .PP All the elements of \fI__x\fP are copied, but any unused capacity in \fI__x\fP will not be copied (i\&.e\&. capacity() == size() in the new vector)\&. .PP The newly-created vector uses a copy of the allocator object used by \fI__x\fP (unless the allocator traits dictate a different object)\&. .PP Definition at line \fB550\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP, and \fBstd::vector< _Tp, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector (\fBvector\fP< _Tp, _Alloc > &&)\fC [default]\fP, \fC [noexcept]\fP" .PP Vector move constructor\&. The newly-created vector contains the exact contents of the moved instance\&. The contents of the moved instance are a valid, but unspecified vector\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector (\fBconst\fP \fBvector\fP< _Tp, _Alloc > & __x, \fBconst\fP allocator_type & __a)\fC [inline]\fP" .PP Copy constructor with alternative allocator\&. .PP Definition at line \fB572\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector (\fBvector\fP< _Tp, _Alloc > && __rv, \fBconst\fP allocator_type & __m)\fC [inline]\fP, \fC [noexcept]\fP" .PP Move constructor with alternative allocator\&. .PP Definition at line \fB604\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::vector (\fBinitializer_list\fP< value_type > __l, \fBconst\fP allocator_type & __a = \fCallocator_type()\fP)\fC [inline]\fP" .PP Builds a vector from an initializer list\&. .PP \fBParameters\fP .RS 4 \fI__l\fP An initializer_list\&. .br \fI__a\fP An allocator\&. .RE .PP Create a vector consisting of copies of the elements in the initializer_list \fI__l\fP\&. .PP This will call the element type's copy constructor N times (where N is \fI__l\&.size()\fP) and do no memory reallocation\&. .PP Definition at line \fB622\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> \fBstd::vector\fP< _Tp, _Alloc >::vector (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBconst\fP allocator_type & __a = \fCallocator_type()\fP)\fC [inline]\fP" .PP Builds a vector from a range\&. .PP \fBParameters\fP .RS 4 \fI__first\fP An input iterator\&. .br \fI__last\fP An input iterator\&. .br \fI__a\fP An allocator\&. .RE .PP Create a vector consisting of copies of the elements from [first,last)\&. .PP If the iterators are forward, bidirectional, or random-access, then this will call the elements' copy constructor N times (where N is distance(first,last)) and do no memory reallocation\&. But if only input iterators are used, then this will do at most 2N calls to the copy constructor, and logN memory reallocations\&. .PP Definition at line \fB650\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::__iterator_category()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstd::vector\fP< _Tp, _Alloc >::~\fBvector\fP ()\fC [inline]\fP, \fC [noexcept]\fP" The dtor only erases the elements, and note that if the elements themselves are pointers, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line \fB675\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::_Destroy()\fP\&. .SH "Member Function Documentation" .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> pointer \fBstd::_Vector_base\fP< _Tp, _Alloc >::_M_allocate (size_t __n)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB340\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_ForwardIterator\fP > pointer \fBstd::vector\fP< _Tp, _Alloc >::_M_allocate_and_copy (size_type __n, \fB_ForwardIterator\fP __first, \fB_ForwardIterator\fP __last)\fC [inline]\fP, \fC [protected]\fP" Memory expansion handler\&. Uses the member allocation function to obtain \fIn\fP bytes of memory, and then copies [first,last) into it\&. .PP Definition at line \fB1505\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_ForwardIterator\fP > \fBvoid\fP vector::_M_assign_aux (\fB_ForwardIterator\fP __first, \fB_ForwardIterator\fP __last, \fBstd::forward_iterator_tag\fP)\fC [protected]\fP" .PP Definition at line \fB300\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP vector::_M_assign_aux (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBstd::input_iterator_tag\fP)\fC [protected]\fP" .PP Definition at line \fB282\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_assign_dispatch (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, __false_type)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1623\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_Integer\fP > \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_assign_dispatch (\fB_Integer\fP __n, \fB_Integer\fP __val, __true_type)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1617\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> size_type \fBstd::vector\fP< _Tp, _Alloc >::_M_check_len (size_type __n, \fBconst\fP char * __s) const\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1753\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvoid\fP \fBstd::_Vector_base\fP< _Tp, _Alloc >::_M_create_storage (size_t __n)\fC [inline]\fP, \fC [protected]\fP, \fC [inherited]\fP" .PP Definition at line \fB356\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::_Vector_base\fP< _Tp, _Alloc >::_M_deallocate (pointer __p, size_t __n)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB347\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvoid\fP vector::_M_default_append (size_type __n)\fC [protected]\fP" .PP Definition at line \fB611\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_default_initialize (size_type __n)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1600\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template \fBauto\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_emplace_aux (const_iterator __position, \fB_Args\fP &&\&.\&.\&. __args) \-> iterator " .PP Definition at line \fB364\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> iterator \fBstd::vector\fP< _Tp, _Alloc >::_M_emplace_aux (const_iterator __position, value_type && __v)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1747\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvector\fP< _Tp, _Alloc >::iterator vector::_M_erase (iterator __first, iterator __last)\fC [protected]\fP" .PP Definition at line \fB184\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvector\fP< _Tp, _Alloc >::iterator vector::_M_erase (iterator __position)\fC [protected]\fP" .PP Definition at line \fB171\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_erase_at_end (pointer __pos)\fC [inline]\fP, \fC [protected]\fP, \fC [noexcept]\fP" .PP Definition at line \fB1789\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvoid\fP vector::_M_fill_assign (size_type __n, \fBconst\fP value_type & __val)\fC [protected]\fP" .PP Definition at line \fB257\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_fill_initialize (size_type __n, \fBconst\fP value_type & __value)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1590\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvoid\fP vector::_M_fill_insert (iterator __pos, size_type __n, \fBconst\fP value_type & __x)\fC [protected]\fP" .PP Definition at line \fB509\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBconst\fP _Tp_alloc_type & \fBstd::_Vector_base\fP< _Tp, _Alloc >::_M_get_Tp_allocator () const\fC [inline]\fP, \fC [protected]\fP, \fC [noexcept]\fP" .PP Definition at line \fB277\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> _Tp_alloc_type & \fBstd::_Vector_base\fP< _Tp, _Alloc >::_M_get_Tp_allocator ()\fC [inline]\fP, \fC [protected]\fP, \fC [noexcept]\fP" .PP Definition at line \fB273\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template<\fBtypename\fP _Arg > \fBvoid\fP vector::_M_insert_aux (iterator __position, _Arg && __arg)\fC [protected]\fP" .PP Definition at line \fB395\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_insert_dispatch (iterator __pos, \fB_InputIterator\fP __first, \fB_InputIterator\fP __last, __false_type)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1659\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_Integer\fP > \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_insert_dispatch (iterator __pos, \fB_Integer\fP __n, \fB_Integer\fP __val, __true_type)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1652\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBauto\fP vector::_M_insert_rval (const_iterator __position, value_type && __v)\fC [protected]\fP" .PP Definition at line \fB340\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_range_check (size_type __n) const\fC [inline]\fP, \fC [protected]\fP" .PP Safety check used only from at()\&. .PP Definition at line \fB1067\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::size()\fP\&. .PP Referenced by \fBstd::vector< _Tp, _Alloc >::at()\fP, and \fBstd::vector< _Tp, _Alloc >::at()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_ForwardIterator\fP > \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_range_initialize (\fB_ForwardIterator\fP __first, \fB_ForwardIterator\fP __last, \fBstd::forward_iterator_tag\fP)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1574\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::_M_range_initialize (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBstd::input_iterator_tag\fP)\fC [inline]\fP, \fC [protected]\fP" .PP Definition at line \fB1555\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_ForwardIterator\fP > \fBvoid\fP vector::_M_range_insert (iterator __pos, \fB_ForwardIterator\fP __first, \fB_ForwardIterator\fP __last, \fBstd::forward_iterator_tag\fP)\fC [protected]\fP" .PP Definition at line \fB721\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_InputIterator\fP > \fBvoid\fP vector::_M_range_insert (iterator __pos, \fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBstd::input_iterator_tag\fP)\fC [protected]\fP" .PP Definition at line \fB700\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template \fBvoid\fP vector::_M_realloc_insert (iterator __position, \fB_Args\fP &&\&.\&.\&. __args)\fC [protected]\fP" .PP Definition at line \fB426\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > bool vector::_M_shrink_to_fit ()\fC [protected]\fP" .PP Definition at line \fB687\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstatic\fP size_type \fBstd::vector\fP< _Tp, _Alloc >::_S_check_init_len (size_type __n, \fBconst\fP allocator_type & __a)\fC [inline]\fP, \fC [static]\fP, \fC [protected]\fP" .PP Definition at line \fB1764\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBstatic\fP size_type \fBstd::vector\fP< _Tp, _Alloc >::_S_max_size (\fBconst\fP _Tp_alloc_type & __a)\fC [inline]\fP, \fC [static]\fP, \fC [protected]\fP, \fC [noexcept]\fP" .PP Definition at line \fB1773\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::assign (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last)\fC [inline]\fP" .PP Assigns a range to a vector\&. .PP \fBParameters\fP .RS 4 \fI__first\fP An input iterator\&. .br \fI__last\fP An input iterator\&. .RE .PP This function fills a vector with copies of the elements in the range [__first,__last)\&. .PP Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned\&. .PP Definition at line \fB765\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::assign (\fBinitializer_list\fP< value_type > __l)\fC [inline]\fP" .PP Assigns an initializer list to a vector\&. .PP \fBParameters\fP .RS 4 \fI__l\fP An initializer_list\&. .RE .PP This function fills a vector with copies of the elements in the initializer list \fI__l\fP\&. .PP Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned\&. .PP Definition at line \fB791\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::assign (size_type __n, \fBconst\fP value_type & __val)\fC [inline]\fP" .PP Assigns a given value to a vector\&. .PP \fBParameters\fP .RS 4 \fI__n\fP Number of elements to be assigned\&. .br \fI__val\fP Value to be assigned\&. .RE .PP This function fills a vector with \fI__n\fP copies of the given value\&. Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned\&. .PP Definition at line \fB746\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> reference \fBstd::vector\fP< _Tp, _Alloc >::at (size_type __n)\fC [inline]\fP" .PP Provides access to the data contained in the vector\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The index of the element for which data should be accessed\&. .RE .PP \fBReturns\fP .RS 4 Read/write reference to data\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fI__n\fP is an invalid index\&. .RE .PP This function provides for safer data access\&. The parameter is first checked that it is in the range of the vector\&. The function throws out_of_range if the check fails\&. .PP Definition at line \fB1089\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::_M_range_check()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> const_reference \fBstd::vector\fP< _Tp, _Alloc >::at (size_type __n) const\fC [inline]\fP" .PP Provides access to the data contained in the vector\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The index of the element for which data should be accessed\&. .RE .PP \fBReturns\fP .RS 4 Read-only (constant) reference to data\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::out_of_range\fP If \fI__n\fP is an invalid index\&. .RE .PP This function provides for safer data access\&. The parameter is first checked that it is in the range of the vector\&. The function throws out_of_range if the check fails\&. .PP Definition at line \fB1107\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::_M_range_check()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> const_reference \fBstd::vector\fP< _Tp, _Alloc >::back () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reference to the data at the last element of the vector\&. .PP Definition at line \fB1151\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> reference \fBstd::vector\fP< _Tp, _Alloc >::back ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write reference to the data at the last element of the vector\&. .PP Definition at line \fB1140\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::end()\fP\&. .PP Referenced by \fBstd::piecewise_constant_distribution< _RealType >::max()\fP, and \fBstd::piecewise_linear_distribution< _RealType >::max()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> const_iterator \fBstd::vector\fP< _Tp, _Alloc >::begin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points to the first element in the vector\&. Iteration is done in ordinary element order\&. .PP Definition at line \fB817\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> iterator \fBstd::vector\fP< _Tp, _Alloc >::begin ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write iterator that points to the first element in the vector\&. Iteration is done in ordinary element order\&. .PP Definition at line \fB808\fP of file \fBstl_vector\&.h\fP\&. .PP Referenced by \fBstd::vector< _Tp, _Alloc >::vector()\fP, \fBstd::vector< _Tp, _Alloc >::crend()\fP, \fBstd::vector< _Tp, _Alloc >::empty()\fP, \fBstd::vector< _Tp, _Alloc >::erase()\fP, \fBstd::vector< _Tp, _Alloc >::erase()\fP, \fBstd::vector< _Tp, _Alloc >::front()\fP, \fBstd::vector< _Tp, _Alloc >::front()\fP, \fBstd::vector< _Tp, _Alloc >::insert()\fP, \fBstd::vector< _Tp, _Alloc >::insert()\fP, \fBstd::vector< _Tp, _Alloc >::insert()\fP, \fBstd::vector< _Tp, _Alloc >::rend()\fP, and \fBstd::vector< _Tp, _Alloc >::rend()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> size_type \fBstd::vector\fP< _Tp, _Alloc >::capacity () const\fC [inline]\fP, \fC [noexcept]\fP" Returns the total number of elements that the vector can hold before needing to allocate more memory\&. .PP Definition at line \fB995\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> const_iterator \fBstd::vector\fP< _Tp, _Alloc >::cbegin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points to the first element in the vector\&. Iteration is done in ordinary element order\&. .PP Definition at line \fB881\fP of file \fBstl_vector\&.h\fP\&. .PP Referenced by \fBstd::vector< _Tp, _Alloc >::erase()\fP, \fBstd::vector< _Tp, _Alloc >::erase()\fP, \fBstd::vector< _Tp, _Alloc >::insert()\fP, \fBstd::vector< _Tp, _Alloc >::insert()\fP, and \fBstd::vector< _Tp, _Alloc >::insert()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> const_iterator \fBstd::vector\fP< _Tp, _Alloc >::cend () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points one past the last element in the vector\&. Iteration is done in ordinary element order\&. .PP Definition at line \fB890\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::clear ()\fC [inline]\fP, \fC [noexcept]\fP" Erases all the elements\&. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line \fB1495\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBconst_reverse_iterator\fP \fBstd::vector\fP< _Tp, _Alloc >::crbegin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reverse iterator that points to the last element in the vector\&. Iteration is done in reverse element order\&. .PP Definition at line \fB899\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBconst_reverse_iterator\fP \fBstd::vector\fP< _Tp, _Alloc >::crend () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reverse iterator that points to one before the first element in the vector\&. Iteration is done in reverse element order\&. .PP Definition at line \fB908\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBconst\fP _Tp * \fBstd::vector\fP< _Tp, _Alloc >::data () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Definition at line \fB1169\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> _Tp * \fBstd::vector\fP< _Tp, _Alloc >::data ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a pointer such that [data(), data() + size()) is a valid range\&. For a non-empty vector, data() == &front()\&. .PP Definition at line \fB1165\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template iterator \fBstd::vector\fP< _Tp, _Alloc >::emplace (const_iterator __position, \fB_Args\fP &&\&.\&.\&. __args)\fC [inline]\fP" .PP Inserts an object in vector before specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the vector\&. .br \fI__args\fP Arguments\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the inserted data\&. .RE .PP This function will insert an object of type T constructed with T(std::forward(args)\&.\&.\&.) before the specified location\&. Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list\&. .PP Definition at line \fB1245\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template \fBvoid\fP vector::emplace_back (\fB_Args\fP &&\&.\&.\&. __args)" .PP Definition at line \fB109\fP of file \fBvector\&.tcc\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> _GLIBCXX_NODISCARD bool \fBstd::vector\fP< _Tp, _Alloc >::empty () const\fC [inline]\fP, \fC [noexcept]\fP" Returns true if the vector is empty\&. (Thus begin() would equal end()\&.) .PP Definition at line \fB1004\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP, and \fBstd::vector< _Tp, _Alloc >::end()\fP\&. .PP Referenced by \fBstd::piecewise_constant_distribution< _RealType >::densities()\fP, \fBstd::piecewise_linear_distribution< _RealType >::densities()\fP, \fBstd::piecewise_constant_distribution< _RealType >::intervals()\fP, \fBstd::piecewise_linear_distribution< _RealType >::intervals()\fP, \fBstd::discrete_distribution< _IntType >::max()\fP, \fBstd::piecewise_constant_distribution< _RealType >::max()\fP, \fBstd::piecewise_linear_distribution< _RealType >::max()\fP, \fBstd::piecewise_constant_distribution< _RealType >::min()\fP, \fBstd::piecewise_linear_distribution< _RealType >::min()\fP, and \fBstd::discrete_distribution< _IntType >::probabilities()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> const_iterator \fBstd::vector\fP< _Tp, _Alloc >::end () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points one past the last element in the vector\&. Iteration is done in ordinary element order\&. .PP Definition at line \fB835\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> iterator \fBstd::vector\fP< _Tp, _Alloc >::end ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write iterator that points one past the last element in the vector\&. Iteration is done in ordinary element order\&. .PP Definition at line \fB826\fP of file \fBstl_vector\&.h\fP\&. .PP Referenced by \fBstd::vector< _Tp, _Alloc >::vector()\fP, \fBstd::vector< _Tp, _Alloc >::back()\fP, \fBstd::vector< _Tp, _Alloc >::back()\fP, \fBstd::vector< _Tp, _Alloc >::crbegin()\fP, \fBstd::vector< _Tp, _Alloc >::empty()\fP, \fBstd::vector< _Tp, _Alloc >::push_back()\fP, \fBstd::vector< _Tp, _Alloc >::rbegin()\fP, \fBstd::vector< _Tp, _Alloc >::rbegin()\fP, and \fBstd::vector< _Tp, _Alloc >::resize()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> iterator \fBstd::vector\fP< _Tp, _Alloc >::erase (const_iterator __first, const_iterator __last)\fC [inline]\fP" .PP Remove a range of elements\&. .PP \fBParameters\fP .RS 4 \fI__first\fP Iterator pointing to the first element to be erased\&. .br \fI__last\fP Iterator pointing to one past the last element to be erased\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the element pointed to by \fI__last\fP prior to erasing (or end())\&. .RE .PP This function will erase the elements in the range [__first,__last) and shorten the vector accordingly\&. .PP Note This operation could be expensive and if it is frequently used the user should consider using std::list\&. The user is also cautioned that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line \fB1454\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP, and \fBstd::vector< _Tp, _Alloc >::cbegin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> iterator \fBstd::vector\fP< _Tp, _Alloc >::erase (const_iterator __position)\fC [inline]\fP" .PP Remove element at given position\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Iterator pointing to element to be erased\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the next element (or end())\&. .RE .PP This function will erase the element at the given position and thus shorten the vector by one\&. .PP Note This operation could be expensive and if it is frequently used the user should consider using std::list\&. The user is also cautioned that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way\&. Managing the pointer is the user's responsibility\&. .PP Definition at line \fB1427\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP, and \fBstd::vector< _Tp, _Alloc >::cbegin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> const_reference \fBstd::vector\fP< _Tp, _Alloc >::front () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reference to the data at the first element of the vector\&. .PP Definition at line \fB1129\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> reference \fBstd::vector\fP< _Tp, _Alloc >::front ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write reference to the data at the first element of the vector\&. .PP Definition at line \fB1118\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP\&. .PP Referenced by \fBstd::piecewise_constant_distribution< _RealType >::min()\fP, and \fBstd::piecewise_linear_distribution< _RealType >::min()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> allocator_type \fBstd::_Vector_base\fP< _Tp, _Alloc >::get_allocator () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Get a copy of the memory allocation object\&. .PP Definition at line \fB281\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> iterator \fBstd::vector\fP< _Tp, _Alloc >::insert (const_iterator __position, \fB_InputIterator\fP __first, \fB_InputIterator\fP __last)\fC [inline]\fP" .PP Inserts a range into the vector\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the vector\&. .br \fI__first\fP An input iterator\&. .br \fI__last\fP An input iterator\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the inserted data\&. .RE .PP This function will insert copies of the data in the range [__first,__last) into the vector before the location specified by \fIpos\fP\&. .PP Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list\&. .PP Definition at line \fB1376\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP, and \fBstd::vector< _Tp, _Alloc >::cbegin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvector\fP< _Tp, _Alloc >::iterator vector::insert (const_iterator __position, \fBconst\fP value_type & __x)" .PP Inserts given value into vector before specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the vector\&. .br \fI__x\fP Data to be inserted\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the inserted data\&. .RE .PP This function will insert a copy of the given value before the specified location\&. Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list\&. .PP Definition at line \fB130\fP of file \fBvector\&.tcc\fP\&. .PP References \fBstd::begin()\fP, \fBstd::cbegin()\fP, and \fBstd::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> iterator \fBstd::vector\fP< _Tp, _Alloc >::insert (const_iterator __position, \fBinitializer_list\fP< value_type > __l)\fC [inline]\fP" .PP Inserts an initializer_list into the vector\&. .PP \fBParameters\fP .RS 4 \fI__position\fP An iterator into the vector\&. .br \fI__l\fP An initializer_list\&. .RE .PP This function will insert copies of the data in the initializer_list \fIl\fP into the vector before the location specified by \fIposition\fP\&. .PP Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list\&. .PP Definition at line \fB1307\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP, and \fBstd::vector< _Tp, _Alloc >::cbegin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> iterator \fBstd::vector\fP< _Tp, _Alloc >::insert (const_iterator __position, size_type __n, \fBconst\fP value_type & __x)\fC [inline]\fP" .PP Inserts a number of copies of given data into the vector\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the vector\&. .br \fI__n\fP Number of elements to be inserted\&. .br \fI__x\fP Data to be inserted\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the inserted data\&. .RE .PP This function will insert a specified number of copies of the given data before the location specified by \fIposition\fP\&. .PP Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list\&. .PP Definition at line \fB1332\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP, and \fBstd::vector< _Tp, _Alloc >::cbegin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> iterator \fBstd::vector\fP< _Tp, _Alloc >::insert (const_iterator __position, value_type && __x)\fC [inline]\fP" .PP Inserts given rvalue into vector before specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the vector\&. .br \fI__x\fP Data to be inserted\&. .RE .PP \fBReturns\fP .RS 4 An iterator that points to the inserted data\&. .RE .PP This function will insert a copy of the given rvalue before the specified location\&. Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list\&. .PP Definition at line \fB1290\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> size_type \fBstd::vector\fP< _Tp, _Alloc >::max_size () const\fC [inline]\fP, \fC [noexcept]\fP" Returns the size() of the largest possible vector\&. .PP Definition at line \fB920\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvector\fP< _Tp, _Alloc > & vector::operator= (\fBconst\fP \fBvector\fP< _Tp, _Alloc > & __x)" .PP Vector assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__x\fP A vector of identical element and allocator types\&. .RE .PP All the elements of \fI__x\fP are copied, but any unused capacity in \fI__x\fP will not be copied\&. .PP Whether the allocator is copied depends on the allocator traits\&. .PP Definition at line \fB198\fP of file \fBvector\&.tcc\fP\&. .PP References \fBstd::_Destroy()\fP, \fBstd::begin()\fP, and \fBstd::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvector\fP & \fBstd::vector\fP< _Tp, _Alloc >::operator= (\fBinitializer_list\fP< value_type > __l)\fC [inline]\fP" .PP Vector list assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__l\fP An initializer_list\&. .RE .PP This function fills a vector with copies of the elements in the initializer list \fI__l\fP\&. .PP Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned\&. .PP Definition at line \fB727\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvector\fP & \fBstd::vector\fP< _Tp, _Alloc >::operator= (\fBvector\fP< _Tp, _Alloc > && __x)\fC [inline]\fP, \fC [noexcept]\fP" .PP Vector move assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__x\fP A vector of identical element and allocator types\&. .RE .PP The contents of \fI__x\fP are moved into this vector (without copying, if the allocators permit it)\&. Afterwards \fI__x\fP is a valid, but unspecified vector\&. .PP Whether the allocator is moved depends on the allocator traits\&. .PP Definition at line \fB706\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> const_reference \fBstd::vector\fP< _Tp, _Alloc >::operator[] (size_type __n) const\fC [inline]\fP, \fC [noexcept]\fP" .PP Subscript access to the data contained in the vector\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The index of the element for which data should be accessed\&. .RE .PP \fBReturns\fP .RS 4 Read-only (constant) reference to data\&. .RE .PP This operator allows for easy, array-style, data access\&. Note that data access with this operator is unchecked and out_of_range lookups are not defined\&. (For checked lookups see at()\&.) .PP Definition at line \fB1058\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> reference \fBstd::vector\fP< _Tp, _Alloc >::operator[] (size_type __n)\fC [inline]\fP, \fC [noexcept]\fP" .PP Subscript access to the data contained in the vector\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The index of the element for which data should be accessed\&. .RE .PP \fBReturns\fP .RS 4 Read/write reference to data\&. .RE .PP This operator allows for easy, array-style, data access\&. Note that data access with this operator is unchecked and out_of_range lookups are not defined\&. (For checked lookups see at()\&.) .PP Definition at line \fB1040\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::pop_back ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Removes last element\&. This is a typical stack operation\&. It shrinks the vector by one\&. .PP Note that no data is returned, and if the last element's data is needed, it should be retrieved before pop_back() is called\&. .PP Definition at line \fB1222\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::push_back (\fBconst\fP value_type & __x)\fC [inline]\fP" .PP Add data to the end of the vector\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Data to be added\&. .RE .PP This is a typical stack operation\&. The function creates an element at the end of the vector and assigns the given data to it\&. Due to the nature of a vector this operation can be done in constant time if the vector has preallocated space available\&. .PP Definition at line \fB1184\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::push_back (value_type && __x)\fC [inline]\fP" .PP Definition at line \fB1200\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBconst_reverse_iterator\fP \fBstd::vector\fP< _Tp, _Alloc >::rbegin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reverse iterator that points to the last element in the vector\&. Iteration is done in reverse element order\&. .PP Definition at line \fB853\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBreverse_iterator\fP \fBstd::vector\fP< _Tp, _Alloc >::rbegin ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write reverse iterator that points to the last element in the vector\&. Iteration is done in reverse element order\&. .PP Definition at line \fB844\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBconst_reverse_iterator\fP \fBstd::vector\fP< _Tp, _Alloc >::rend () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) reverse iterator that points to one before the first element in the vector\&. Iteration is done in reverse element order\&. .PP Definition at line \fB871\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBreverse_iterator\fP \fBstd::vector\fP< _Tp, _Alloc >::rend ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write reverse iterator that points to one before the first element in the vector\&. Iteration is done in reverse element order\&. .PP Definition at line \fB862\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::begin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvoid\fP vector::reserve (size_type __n)" .PP Attempt to preallocate enough memory for specified number of elements\&. .PP \fBParameters\fP .RS 4 \fI__n\fP Number of elements required\&. .RE .PP \fBExceptions\fP .RS 4 \fIstd::length_error\fP If \fIn\fP exceeds \fCmax_size()\fP\&. .RE .PP This function attempts to reserve enough memory for the vector to hold the specified number of elements\&. If the number requested is more than max_size(), length_error is thrown\&. .PP The advantage of this function is that if optimal code is a necessity and the user can determine the number of elements that will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and copying of vector data\&. .PP Definition at line \fB66\fP of file \fBvector\&.tcc\fP\&. .PP References \fBstd::_Destroy()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::resize (size_type __new_size)\fC [inline]\fP" .PP Resizes the vector to the specified number of elements\&. .PP \fBParameters\fP .RS 4 \fI__new_size\fP Number of elements the vector should contain\&. .RE .PP This function will resize the vector to the specified number of elements\&. If the number is smaller than the vector's current size the vector is truncated, otherwise default constructed elements are appended\&. .PP Definition at line \fB934\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::resize (size_type __new_size, \fBconst\fP value_type & __x)\fC [inline]\fP" .PP Resizes the vector to the specified number of elements\&. .PP \fBParameters\fP .RS 4 \fI__new_size\fP Number of elements the vector should contain\&. .br \fI__x\fP Data with which new elements should be populated\&. .RE .PP This function will resize the vector to the specified number of elements\&. If the number is smaller than the vector's current size the vector is truncated, otherwise the vector is extended and new elements are populated with given data\&. .PP Definition at line \fB954\fP of file \fBstl_vector\&.h\fP\&. .PP References \fBstd::vector< _Tp, _Alloc >::end()\fP, and \fBstd::vector< _Tp, _Alloc >::size()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::shrink_to_fit ()\fC [inline]\fP" A non-binding request to reduce capacity() to size()\&. .PP Definition at line \fB986\fP of file \fBstl_vector\&.h\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> size_type \fBstd::vector\fP< _Tp, _Alloc >::size () const\fC [inline]\fP, \fC [noexcept]\fP" Returns the number of elements in the vector\&. .PP Definition at line \fB915\fP of file \fBstl_vector\&.h\fP\&. .PP Referenced by \fBstd::vector< _Tp, _Alloc >::_M_range_check()\fP, \fBstd::discrete_distribution< _IntType >::max()\fP, \fBstd::vector< _Tp, _Alloc >::resize()\fP, and \fBstd::vector< _Tp, _Alloc >::resize()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> \fBvoid\fP \fBstd::vector\fP< _Tp, _Alloc >::swap (\fBvector\fP< _Tp, _Alloc > & __x)\fC [inline]\fP, \fC [noexcept]\fP" .PP Swaps data with another vector\&. .PP \fBParameters\fP .RS 4 \fI__x\fP A vector of the same element and allocator types\&. .RE .PP This exchanges the elements between two vectors in constant time\&. (Three pointers, so it should be quite fast\&.) Note that the global std::swap() function is specialized such that std::swap(v1,v2) will feed to this function\&. .PP Whether the allocators are swapped depends on the allocator traits\&. .PP Definition at line \fB1477\fP of file \fBstl_vector\&.h\fP\&. .SH "Member Data Documentation" .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = std::allocator<_Tp>> _Vector_impl \fBstd::_Vector_base\fP< _Tp, _Alloc >::_M_impl\fC [protected]\fP" .PP Definition at line \fB337\fP of file \fBstl_vector\&.h\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.