.TH "std::list< _Tp, _Alloc >" 3cxx "Tue Jul 18 2023" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::list< _Tp, _Alloc > \- A standard container with linear time access to elements, and fixed time insertion/deletion at any point in the sequence\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBstd::_List_base< _Tp, std::allocator< _Tp > >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef _Alloc \fBallocator_type\fP" .br .ti -1c .RI "typedef \fB_List_const_iterator\fP< _Tp > \fBconst_iterator\fP" .br .ti -1c .RI "typedef _Tp_alloc_traits::const_pointer \fBconst_pointer\fP" .br .ti -1c .RI "typedef _Tp_alloc_traits::const_reference \fBconst_reference\fP" .br .ti -1c .RI "typedef \fBstd::reverse_iterator\fP< \fBconst_iterator\fP > \fBconst_reverse_iterator\fP" .br .ti -1c .RI "typedef ptrdiff_t \fBdifference_type\fP" .br .ti -1c .RI "typedef \fB_List_iterator\fP< _Tp > \fBiterator\fP" .br .ti -1c .RI "typedef _Tp_alloc_traits::pointer \fBpointer\fP" .br .ti -1c .RI "typedef _Tp_alloc_traits::reference \fBreference\fP" .br .ti -1c .RI "typedef \fBstd::reverse_iterator\fP< \fBiterator\fP > \fBreverse_iterator\fP" .br .ti -1c .RI "typedef size_t \fBsize_type\fP" .br .ti -1c .RI "typedef _Tp \fBvalue_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBlist\fP ()=default" .br .RI "Creates a list with no elements\&. " .ti -1c .RI "template> \fBlist\fP (_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())" .br .RI "Builds a list from a range\&. " .ti -1c .RI "\fBlist\fP (const allocator_type &__a) noexcept" .br .RI "Creates a list with no elements\&. " .ti -1c .RI "\fBlist\fP (const \fBlist\fP &__x)" .br .RI "List copy constructor\&. " .ti -1c .RI "\fBlist\fP (const \fBlist\fP &__x, const allocator_type &__a)" .br .ti -1c .RI "\fBlist\fP (\fBinitializer_list\fP< value_type > __l, const allocator_type &__a=allocator_type())" .br .RI "Builds a list from an initializer_list\&. " .ti -1c .RI "\fBlist\fP (\fBlist\fP &&)=default" .br .RI "List move constructor\&. " .ti -1c .RI "\fBlist\fP (\fBlist\fP &&__x, const allocator_type &__a) noexcept(_Node_alloc_traits::_S_always_equal())" .br .ti -1c .RI "\fBlist\fP (size_type __n, const allocator_type &__a=allocator_type())" .br .RI "Creates a list with default constructed elements\&. " .ti -1c .RI "\fBlist\fP (size_type __n, const value_type &__value, const allocator_type &__a=allocator_type())" .br .RI "Creates a list with copies of an exemplar element\&. " .ti -1c .RI "\fB~list\fP ()=default" .br .ti -1c .RI "template> void \fBassign\fP (_InputIterator __first, _InputIterator __last)" .br .RI "Assigns a range to a list\&. " .ti -1c .RI "void \fBassign\fP (\fBinitializer_list\fP< value_type > __l)" .br .RI "Assigns an initializer_list to a list\&. " .ti -1c .RI "void \fBassign\fP (size_type __n, const value_type &__val)" .br .RI "Assigns a given value to a list\&. " .ti -1c .RI "const_reference \fBback\fP () const noexcept" .br .ti -1c .RI "reference \fBback\fP () noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fBbegin\fP () const noexcept" .br .ti -1c .RI "\fBiterator\fP \fBbegin\fP () noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fBcbegin\fP () const noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fBcend\fP () const noexcept" .br .ti -1c .RI "void \fBclear\fP () noexcept" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBcrbegin\fP () const noexcept" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBcrend\fP () const noexcept" .br .ti -1c .RI "template \fBiterator\fP \fBemplace\fP (\fBconst_iterator\fP __position, _Args &&\&.\&.\&. __args)" .br .RI "Constructs object in list before specified iterator\&. " .ti -1c .RI "template void \fBemplace_back\fP (_Args &&\&.\&.\&. __args)" .br .ti -1c .RI "template void \fBemplace_front\fP (_Args &&\&.\&.\&. __args)" .br .ti -1c .RI "bool \fBempty\fP () const noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fBend\fP () const noexcept" .br .ti -1c .RI "\fBiterator\fP \fBend\fP () noexcept" .br .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBconst_iterator\fP __first, \fBconst_iterator\fP __last) noexcept" .br .RI "Remove a range of elements\&. " .ti -1c .RI "\fBiterator\fP \fBerase\fP (\fBconst_iterator\fP __position) noexcept" .br .RI "Remove element at given position\&. " .ti -1c .RI "const_reference \fBfront\fP () const noexcept" .br .ti -1c .RI "reference \fBfront\fP () noexcept" .br .ti -1c .RI "allocator_type \fBget_allocator\fP () const noexcept" .br .RI "Get a copy of the memory allocation object\&. " .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __p, \fBinitializer_list\fP< value_type > __l)" .br .RI "Inserts the contents of an initializer_list into list before specified const_iterator\&. " .ti -1c .RI "template> \fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __position, _InputIterator __first, _InputIterator __last)" .br .RI "Inserts a range into the list\&. " .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __position, const value_type &__x)" .br .RI "Inserts given value into list before specified iterator\&. " .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __position, size_type __n, const value_type &__x)" .br .RI "Inserts a number of copies of given data into the list\&. " .ti -1c .RI "\fBiterator\fP \fBinsert\fP (\fBconst_iterator\fP __position, value_type &&__x)" .br .RI "Inserts given rvalue into list before specified iterator\&. " .ti -1c .RI "size_type \fBmax_size\fP () const noexcept" .br .ti -1c .RI "void \fBmerge\fP (\fBlist\fP &&__x)" .br .RI "Merge sorted lists\&. " .ti -1c .RI "template void \fBmerge\fP (\fBlist\fP &&__x, _StrictWeakOrdering __comp)" .br .RI "Merge sorted lists according to comparison function\&. " .ti -1c .RI "void \fBmerge\fP (\fBlist\fP &__x)" .br .ti -1c .RI "template void \fBmerge\fP (\fBlist\fP &__x, _StrictWeakOrdering __comp)" .br .ti -1c .RI "\fBlist\fP & \fBoperator=\fP (const \fBlist\fP &__x)" .br .RI "List assignment operator\&. " .ti -1c .RI "\fBlist\fP & \fBoperator=\fP (\fBinitializer_list\fP< value_type > __l)" .br .RI "List initializer list assignment operator\&. " .ti -1c .RI "\fBlist\fP & \fBoperator=\fP (\fBlist\fP &&__x) noexcept(_Node_alloc_traits::_S_nothrow_move())" .br .RI "List move assignment operator\&. " .ti -1c .RI "void \fBpop_back\fP () noexcept" .br .RI "Removes last element\&. " .ti -1c .RI "void \fBpop_front\fP () noexcept" .br .RI "Removes first element\&. " .ti -1c .RI "void \fBpush_back\fP (const value_type &__x)" .br .RI "Add data to the end of the list\&. " .ti -1c .RI "void \fBpush_back\fP (value_type &&__x)" .br .ti -1c .RI "void \fBpush_front\fP (const value_type &__x)" .br .RI "Add data to the front of the list\&. " .ti -1c .RI "void \fBpush_front\fP (value_type &&__x)" .br .ti -1c .RI "\fBconst_reverse_iterator\fP \fBrbegin\fP () const noexcept" .br .ti -1c .RI "\fBreverse_iterator\fP \fBrbegin\fP () noexcept" .br .ti -1c .RI "__remove_return_type \fBremove\fP (const _Tp &__value)" .br .RI "Remove all elements equal to value\&. " .ti -1c .RI "template __remove_return_type \fBremove_if\fP (_Predicate)" .br .RI "Remove all elements satisfying a predicate\&. " .ti -1c .RI "\fBconst_reverse_iterator\fP \fBrend\fP () const noexcept" .br .ti -1c .RI "\fBreverse_iterator\fP \fBrend\fP () noexcept" .br .ti -1c .RI "void \fBresize\fP (size_type __new_size)" .br .RI "Resizes the list to the specified number of elements\&. " .ti -1c .RI "void \fBresize\fP (size_type __new_size, const value_type &__x)" .br .RI "Resizes the list to the specified number of elements\&. " .ti -1c .RI "void \fBreverse\fP () noexcept" .br .RI "Reverse the elements in list\&. " .ti -1c .RI "size_type \fBsize\fP () const noexcept" .br .ti -1c .RI "void \fBsort\fP ()" .br .RI "Sort the elements\&. " .ti -1c .RI "template void \fBsort\fP (_StrictWeakOrdering)" .br .RI "Sort the elements according to comparison function\&. " .ti -1c .RI "void \fBsplice\fP (\fBconst_iterator\fP __position, \fBlist\fP &&__x) noexcept" .br .RI "Insert contents of another list\&. " .ti -1c .RI "void \fBsplice\fP (\fBconst_iterator\fP __position, \fBlist\fP &&__x, \fBconst_iterator\fP __first, \fBconst_iterator\fP __last) noexcept" .br .RI "Insert range from another list\&. " .ti -1c .RI "void \fBsplice\fP (\fBconst_iterator\fP __position, \fBlist\fP &&__x, \fBconst_iterator\fP __i) noexcept" .br .RI "Insert element from another list\&. " .ti -1c .RI "void \fBsplice\fP (\fBconst_iterator\fP __position, \fBlist\fP &__x) noexcept" .br .ti -1c .RI "void \fBsplice\fP (\fBconst_iterator\fP __position, \fBlist\fP &__x, \fBconst_iterator\fP __first, \fBconst_iterator\fP __last) noexcept" .br .RI "Insert range from another list\&. " .ti -1c .RI "void \fBsplice\fP (\fBconst_iterator\fP __position, \fBlist\fP &__x, \fBconst_iterator\fP __i) noexcept" .br .RI "Insert element from another list\&. " .ti -1c .RI "void \fBswap\fP (\fBlist\fP &__x) noexcept" .br .RI "Swaps data with another list\&. " .ti -1c .RI "__remove_return_type \fBunique\fP ()" .br .RI "Remove consecutive duplicate elements\&. " .ti -1c .RI "template __remove_return_type \fBunique\fP (_BinaryPredicate)" .br .RI "Remove consecutive elements satisfying a predicate\&. " .in -1c .SS "Protected Types" .in +1c .ti -1c .RI "typedef \fB_List_node\fP< _Tp > \fB_Node\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "template void \fB_M_assign_dispatch\fP (_InputIterator __first, _InputIterator __last, __false_type)" .br .ti -1c .RI "template void \fB_M_assign_dispatch\fP (_Integer __n, _Integer __val, __true_type)" .br .ti -1c .RI "void \fB_M_check_equal_allocators\fP (\fBlist\fP &__x) noexcept" .br .ti -1c .RI "void \fB_M_clear\fP () noexcept" .br .ti -1c .RI "template \fB_Node\fP * \fB_M_create_node\fP (_Args &&\&.\&.\&. __args)" .br .ti -1c .RI "void \fB_M_dec_size\fP (size_t)" .br .ti -1c .RI "void \fB_M_default_append\fP (size_type __n)" .br .ti -1c .RI "void \fB_M_default_initialize\fP (size_type __n)" .br .ti -1c .RI "size_t \fB_M_distance\fP (const void *, const void *) const" .br .ti -1c .RI "void \fB_M_erase\fP (\fBiterator\fP __position) noexcept" .br .ti -1c .RI "void \fB_M_fill_assign\fP (size_type __n, const value_type &__val)" .br .ti -1c .RI "void \fB_M_fill_initialize\fP (size_type __n, const value_type &__x)" .br .ti -1c .RI "_Node_alloc_traits::pointer \fB_M_get_node\fP ()" .br .ti -1c .RI "const _Node_alloc_type & \fB_M_get_Node_allocator\fP () const noexcept" .br .ti -1c .RI "_Node_alloc_type & \fB_M_get_Node_allocator\fP () noexcept" .br .ti -1c .RI "size_t \fB_M_get_size\fP () const" .br .ti -1c .RI "void \fB_M_inc_size\fP (size_t)" .br .ti -1c .RI "void \fB_M_init\fP () noexcept" .br .ti -1c .RI "template void \fB_M_initialize_dispatch\fP (_InputIterator __first, _InputIterator __last, __false_type)" .br .ti -1c .RI "template void \fB_M_initialize_dispatch\fP (_Integer __n, _Integer __x, __true_type)" .br .ti -1c .RI "template void \fB_M_insert\fP (\fBiterator\fP __position, _Args &&\&.\&.\&. __args)" .br .ti -1c .RI "void \fB_M_move_assign\fP (\fBlist\fP &&__x, \fBfalse_type\fP)" .br .ti -1c .RI "void \fB_M_move_assign\fP (\fBlist\fP &&__x, \fBtrue_type\fP) noexcept" .br .ti -1c .RI "void \fB_M_move_nodes\fP (\fB_List_base\fP &&__x)" .br .ti -1c .RI "size_t \fB_M_node_count\fP () const" .br .ti -1c .RI "void \fB_M_put_node\fP (typename _Node_alloc_traits::pointer __p) noexcept" .br .ti -1c .RI "\fBconst_iterator\fP \fB_M_resize_pos\fP (size_type &__new_size) const" .br .ti -1c .RI "void \fB_M_set_size\fP (size_t)" .br .ti -1c .RI "void \fB_M_transfer\fP (\fBiterator\fP __position, \fBiterator\fP __first, \fBiterator\fP __last)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static size_t \fB_S_distance\fP (const \fB__detail::_List_node_base\fP *__first, const \fB__detail::_List_node_base\fP *__last)" .br .ti -1c .RI "static size_t \fB_S_distance\fP (\fBconst_iterator\fP, \fBconst_iterator\fP)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "_List_impl \fB_M_impl\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template> .br class std::list< _Tp, _Alloc >"A standard container with linear time access to elements, and fixed time insertion/deletion at any point in the sequence\&. .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 \fCat\fP and \fCoperator\fP[]\&. .PP This is a \fIdoubly\fP \fIlinked\fP list\&. Traversal up and down the list requires linear time, but adding and removing elements (or \fInodes\fP) is done in constant time, regardless of where the change takes place\&. Unlike std::vector and std::deque, random-access iterators are not provided, so subscripting ( \fC\fP[] ) access is not allowed\&. For algorithms which only need sequential access, this lack makes no difference\&. .PP Also unlike the other standard containers, std::list provides specialized algorithms unique to linked lists, such as splicing, sorting, and in-place reversal\&. .PP A couple points on memory allocation for list: .PP First, we never actually allocate a Tp, we allocate List_node's and trust [20\&.1\&.5]/4 to DTRT\&. This is to ensure that after elements from list are spliced into list, destroying the memory of the second list is a valid operation, i\&.e\&., Alloc1 giveth and Alloc2 taketh away\&. .PP Second, a list conceptually represented as .PP .nf A <---> B <---> C <---> D .fi .PP is actually circular; a link exists between A and D\&. The list class holds (as its only data member) a private list::iterator pointing to \fID\fP, not to \fIA!\fP To get to the head of the list, we start at the tail and move forward by one\&. When this member iterator's next/previous pointers refer to itself, the list is empty\&. .SH "Constructor & Destructor Documentation" .PP .SS "template> \fBstd::list\fP< _Tp, _Alloc >::list ()\fC [default]\fP" .PP Creates a list with no elements\&. .SS "template> \fBstd::list\fP< _Tp, _Alloc >::list (const allocator_type & __a)\fC [inline]\fP, \fC [explicit]\fP, \fC [noexcept]\fP" .PP Creates a list with no elements\&. .PP \fBParameters\fP .RS 4 \fI__a\fP An allocator object\&. .RE .PP .SS "template> \fBstd::list\fP< _Tp, _Alloc >::list (size_type __n, const allocator_type & __a = \fCallocator_type()\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Creates a list 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 object\&. .RE .PP This constructor fills the list with \fI__n\fP default constructed elements\&. .SS "template> \fBstd::list\fP< _Tp, _Alloc >::list (size_type __n, const value_type & __value, const allocator_type & __a = \fCallocator_type()\fP)\fC [inline]\fP" .PP Creates a list 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 object\&. .RE .PP This constructor fills the list with \fI__n\fP copies of \fI__value\fP\&. .SS "template> \fBstd::list\fP< _Tp, _Alloc >::list (const \fBlist\fP< _Tp, _Alloc > & __x)\fC [inline]\fP" .PP List copy constructor\&. .PP \fBParameters\fP .RS 4 \fI__x\fP A list of identical element and allocator types\&. .RE .PP The newly-created list uses a copy of the allocation object used by \fI__x\fP (unless the allocator traits dictate a different object)\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP, and \fBstd::list< _Tp, _Alloc >::end()\fP\&. .SS "template> \fBstd::list\fP< _Tp, _Alloc >::list (\fBlist\fP< _Tp, _Alloc > &&)\fC [default]\fP" .PP List move constructor\&. The newly-created list contains the exact contents of the moved instance\&. The contents of the moved instance are a valid, but unspecified list\&. .SS "template> \fBstd::list\fP< _Tp, _Alloc >::list (\fBinitializer_list\fP< value_type > __l, const allocator_type & __a = \fCallocator_type()\fP)\fC [inline]\fP" .PP Builds a list from an initializer_list\&. .PP \fBParameters\fP .RS 4 \fI__l\fP An initializer_list of value_type\&. .br \fI__a\fP An allocator object\&. .RE .PP Create a list consisting of copies of the elements in the initializer_list \fI__l\fP\&. This is linear in __l\&.size()\&. .SS "template> template> \fBstd::list\fP< _Tp, _Alloc >::list (_InputIterator __first, _InputIterator __last, const allocator_type & __a = \fCallocator_type()\fP)\fC [inline]\fP" .PP Builds a list 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 object\&. .RE .PP Create a list consisting of copies of the elements from [\fI__first\fP,\fI__last\fP)\&. This is linear in N (where N is distance(\fI__first\fP,\fI__last\fP))\&. .SS "template> \fBstd::list\fP< _Tp, _Alloc >::~\fBlist\fP ()\fC [default]\fP" No explicit dtor needed as the _Base dtor takes care of things\&. The _Base 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\&. .SH "Member Function Documentation" .PP .SS "template> template \fB_Node\fP * \fBstd::list\fP< _Tp, _Alloc >::_M_create_node (_Args &&\&.\&.\&. __args)\fC [inline]\fP, \fC [protected]\fP" .PP \fBParameters\fP .RS 4 \fI__args\fP An instance of user data\&. .RE .PP Allocates space for a new node and constructs a copy of \fI__args\fP in it\&. .SS "template> template> void \fBstd::list\fP< _Tp, _Alloc >::assign (_InputIterator __first, _InputIterator __last)\fC [inline]\fP" .PP Assigns a range to a list\&. .PP \fBParameters\fP .RS 4 \fI__first\fP An input iterator\&. .br \fI__last\fP An input iterator\&. .RE .PP This function fills a list with copies of the elements in the range [\fI__first\fP,\fI__last\fP)\&. .PP Note that the assignment completely changes the list and that the resulting list's size is the same as the number of elements assigned\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::assign (\fBinitializer_list\fP< value_type > __l)\fC [inline]\fP" .PP Assigns an initializer_list to a list\&. .PP \fBParameters\fP .RS 4 \fI__l\fP An initializer_list of value_type\&. .RE .PP Replace the contents of the list with copies of the elements in the initializer_list \fI__l\fP\&. This is linear in __l\&.size()\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::assign (size_type __n, const value_type & __val)\fC [inline]\fP" .PP Assigns a given value to a list\&. .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 list with \fI__n\fP copies of the given value\&. Note that the assignment completely changes the list and that the resulting list's size is the same as the number of elements assigned\&. .PP Referenced by \fBstd::list< _Tp, _Alloc >::operator=()\fP\&. .SS "template> const_reference \fBstd::list\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 list\&. .PP References \fBstd::list< _Tp, _Alloc >::end()\fP\&. .SS "template> reference \fBstd::list\fP< _Tp, _Alloc >::back ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write reference to the data at the last element of the list\&. .PP References \fBstd::list< _Tp, _Alloc >::end()\fP\&. .SS "template> \fBconst_iterator\fP \fBstd::list\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 list\&. Iteration is done in ordinary element order\&. .SS "template> \fBiterator\fP \fBstd::list\fP< _Tp, _Alloc >::begin ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write iterator that points to the first element in the list\&. Iteration is done in ordinary element order\&. .PP Referenced by \fBstd::list< _Tp, _Alloc >::list()\fP, \fBstd::list< _Tp, _Alloc >::crend()\fP, \fBstd::list< _Tp, _Alloc >::front()\fP, \fBstd::list< _Tp, _Alloc >::insert()\fP, \fBstd::list< _Tp, _Alloc >::merge()\fP, \fBstd::operator<()\fP, \fBstd::list< _Tp, _Alloc >::operator=()\fP, \fBstd::operator==()\fP, \fBstd::list< _Tp, _Alloc >::pop_front()\fP, \fBstd::list< _Tp, _Alloc >::push_front()\fP, \fBstd::list< _Tp, _Alloc >::rend()\fP, and \fBstd::list< _Tp, _Alloc >::splice()\fP\&. .SS "template> \fBconst_iterator\fP \fBstd::list\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 list\&. Iteration is done in ordinary element order\&. .SS "template> \fBconst_iterator\fP \fBstd::list\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 list\&. Iteration is done in ordinary element order\&. .SS "template> void \fBstd::list\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\&. .SS "template> \fBconst_reverse_iterator\fP \fBstd::list\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 list\&. Iteration is done in reverse element order\&. .PP References \fBstd::list< _Tp, _Alloc >::end()\fP\&. .SS "template> \fBconst_reverse_iterator\fP \fBstd::list\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 list\&. Iteration is done in reverse element order\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP\&. .SS "template template \fBlist\fP< _Tp, _Alloc >::iterator list::emplace (\fBconst_iterator\fP __position, _Args &&\&.\&.\&. __args)" .PP Constructs object in list before specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the list\&. .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\&. Due to the nature of a list this operation can be done in constant time, and does not invalidate iterators and references\&. .PP Referenced by \fBstd::list< _Tp, _Alloc >::insert()\fP\&. .SS "template> bool \fBstd::list\fP< _Tp, _Alloc >::empty () const\fC [inline]\fP, \fC [noexcept]\fP" Returns true if the list is empty\&. (Thus begin() would equal end()\&.) .PP Referenced by \fBstd::list< _Tp, _Alloc >::insert()\fP, and \fBstd::list< _Tp, _Alloc >::splice()\fP\&. .SS "template> \fBconst_iterator\fP \fBstd::list\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 list\&. Iteration is done in ordinary element order\&. .SS "template> \fBiterator\fP \fBstd::list\fP< _Tp, _Alloc >::end ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write iterator that points one past the last element in the list\&. Iteration is done in ordinary element order\&. .PP Referenced by \fBstd::list< _Tp, _Alloc >::list()\fP, \fBstd::list< _Tp, _Alloc >::back()\fP, \fBstd::list< _Tp, _Alloc >::crbegin()\fP, \fBstd::list< _Tp, _Alloc >::merge()\fP, \fBstd::operator<()\fP, \fBstd::list< _Tp, _Alloc >::operator=()\fP, \fBstd::operator==()\fP, \fBstd::list< _Tp, _Alloc >::push_back()\fP, \fBstd::list< _Tp, _Alloc >::rbegin()\fP, and \fBstd::list< _Tp, _Alloc >::splice()\fP\&. .SS "template> \fBiterator\fP \fBstd::list\fP< _Tp, _Alloc >::erase (\fBconst_iterator\fP __first, \fBconst_iterator\fP __last)\fC [inline]\fP, \fC [noexcept]\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 \fIlast\fP prior to erasing (or end())\&. .RE .PP This function will erase the elements in the range \fI\fP[first,last) and shorten the list accordingly\&. .PP This operation is linear time in the size of the range and only invalidates iterators/references to the element being removed\&. 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 References \fBstd::list< _Tp, _Alloc >::erase()\fP\&. .SS "template \fBlist\fP< _Tp, _Alloc >::iterator list::erase (\fBconst_iterator\fP __position)\fC [noexcept]\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 list by one\&. .PP Due to the nature of a list this operation can be done in constant time, and only invalidates iterators/references to the element being removed\&. 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 Referenced by \fBstd::list< _Tp, _Alloc >::erase()\fP\&. .SS "template> const_reference \fBstd::list\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 list\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP\&. .SS "template> reference \fBstd::list\fP< _Tp, _Alloc >::front ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write reference to the data at the first element of the list\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP\&. .SS "template> allocator_type \fBstd::list\fP< _Tp, _Alloc >::get_allocator () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Get a copy of the memory allocation object\&. .SS "template> \fBiterator\fP \fBstd::list\fP< _Tp, _Alloc >::insert (\fBconst_iterator\fP __p, \fBinitializer_list\fP< value_type > __l)\fC [inline]\fP" .PP Inserts the contents of an initializer_list into list before specified const_iterator\&. .PP \fBParameters\fP .RS 4 \fI__p\fP A const_iterator into the list\&. .br \fI__l\fP An initializer_list of value_type\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the first element inserted (or __position)\&. .RE .PP This function will insert copies of the data in the initializer_list \fIl\fP into the list before the location specified by \fIp\fP\&. .PP This operation is linear in the number of elements inserted and does not invalidate iterators and references\&. .PP References \fBstd::list< _Tp, _Alloc >::insert()\fP\&. .SS "template template \fBlist\fP< _Tp, _Alloc >::iterator list::insert (\fBconst_iterator\fP __position, _InputIterator __first, _InputIterator __last)" .PP Inserts a range into the list\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the list\&. .br \fI__first\fP An input iterator\&. .br \fI__last\fP An input iterator\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the first element inserted (or __position)\&. .RE .PP This function will insert copies of the data in the range [\fIfirst\fP,\fIlast\fP) into the list before the location specified by \fIposition\fP\&. .PP This operation is linear in the number of elements inserted and does not invalidate iterators and references\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP, and \fBstd::list< _Tp, _Alloc >::empty()\fP\&. .SS "template \fBlist\fP< _Tp, _Alloc >::iterator list::insert (\fBconst_iterator\fP __position, const value_type & __x)" .PP Inserts given value into list before specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the list\&. .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\&. Due to the nature of a list this operation can be done in constant time, and does not invalidate iterators and references\&. .PP Referenced by \fBstd::list< _Tp, _Alloc >::insert()\fP\&. .SS "template \fBlist\fP< _Tp, _Alloc >::iterator list::insert (\fBconst_iterator\fP __position, size_type __n, const value_type & __x)" .PP Inserts a number of copies of given data into the list\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the list\&. .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 pointing to the first element inserted (or __position)\&. .RE .PP This function will insert a specified number of copies of the given data before the location specified by \fIposition\fP\&. .PP This operation is linear in the number of elements inserted and does not invalidate iterators and references\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP\&. .SS "template> \fBiterator\fP \fBstd::list\fP< _Tp, _Alloc >::insert (\fBconst_iterator\fP __position, value_type && __x)\fC [inline]\fP" .PP Inserts given rvalue into list before specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__position\fP A const_iterator into the list\&. .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\&. Due to the nature of a list this operation can be done in constant time, and does not invalidate iterators and references\&. .PP References \fBstd::list< _Tp, _Alloc >::emplace()\fP, and \fBstd::move()\fP\&. .SS "template> size_type \fBstd::list\fP< _Tp, _Alloc >::max_size () const\fC [inline]\fP, \fC [noexcept]\fP" Returns the size() of the largest possible list\&. .br .PP References \fB__gnu_cxx::__alloc_traits< _Alloc, typename >::max_size()\fP\&. .SS "template void list::merge (\fBlist\fP< _Tp, _Alloc > && __x)" .PP Merge sorted lists\&. .PP \fBParameters\fP .RS 4 \fI__x\fP Sorted list to merge\&. .RE .PP Assumes that both \fI__x\fP and this list are sorted according to operator<()\&. Merges elements of \fI__x\fP into this list in sorted order, leaving \fI__x\fP empty when complete\&. Elements in this list precede elements in \fI__x\fP that are equal\&. .PP References \fBstd::__addressof()\fP, \fBstd::list< _Tp, _Alloc >::begin()\fP, \fBstd::begin()\fP, \fBstd::list< _Tp, _Alloc >::end()\fP, \fBstd::end()\fP, and \fBstd::list< _Tp, _Alloc >::size()\fP\&. .SS "template template void list::merge (\fBlist\fP< _Tp, _Alloc > && __x, _StrictWeakOrdering __comp)" .PP Merge sorted lists according to comparison function\&. .PP \fBTemplate Parameters\fP .RS 4 \fI_StrictWeakOrdering\fP Comparison function defining sort order\&. .RE .PP \fBParameters\fP .RS 4 \fI__x\fP Sorted list to merge\&. .br \fI__comp\fP Comparison functor\&. .RE .PP Assumes that both \fI__x\fP and this list are sorted according to StrictWeakOrdering\&. Merges elements of \fI__x\fP into this list in sorted order, leaving \fI__x\fP empty when complete\&. Elements in this list precede elements in \fI__x\fP that are equivalent according to StrictWeakOrdering()\&. .PP References \fBstd::__addressof()\fP, \fBstd::list< _Tp, _Alloc >::begin()\fP, \fBstd::begin()\fP, \fBstd::list< _Tp, _Alloc >::end()\fP, \fBstd::end()\fP, and \fBstd::list< _Tp, _Alloc >::size()\fP\&. .SS "template \fBlist\fP< _Tp, _Alloc > & list::operator= (const \fBlist\fP< _Tp, _Alloc > & __x)" .PP List assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__x\fP A list of identical element and allocator types\&. .RE .PP All the elements of \fI__x\fP are copied\&. .PP Whether the allocator is copied depends on the allocator traits\&. .PP References \fBstd::__addressof()\fP, \fBstd::list< _Tp, _Alloc >::begin()\fP, and \fBstd::list< _Tp, _Alloc >::end()\fP\&. .SS "template> \fBlist\fP & \fBstd::list\fP< _Tp, _Alloc >::operator= (\fBinitializer_list\fP< value_type > __l)\fC [inline]\fP" .PP List initializer list assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__l\fP An initializer_list of value_type\&. .RE .PP Replace the contents of the list with copies of the elements in the initializer_list \fI__l\fP\&. This is linear in l\&.size()\&. .PP References \fBstd::list< _Tp, _Alloc >::assign()\fP\&. .SS "template> \fBlist\fP & \fBstd::list\fP< _Tp, _Alloc >::operator= (\fBlist\fP< _Tp, _Alloc > && __x)\fC [inline]\fP, \fC [noexcept]\fP" .PP List move assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__x\fP A list of identical element and allocator types\&. .RE .PP The contents of \fI__x\fP are moved into this list (without copying)\&. .PP Afterwards \fI__x\fP is a valid, but unspecified list .PP Whether the allocator is moved depends on the allocator traits\&. .PP References \fBstd::move()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::pop_back ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Removes last element\&. This is a typical stack operation\&. It shrinks the list by one\&. Due to the nature of a list this operation can be done in constant time, and only invalidates iterators/references to the element being removed\&. .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\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::pop_front ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Removes first element\&. This is a typical stack operation\&. It shrinks the list by one\&. Due to the nature of a list this operation can be done in constant time, and only invalidates iterators/references to the element being removed\&. .PP Note that no data is returned, and if the first element's data is needed, it should be retrieved before pop_front() is called\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::push_back (const value_type & __x)\fC [inline]\fP" .PP Add data to the end of the list\&. .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 list and assigns the given data to it\&. Due to the nature of a list this operation can be done in constant time, and does not invalidate iterators and references\&. .PP References \fBstd::list< _Tp, _Alloc >::end()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::push_front (const value_type & __x)\fC [inline]\fP" .PP Add data to the front of the list\&. .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 front of the list and assigns the given data to it\&. Due to the nature of a list this operation can be done in constant time, and does not invalidate iterators and references\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP\&. .SS "template> \fBconst_reverse_iterator\fP \fBstd::list\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 list\&. Iteration is done in reverse element order\&. .PP References \fBstd::list< _Tp, _Alloc >::end()\fP\&. .SS "template> \fBreverse_iterator\fP \fBstd::list\fP< _Tp, _Alloc >::rbegin ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write reverse iterator that points to the last element in the list\&. Iteration is done in reverse element order\&. .PP References \fBstd::list< _Tp, _Alloc >::end()\fP\&. .SS "template \fBlist\fP< _Tp, _Alloc >::__remove_return_type list::remove (const _Tp & __value)" .PP Remove all elements equal to value\&. .PP \fBParameters\fP .RS 4 \fI__value\fP The value to remove\&. .RE .PP Removes every element in the list equal to \fIvalue\fP\&. Remaining elements stay in list order\&. 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 References \fBstd::__addressof()\fP, \fBstd::begin()\fP, and \fBstd::end()\fP\&. .SS "template template \fBlist\fP< _Tp, _Alloc >::__remove_return_type list::remove_if (_Predicate __pred)" .PP Remove all elements satisfying a predicate\&. .PP \fBTemplate Parameters\fP .RS 4 \fI_Predicate\fP Unary predicate function or object\&. .RE .PP Removes every element in the list for which the predicate returns true\&. Remaining elements stay in list order\&. 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 References \fBstd::begin()\fP, and \fBstd::end()\fP\&. .SS "template> \fBconst_reverse_iterator\fP \fBstd::list\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 list\&. Iteration is done in reverse element order\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP\&. .SS "template> \fBreverse_iterator\fP \fBstd::list\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 list\&. Iteration is done in reverse element order\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP\&. .SS "template void list::resize (size_type __new_size)" .PP Resizes the list to the specified number of elements\&. .PP \fBParameters\fP .RS 4 \fI__new_size\fP Number of elements the list should contain\&. .RE .PP This function will resize the list to the specified number of elements\&. If the number is smaller than the list's current size the list is truncated, otherwise default constructed elements are appended\&. .SS "template void list::resize (size_type __new_size, const value_type & __x)" .PP Resizes the list to the specified number of elements\&. .PP \fBParameters\fP .RS 4 \fI__new_size\fP Number of elements the list should contain\&. .br \fI__x\fP Data with which new elements should be populated\&. .RE .PP This function will resize the list to the specified number of elements\&. If the number is smaller than the list's current size the list is truncated, otherwise the list is extended and new elements are populated with given data\&. .PP References \fBstd::end()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::reverse ()\fC [inline]\fP, \fC [noexcept]\fP" .PP Reverse the elements in list\&. Reverse the order of elements in the list in linear time\&. .SS "template> size_type \fBstd::list\fP< _Tp, _Alloc >::size () const\fC [inline]\fP, \fC [noexcept]\fP" Returns the number of elements in the list\&. .br .PP Referenced by \fBstd::list< _Tp, _Alloc >::merge()\fP, and \fBstd::operator==()\fP\&. .SS "template void list::sort" .PP Sort the elements\&. Sorts the elements of this list in NlogN time\&. Equivalent elements remain in list order\&. .SS "template template void list::sort (_StrictWeakOrdering __comp)" .PP Sort the elements according to comparison function\&. Sorts the elements of this list in NlogN time\&. Equivalent elements remain in list order\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::splice (\fBconst_iterator\fP __position, \fBlist\fP< _Tp, _Alloc > && __x)\fC [inline]\fP, \fC [noexcept]\fP" .PP Insert contents of another list\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Iterator referencing the element to insert before\&. .br \fI__x\fP Source list\&. .RE .PP The elements of \fI__x\fP are inserted in constant time in front of the element referenced by \fI__position\fP\&. \fI__x\fP becomes an empty list\&. .PP Requires this != \fI__x\fP\&. .PP References \fBstd::list< _Tp, _Alloc >::begin()\fP, \fBstd::list< _Tp, _Alloc >::empty()\fP, and \fBstd::list< _Tp, _Alloc >::end()\fP\&. .PP Referenced by \fBstd::list< _Tp, _Alloc >::splice()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::splice (\fBconst_iterator\fP __position, \fBlist\fP< _Tp, _Alloc > && __x, \fBconst_iterator\fP __first, \fBconst_iterator\fP __last)\fC [inline]\fP, \fC [noexcept]\fP" .PP Insert range from another list\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Const_iterator referencing the element to insert before\&. .br \fI__x\fP Source list\&. .br \fI__first\fP Const_iterator referencing the start of range in x\&. .br \fI__last\fP Const_iterator referencing the end of range in x\&. .RE .PP Removes elements in the range [__first,__last) and inserts them before \fI__position\fP in constant time\&. .PP Undefined if \fI__position\fP is in [__first,__last)\&. .PP References \fBstd::__addressof()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::splice (\fBconst_iterator\fP __position, \fBlist\fP< _Tp, _Alloc > && __x, \fBconst_iterator\fP __i)\fC [inline]\fP, \fC [noexcept]\fP" .PP Insert element from another list\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Const_iterator referencing the element to insert before\&. .br \fI__x\fP Source list\&. .br \fI__i\fP Const_iterator referencing the element to move\&. .RE .PP Removes the element in list \fI__x\fP referenced by \fI__i\fP and inserts it into the current list before \fI__position\fP\&. .PP References \fBstd::__addressof()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::splice (\fBconst_iterator\fP __position, \fBlist\fP< _Tp, _Alloc > & __x, \fBconst_iterator\fP __first, \fBconst_iterator\fP __last)\fC [inline]\fP, \fC [noexcept]\fP" .PP Insert range from another list\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Const_iterator referencing the element to insert before\&. .br \fI__x\fP Source list\&. .br \fI__first\fP Const_iterator referencing the start of range in x\&. .br \fI__last\fP Const_iterator referencing the end of range in x\&. .RE .PP Removes elements in the range [__first,__last) and inserts them before \fI__position\fP in constant time\&. .PP Undefined if \fI__position\fP is in [__first,__last)\&. .PP References \fBstd::move()\fP, and \fBstd::list< _Tp, _Alloc >::splice()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::splice (\fBconst_iterator\fP __position, \fBlist\fP< _Tp, _Alloc > & __x, \fBconst_iterator\fP __i)\fC [inline]\fP, \fC [noexcept]\fP" .PP Insert element from another list\&. .PP \fBParameters\fP .RS 4 \fI__position\fP Const_iterator referencing the element to insert before\&. .br \fI__x\fP Source list\&. .br \fI__i\fP Const_iterator referencing the element to move\&. .RE .PP Removes the element in list \fI__x\fP referenced by \fI__i\fP and inserts it into the current list before \fI__position\fP\&. .PP References \fBstd::move()\fP, and \fBstd::list< _Tp, _Alloc >::splice()\fP\&. .SS "template> void \fBstd::list\fP< _Tp, _Alloc >::swap (\fBlist\fP< _Tp, _Alloc > & __x)\fC [inline]\fP, \fC [noexcept]\fP" .PP Swaps data with another list\&. .PP \fBParameters\fP .RS 4 \fI__x\fP A list of the same element and allocator types\&. .RE .PP This exchanges the elements between two lists in constant time\&. Note that the global std::swap() function is specialized such that std::swap(l1,l2) will feed to this function\&. .PP Whether the allocators are swapped depends on the allocator traits\&. .SS "template \fBlist\fP< _Tp, _Alloc >::__remove_return_type list::unique" .PP Remove consecutive duplicate elements\&. For each consecutive set of elements with the same value, remove all but the first one\&. Remaining elements stay in list order\&. 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 References \fBstd::begin()\fP, and \fBstd::end()\fP\&. .SS "template template \fBlist\fP< _Tp, _Alloc >::__remove_return_type list::unique (_BinaryPredicate __binary_pred)" .PP Remove consecutive elements satisfying a predicate\&. .PP \fBTemplate Parameters\fP .RS 4 \fI_BinaryPredicate\fP Binary predicate function or object\&. .RE .PP For each consecutive set of elements [first,last) that satisfy predicate(first,i) where i is an iterator in [first,last), remove all but the first one\&. Remaining elements stay in list order\&. 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 References \fBstd::begin()\fP, and \fBstd::end()\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.