.TH "std::forward_list< _Tp, _Alloc >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::forward_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::_Fwd_list_base< _Tp, _Alloc >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "\fBtypedef\fP _Alloc \fBallocator_type\fP" .br .ti -1c .RI "\fBtypedef\fP \fB_Base::const_iterator\fP \fBconst_iterator\fP" .br .ti -1c .RI "\fBtypedef\fP _Alloc_traits::const_pointer \fBconst_pointer\fP" .br .ti -1c .RI "\fBtypedef\fP \fBconst\fP value_type & \fBconst_reference\fP" .br .ti -1c .RI "\fBtypedef\fP \fBstd::ptrdiff_t\fP \fBdifference_type\fP" .br .ti -1c .RI "\fBtypedef\fP \fB_Base::iterator\fP \fBiterator\fP" .br .ti -1c .RI "\fBtypedef\fP _Alloc_traits::pointer \fBpointer\fP" .br .ti -1c .RI "\fBtypedef\fP value_type & \fBreference\fP" .br .ti -1c .RI "\fBtypedef\fP std::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 "\fBforward_list\fP ()=\fBdefault\fP" .br .RI "Creates a forward_list with no elements\&. " .ti -1c .RI "template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> \fBforward_list\fP (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBconst\fP _Alloc &\fB__al\fP=_Alloc())" .br .RI "Builds a forward_list from a range\&. " .ti -1c .RI "\fBforward_list\fP (\fBconst\fP _Alloc &\fB__al\fP) \fBnoexcept\fP" .br .RI "Creates a forward_list with no elements\&. " .ti -1c .RI "\fBforward_list\fP (\fBconst\fP \fBforward_list\fP &\fB__list\fP)" .br .RI "The forward_list copy constructor\&. " .ti -1c .RI "\fBforward_list\fP (\fBconst\fP \fBforward_list\fP &\fB__list\fP, \fBconst\fP _Alloc &\fB__al\fP)" .br .RI "Copy constructor with allocator argument\&. " .ti -1c .RI "\fBforward_list\fP (\fBforward_list\fP &&)=\fBdefault\fP" .br .RI "The forward_list move constructor\&. " .ti -1c .RI "\fBforward_list\fP (\fBforward_list\fP &&\fB__list\fP, \fBconst\fP _Alloc &\fB__al\fP) \fBnoexcept\fP(_Node_alloc_traits::_S_always_equal())" .br .RI "Move constructor with allocator argument\&. " .ti -1c .RI "\fBforward_list\fP (size_type __n, \fBconst\fP _Alloc &\fB__al\fP=_Alloc())" .br .RI "Creates a forward_list with default constructed elements\&. " .ti -1c .RI "\fBforward_list\fP (size_type __n, \fBconst\fP _Tp &__value, \fBconst\fP _Alloc &\fB__al\fP=_Alloc())" .br .RI "Creates a forward_list with copies of an exemplar element\&. " .ti -1c .RI "\fBforward_list\fP (\fBstd::initializer_list\fP< _Tp > \fB__il\fP, \fBconst\fP _Alloc &\fB__al\fP=_Alloc())" .br .RI "Builds a forward_list from an initializer_list\&. " .ti -1c .RI "\fB~forward_list\fP () \fBnoexcept\fP" .br .RI "The forward_list dtor\&. " .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 forward_list\&. " .ti -1c .RI "\fBvoid\fP \fBassign\fP (size_type __n, \fBconst\fP _Tp &__val)" .br .RI "Assigns a given value to a forward_list\&. " .ti -1c .RI "\fBvoid\fP \fBassign\fP (\fBstd::initializer_list\fP< _Tp > \fB__il\fP)" .br .RI "Assigns an initializer_list to a forward_list\&. " .ti -1c .RI "\fBconst_iterator\fP \fBbefore_begin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBiterator\fP \fBbefore_begin\fP () \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_iterator\fP \fBbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBiterator\fP \fBbegin\fP () \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_iterator\fP \fBcbefore_begin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_iterator\fP \fBcbegin\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_iterator\fP \fBcend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBclear\fP () \fBnoexcept\fP" .br .RI "Erases all the elements\&. " .ti -1c .RI "template \fBiterator\fP \fBemplace_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fB_Args\fP &&\&.\&.\&. \fB__args\fP)" .br .RI "Constructs object in forward_list after the specified iterator\&. " .ti -1c .RI "template reference \fBemplace_front\fP (\fB_Args\fP &&\&.\&.\&. \fB__args\fP)" .br .RI "Constructs object in forward_list at the front of the list\&. " .ti -1c .RI "bool \fBempty\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBconst_iterator\fP \fBend\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBiterator\fP \fBend\fP () \fBnoexcept\fP" .br .ti -1c .RI "\fBiterator\fP \fBerase_after\fP (\fBconst_iterator\fP \fB__pos\fP)" .br .RI "Removes the element pointed to by the iterator following \fCpos\fP\&. " .ti -1c .RI "\fBiterator\fP \fBerase_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBconst_iterator\fP __last)" .br .RI "Remove a range of elements\&. " .ti -1c .RI "reference \fBfront\fP ()" .br .ti -1c .RI "const_reference \fBfront\fP () \fBconst\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>> \fBiterator\fP \fBinsert_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fB_InputIterator\fP __first, \fB_InputIterator\fP __last)" .br .RI "Inserts a range into the forward_list\&. " .ti -1c .RI "\fBiterator\fP \fBinsert_after\fP (\fBconst_iterator\fP \fB__pos\fP, _Tp &&__val)" .br .ti -1c .RI "\fBiterator\fP \fBinsert_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBconst\fP _Tp &__val)" .br .RI "Inserts given value into forward_list after specified iterator\&. " .ti -1c .RI "\fBiterator\fP \fBinsert_after\fP (\fBconst_iterator\fP \fB__pos\fP, size_type __n, \fBconst\fP _Tp &__val)" .br .RI "Inserts a number of copies of given data into the forward_list\&. " .ti -1c .RI "\fBiterator\fP \fBinsert_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBstd::initializer_list\fP< _Tp > \fB__il\fP)" .br .RI "Inserts the contents of an initializer_list into forward_list after the specified iterator\&. " .ti -1c .RI "size_type \fBmax_size\fP () \fBconst\fP \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBmerge\fP (\fBforward_list\fP &&\fB__list\fP)" .br .RI "Merge sorted lists\&. " .ti -1c .RI "template<\fBtypename\fP \fB_Comp\fP > \fBvoid\fP \fBmerge\fP (\fBforward_list\fP &&\fB__list\fP, \fB_Comp\fP __comp)" .br .RI "Merge sorted lists according to comparison function\&. " .ti -1c .RI "\fBvoid\fP \fBmerge\fP (\fBforward_list\fP &\fB__list\fP)" .br .ti -1c .RI "template<\fBtypename\fP \fB_Comp\fP > \fBvoid\fP \fBmerge\fP (\fBforward_list\fP &\fB__list\fP, \fB_Comp\fP __comp)" .br .ti -1c .RI "\fBforward_list\fP & \fBoperator=\fP (\fBconst\fP \fBforward_list\fP &\fB__list\fP)" .br .RI "The forward_list assignment operator\&. " .ti -1c .RI "\fBforward_list\fP & \fBoperator=\fP (\fBforward_list\fP &&\fB__list\fP) \fBnoexcept\fP(_Node_alloc_traits::_S_nothrow_move())" .br .RI "The forward_list move assignment operator\&. " .ti -1c .RI "\fBforward_list\fP & \fBoperator=\fP (\fBstd::initializer_list\fP< _Tp > \fB__il\fP)" .br .RI "The forward_list initializer list assignment operator\&. " .ti -1c .RI "\fBvoid\fP \fBpop_front\fP ()" .br .RI "Removes first element\&. " .ti -1c .RI "\fBvoid\fP \fBpush_front\fP (_Tp &&__val)" .br .ti -1c .RI "\fBvoid\fP \fBpush_front\fP (\fBconst\fP _Tp &__val)" .br .RI "Add data to the front of the forward_list\&. " .ti -1c .RI "\fB__remove_return_type\fP \fBremove\fP (\fBconst\fP _Tp &__val)" .br .RI "Remove all elements equal to value\&. " .ti -1c .RI "template<\fBtypename\fP \fB_Pred\fP > \fB__remove_return_type\fP \fBremove_if\fP (\fB_Pred\fP \fB__pred\fP)" .br .RI "Remove all elements satisfying a predicate\&. " .ti -1c .RI "template<\fBtypename\fP \fB_Pred\fP > \fBauto\fP \fBremove_if\fP (\fB_Pred\fP \fB__pred\fP) \-> \fB__remove_return_type\fP" .br .ti -1c .RI "\fBvoid\fP \fBresize\fP (size_type \fB__sz\fP)" .br .RI "Resizes the forward_list to the specified number of elements\&. " .ti -1c .RI "\fBvoid\fP \fBresize\fP (size_type \fB__sz\fP, \fBconst\fP value_type &__val)" .br .RI "Resizes the forward_list to the specified number of elements\&. " .ti -1c .RI "\fBvoid\fP \fBreverse\fP () \fBnoexcept\fP" .br .RI "Reverse the elements in list\&. " .ti -1c .RI "\fBvoid\fP \fBsort\fP ()" .br .RI "Sort the elements of the list\&. " .ti -1c .RI "template<\fBtypename\fP \fB_Comp\fP > \fBvoid\fP \fBsort\fP (\fB_Comp\fP __comp)" .br .RI "Sort the forward_list using a comparison function\&. " .ti -1c .RI "\fBvoid\fP \fBsplice_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBforward_list\fP &&\fB__list\fP) \fBnoexcept\fP" .br .RI "Insert contents of another forward_list\&. " .ti -1c .RI "\fBvoid\fP \fBsplice_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBforward_list\fP &&\fB__list\fP, \fBconst_iterator\fP __i) \fBnoexcept\fP" .br .RI "Insert element from another forward_list\&. " .ti -1c .RI "\fBvoid\fP \fBsplice_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBforward_list\fP &\fB__list\fP) \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBsplice_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBforward_list\fP &\fB__list\fP, \fBconst_iterator\fP __i) \fBnoexcept\fP" .br .ti -1c .RI "\fBvoid\fP \fBswap\fP (\fBforward_list\fP &\fB__list\fP) \fBnoexcept\fP" .br .RI "Swaps data with another forward_list\&. " .ti -1c .RI "\fB__remove_return_type\fP \fBunique\fP ()" .br .RI "Remove consecutive duplicate elements\&. " .ti -1c .RI "template<\fBtypename\fP \fB_BinPred\fP > \fB__remove_return_type\fP \fBunique\fP (\fB_BinPred\fP \fB__binary_pred\fP)" .br .RI "Remove consecutive elements satisfying a predicate\&. " .ti -1c .RI "template<\fBtypename\fP \fB_BinPred\fP > \fBauto\fP \fBunique\fP (\fB_BinPred\fP \fB__binary_pred\fP) \-> \fB__remove_return_type\fP" .br .in -1c .PP .RI "\fB\fP" .br .in +1c .in +1c .ti -1c .RI "\fBvoid\fP \fBsplice_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBforward_list\fP &&, \fBconst_iterator\fP \fB__before\fP, \fBconst_iterator\fP __last) \fBnoexcept\fP" .br .RI "Insert range from another forward_list\&. " .ti -1c .RI "\fBvoid\fP \fBsplice_after\fP (\fBconst_iterator\fP \fB__pos\fP, \fBforward_list\fP &, \fBconst_iterator\fP \fB__before\fP, \fBconst_iterator\fP __last) \fBnoexcept\fP" .br .RI "Insert range from another forward_list\&. " .in -1c .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP _Tp, \fBtypename\fP _Alloc = allocator<_Tp>> .br class std::forward_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 \fCsequence\fP, including the \fCoptional sequence requirements\fP with the exception of \fCat\fP and \fCoperator\fP[]\&. .PP This is a \fIsingly\fP \fIlinked\fP list\&. Traversal up 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::forward_list provides specialized algorithms unique to linked lists, such as splicing, sorting, and in-place reversal\&. .SH "Constructor & Destructor Documentation" .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list ()\fC [default]\fP" .PP Creates a forward_list with no elements\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (\fBconst\fP _Alloc & __al)\fC [inline]\fP, \fC [explicit]\fP, \fC [noexcept]\fP" .PP Creates a forward_list with no elements\&. .PP \fBParameters\fP .RS 4 \fI__al\fP An allocator object\&. .RE .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (\fBconst\fP \fBforward_list\fP< _Tp, _Alloc > & __list, \fBconst\fP _Alloc & __al)\fC [inline]\fP" .PP Copy constructor with allocator argument\&. .PP \fBParameters\fP .RS 4 \fI__list\fP Input list to copy\&. .br \fI__al\fP An allocator object\&. .RE .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (\fBforward_list\fP< _Tp, _Alloc > && __list, \fBconst\fP _Alloc & __al)\fC [inline]\fP, \fC [noexcept]\fP" .PP Move constructor with allocator argument\&. .PP \fBParameters\fP .RS 4 \fI__list\fP Input list to move\&. .br \fI__al\fP An allocator object\&. .RE .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (size_type __n, \fBconst\fP _Alloc & __al = \fC_Alloc()\fP)\fC [inline]\fP, \fC [explicit]\fP" .PP Creates a forward_list with default constructed elements\&. .PP \fBParameters\fP .RS 4 \fI__n\fP The number of elements to initially create\&. .br \fI__al\fP An allocator object\&. .RE .PP This constructor creates the forward_list with \fI__n\fP default constructed elements\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (size_type __n, \fBconst\fP _Tp & __value, \fBconst\fP _Alloc & __al = \fC_Alloc()\fP)\fC [inline]\fP" .PP Creates a forward_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__al\fP An allocator object\&. .RE .PP This constructor fills the forward_list with \fI__n\fP copies of \fI__value\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last, \fBconst\fP _Alloc & __al = \fC_Alloc()\fP)\fC [inline]\fP" .PP Builds a forward_list from a range\&. .PP \fBParameters\fP .RS 4 \fI__first\fP An input iterator\&. .br \fI__last\fP An input iterator\&. .br \fI__al\fP An allocator object\&. .RE .PP Create a forward_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<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (\fBconst\fP \fBforward_list\fP< _Tp, _Alloc > & __list)\fC [inline]\fP" .PP The forward_list copy constructor\&. .PP \fBParameters\fP .RS 4 \fI__list\fP A forward_list of identical element and allocator types\&. .RE .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (\fBforward_list\fP< _Tp, _Alloc > &&)\fC [default]\fP" .PP The forward_list move constructor\&. .PP \fBParameters\fP .RS 4 \fI__list\fP A forward_list of identical element and allocator types\&. .RE .PP The newly-created forward_list contains the exact contents of the moved instance\&. The contents of the moved instance are a valid, but unspecified forward_list\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::forward_list (\fBstd::initializer_list\fP< _Tp > __il, \fBconst\fP _Alloc & __al = \fC_Alloc()\fP)\fC [inline]\fP" .PP Builds a forward_list from an initializer_list\&. .PP \fBParameters\fP .RS 4 \fI__il\fP An initializer_list of value_type\&. .br \fI__al\fP An allocator object\&. .RE .PP Create a forward_list consisting of copies of the elements in the initializer_list \fI__il\fP\&. This is linear in __il\&.size()\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBstd::forward_list\fP< _Tp, _Alloc >::~\fBforward_list\fP ()\fC [inline]\fP, \fC [noexcept]\fP" .PP The forward_list dtor\&. .SH "Member Function Documentation" .PP .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP = std::_RequireInputIter<_InputIterator>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::assign (\fB_InputIterator\fP __first, \fB_InputIterator\fP __last)\fC [inline]\fP" .PP Assigns a range to a forward_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 forward_list with copies of the elements in the range [\fI__first\fP,\fI__last\fP)\&. .PP Note that the assignment completely changes the forward_list and that the number of elements of the resulting forward_list is the same as the number of elements assigned\&. .PP Referenced by \fBstd::forward_list< _Tp, _Alloc >::assign()\fP, and \fBstd::forward_list< _Tp, _Alloc >::operator=()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::assign (size_type __n, \fBconst\fP _Tp & __val)\fC [inline]\fP" .PP Assigns a given value to a forward_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 forward_list with \fI__n\fP copies of the given value\&. Note that the assignment completely changes the forward_list, and that the resulting forward_list has __n elements\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::assign (\fBstd::initializer_list\fP< _Tp > __il)\fC [inline]\fP" .PP Assigns an initializer_list to a forward_list\&. .PP \fBParameters\fP .RS 4 \fI__il\fP An initializer_list of value_type\&. .RE .PP Replace the contents of the forward_list with copies of the elements in the initializer_list \fI__il\fP\&. This is linear in il\&.size()\&. .PP References \fBstd::forward_list< _Tp, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBconst_iterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::before_begin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points before the first element in the forward_list\&. Iteration is done in ordinary element order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBiterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::before_begin ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write iterator that points before the first element in the forward_list\&. Iteration is done in ordinary element order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBconst_iterator\fP \fBstd::forward_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 forward_list\&. Iteration is done in ordinary element order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBiterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::begin ()\fC [inline]\fP, \fC [noexcept]\fP" Returns a read/write iterator that points to the first element in the forward_list\&. Iteration is done in ordinary element order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBconst_iterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::cbefore_begin () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only (constant) iterator that points before the first element in the forward_list\&. Iteration is done in ordinary element order\&. .PP Referenced by \fBstd::forward_list< _Tp, _Alloc >::emplace_front()\fP, and \fBstd::forward_list< _Tp, _Alloc >::push_front()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBconst_iterator\fP \fBstd::forward_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 forward_list\&. Iteration is done in ordinary element order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBconst_iterator\fP \fBstd::forward_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 forward_list\&. Iteration is done in ordinary element order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::clear ()\fC [inline]\fP, \fC [noexcept]\fP" .PP 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<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> template \fBiterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::emplace_after (\fBconst_iterator\fP __pos, \fB_Args\fP &&\&.\&.\&. __args)\fC [inline]\fP" .PP Constructs object in forward_list after the specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP A const_iterator into the forward_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)\&.\&.\&.) after the specified location\&. Due to the nature of a forward_list this operation can be done in constant time, and does not invalidate iterators and references\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> template reference \fBstd::forward_list\fP< _Tp, _Alloc >::emplace_front (\fB_Args\fP &&\&.\&.\&. __args)\fC [inline]\fP" .PP Constructs object in forward_list at the front of the list\&. .PP \fBParameters\fP .RS 4 \fI__args\fP Arguments\&. .RE .PP This function will insert an object of type Tp constructed with Tp(std::forward(args)\&.\&.\&.) at the front of the list Due to the nature of a forward_list this operation can be done in constant time, and does not invalidate iterators and references\&. .PP References \fBstd::forward_list< _Tp, _Alloc >::cbefore_begin()\fP, and \fBstd::forward_list< _Tp, _Alloc >::front()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> bool \fBstd::forward_list\fP< _Tp, _Alloc >::empty () const\fC [inline]\fP, \fC [noexcept]\fP" Returns true if the forward_list is empty\&. (Thus begin() would equal end()\&.) .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBconst_iterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::end () const\fC [inline]\fP, \fC [noexcept]\fP" Returns a read-only iterator that points one past the last element in the forward_list\&. Iteration is done in ordinary element order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBiterator\fP \fBstd::forward_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 forward_list\&. Iteration is done in ordinary element order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBiterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::erase_after (\fBconst_iterator\fP __pos)\fC [inline]\fP" .PP Removes the element pointed to by the iterator following \fCpos\fP\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Iterator pointing before element to be erased\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the element following the one that was erased, or end() if no such element exists\&. .RE .PP This function will erase the element at the given position and thus shorten the forward_list by one\&. .PP Due to the nature of a forward_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\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBiterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::erase_after (\fBconst_iterator\fP __pos, \fBconst_iterator\fP __last)\fC [inline]\fP" .PP Remove a range of elements\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Iterator pointing before 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 @ __last\&. .RE .PP This function will erase the elements in the range \fI\fP(__pos,__last) and shorten the forward_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\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> reference \fBstd::forward_list\fP< _Tp, _Alloc >::front ()\fC [inline]\fP" Returns a read/write reference to the data at the first element of the forward_list\&. .PP Referenced by \fBstd::forward_list< _Tp, _Alloc >::emplace_front()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> const_reference \fBstd::forward_list\fP< _Tp, _Alloc >::front () const\fC [inline]\fP" Returns a read-only (constant) reference to the data at the first element of the forward_list\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> allocator_type \fBstd::forward_list\fP< _Tp, _Alloc >::get_allocator () const\fC [inline]\fP, \fC [noexcept]\fP" .PP Get a copy of the memory allocation object\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_InputIterator\fP , \fBtypename\fP > \fBforward_list\fP< _Tp, _Alloc >::iterator forward_list::insert_after (\fBconst_iterator\fP __pos, \fB_InputIterator\fP __first, \fB_InputIterator\fP __last)" .PP Inserts a range into the forward_list\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP An iterator into the forward_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 last inserted element or \fI__pos\fP if \fI__first\fP == \fI__last\fP\&. .RE .PP This function will insert copies of the data in the range [\fI__first\fP,\fI__last\fP) into the forward_list after the location specified by \fI__pos\fP\&. .PP This operation is linear in the number of elements inserted and does not invalidate iterators and references\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBiterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::insert_after (\fBconst_iterator\fP __pos, \fBconst\fP _Tp & __val)\fC [inline]\fP" .PP Inserts given value into forward_list after specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP An iterator into the forward_list\&. .br \fI__val\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 after the specified location\&. Due to the nature of a forward_list this operation can be done in constant time, and does not invalidate iterators and references\&. .PP Referenced by \fBstd::forward_list< _Tp, _Alloc >::insert_after()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBforward_list\fP< _Tp, _Alloc >::iterator forward_list::insert_after (\fBconst_iterator\fP __pos, size_type __n, \fBconst\fP _Tp & __val)" .PP Inserts a number of copies of given data into the forward_list\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP An iterator into the forward_list\&. .br \fI__n\fP Number of elements to be inserted\&. .br \fI__val\fP Data to be inserted\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the last inserted copy of \fIval\fP or \fIpos\fP if \fIn\fP == 0\&. .RE .PP This function will insert a specified number of copies of the given data after the location specified by \fIpos\fP\&. .PP This operation is linear in the number of elements inserted and does not invalidate iterators and references\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBiterator\fP \fBstd::forward_list\fP< _Tp, _Alloc >::insert_after (\fBconst_iterator\fP __pos, \fBstd::initializer_list\fP< _Tp > __il)\fC [inline]\fP" .PP Inserts the contents of an initializer_list into forward_list after the specified iterator\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP An iterator into the forward_list\&. .br \fI__il\fP An initializer_list of value_type\&. .RE .PP \fBReturns\fP .RS 4 An iterator pointing to the last inserted element or \fI__pos\fP if \fI__il\fP is empty\&. .RE .PP This function will insert copies of the data in the initializer_list \fI__il\fP into the forward_list before the location specified by \fI__pos\fP\&. .PP This operation is linear in the number of elements inserted and does not invalidate iterators and references\&. .PP References \fBstd::forward_list< _Tp, _Alloc >::insert_after()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> size_type \fBstd::forward_list\fP< _Tp, _Alloc >::max_size () const\fC [inline]\fP, \fC [noexcept]\fP" Returns the largest possible number of elements of forward_list\&. .PP References \fB__gnu_cxx::__alloc_traits< _Alloc, typename >::max_size()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::merge (\fBforward_list\fP< _Tp, _Alloc > && __list)\fC [inline]\fP" .PP Merge sorted lists\&. .PP \fBParameters\fP .RS 4 \fI__list\fP Sorted list to merge\&. .RE .PP Assumes that both \fIlist\fP and this list are sorted according to operator<()\&. Merges elements of \fI__list\fP into this list in sorted order, leaving \fI__list\fP empty when complete\&. Elements in this list precede elements in \fI__list\fP that are equal\&. .PP References \fBstd::forward_list< _Tp, _Alloc >::merge()\fP, and \fBstd::move()\fP\&. .PP Referenced by \fBstd::forward_list< _Tp, _Alloc >::merge()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > template<\fBtypename\fP \fB_Comp\fP > \fBvoid\fP forward_list::merge (\fBforward_list\fP< _Tp, _Alloc > && __list, \fB_Comp\fP __comp)" .PP Merge sorted lists according to comparison function\&. .PP \fBParameters\fP .RS 4 \fI__list\fP Sorted list to merge\&. .br \fI__comp\fP Comparison function defining sort order\&. .RE .PP Assumes that both \fI__list\fP and this list are sorted according to comp\&. Merges elements of \fI__list\fP into this list in sorted order, leaving \fI__list\fP empty when complete\&. Elements in this list precede elements in \fI__list\fP that are equivalent according to comp()\&. .PP References \fBstd::__addressof()\fP, and \fBstd::move()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBforward_list\fP< _Tp, _Alloc > & forward_list::operator= (\fBconst\fP \fBforward_list\fP< _Tp, _Alloc > & __list)" .PP The forward_list assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__list\fP A forward_list of identical element and allocator types\&. .RE .PP All the elements of \fI__list\fP are copied\&. .PP Whether the allocator is copied depends on the allocator traits\&. .PP References \fBstd::__addressof()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBforward_list\fP & \fBstd::forward_list\fP< _Tp, _Alloc >::operator= (\fBforward_list\fP< _Tp, _Alloc > && __list)\fC [inline]\fP, \fC [noexcept]\fP" .PP The forward_list move assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__list\fP A forward_list of identical element and allocator types\&. .RE .PP The contents of \fI__list\fP are moved into this forward_list (without copying, if the allocators permit it)\&. .PP Afterwards \fI__list\fP is a valid, but unspecified forward_list .PP Whether the allocator is moved depends on the allocator traits\&. .PP References \fBstd::move()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBforward_list\fP & \fBstd::forward_list\fP< _Tp, _Alloc >::operator= (\fBstd::initializer_list\fP< _Tp > __il)\fC [inline]\fP" .PP The forward_list initializer list assignment operator\&. .PP \fBParameters\fP .RS 4 \fI__il\fP An initializer_list of value_type\&. .RE .PP Replace the contents of the forward_list with copies of the elements in the initializer_list \fI__il\fP\&. This is linear in __il\&.size()\&. .PP References \fBstd::forward_list< _Tp, _Alloc >::assign()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::pop_front ()\fC [inline]\fP" .PP Removes first element\&. This is a typical stack operation\&. It shrinks the forward_list by one\&. Due to the nature of a forward_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\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::push_front (\fBconst\fP _Tp & __val)\fC [inline]\fP" .PP Add data to the front of the forward_list\&. .PP \fBParameters\fP .RS 4 \fI__val\fP Data to be added\&. .RE .PP This is a typical stack operation\&. The function creates an element at the front of the forward_list and assigns the given data to it\&. Due to the nature of a forward_list this operation can be done in constant time, and does not invalidate iterators and references\&. .PP References \fBstd::forward_list< _Tp, _Alloc >::cbefore_begin()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBauto\fP forward_list::remove (\fBconst\fP _Tp & __val)" .PP Remove all elements equal to value\&. .PP \fBParameters\fP .RS 4 \fI__val\fP The value to remove\&. .RE .PP Removes every element in the list equal to \fI__val\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\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> template<\fBtypename\fP \fB_Pred\fP > \fB__remove_return_type\fP \fBstd::forward_list\fP< _Tp, _Alloc >::remove_if (\fB_Pred\fP __pred)" .PP Remove all elements satisfying a predicate\&. .PP \fBParameters\fP .RS 4 \fI__pred\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\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvoid\fP forward_list::resize (size_type __sz)" .PP Resizes the forward_list to the specified number of elements\&. .PP \fBParameters\fP .RS 4 \fI__sz\fP Number of elements the forward_list should contain\&. .RE .PP This function will resize the forward_list to the specified number of elements\&. If the number is smaller than the forward_list's current number of elements the forward_list is truncated, otherwise the forward_list is extended and the new elements are default constructed\&. .PP References \fBstd::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvoid\fP forward_list::resize (size_type __sz, \fBconst\fP value_type & __val)" .PP Resizes the forward_list to the specified number of elements\&. .PP \fBParameters\fP .RS 4 \fI__sz\fP Number of elements the forward_list should contain\&. .br \fI__val\fP Data with which new elements should be populated\&. .RE .PP This function will resize the forward_list to the specified number of elements\&. If the number is smaller than the forward_list's current number of elements the forward_list is truncated, otherwise the forward_list is extended and new elements are populated with given data\&. .PP References \fBstd::end()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_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<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::sort ()\fC [inline]\fP" .PP Sort the elements of the list\&. Sorts the elements of this list in NlogN time\&. Equivalent elements remain in list order\&. .PP References \fBstd::forward_list< _Tp, _Alloc >::sort()\fP\&. .PP Referenced by \fBstd::forward_list< _Tp, _Alloc >::sort()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBclass\fP _Alloc > template<\fBtypename\fP \fB_Comp\fP > \fBvoid\fP forward_list::sort (\fB_Comp\fP __comp)" .PP Sort the forward_list using a comparison function\&. Sorts the elements of this list in NlogN time\&. Equivalent elements remain in list order\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::splice_after (\fBconst_iterator\fP __pos, \fBforward_list\fP< _Tp, _Alloc > &&, \fBconst_iterator\fP __before, \fBconst_iterator\fP __last)\fC [inline]\fP, \fC [noexcept]\fP" .PP Insert range from another forward_list\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Iterator referencing the element to insert after\&. .br \fI__list\fP Source list\&. .br \fI__before\fP Iterator referencing before the start of range in list\&. .br \fI__last\fP Iterator referencing the end of range in list\&. .RE .PP Removes elements in the range (__before,__last) and inserts them after \fI__pos\fP in constant time\&. .PP Undefined if \fI__pos\fP is in (__before,__last)\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::splice_after (\fBconst_iterator\fP __pos, \fBforward_list\fP< _Tp, _Alloc > && __list)\fC [inline]\fP, \fC [noexcept]\fP" .PP Insert contents of another forward_list\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Iterator referencing the element to insert after\&. .br \fI__list\fP Source list\&. .RE .PP The elements of \fIlist\fP are inserted in constant time after the element referenced by \fIpos\fP\&. \fIlist\fP becomes an empty list\&. .PP Requires this != \fIx\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc > \fBvoid\fP forward_list::splice_after (\fBconst_iterator\fP __pos, \fBforward_list\fP< _Tp, _Alloc > && __list, \fBconst_iterator\fP __i)\fC [noexcept]\fP" .PP Insert element from another forward_list\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Iterator referencing the element to insert after\&. .br \fI__list\fP Source list\&. .br \fI__i\fP Iterator referencing the element before the element to move\&. .RE .PP Removes the element in list \fIlist\fP referenced by \fIi\fP and inserts it into the current list after \fIpos\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::splice_after (\fBconst_iterator\fP __pos, \fBforward_list\fP< _Tp, _Alloc > &, \fBconst_iterator\fP __before, \fBconst_iterator\fP __last)\fC [inline]\fP, \fC [noexcept]\fP" .PP Insert range from another forward_list\&. .PP \fBParameters\fP .RS 4 \fI__pos\fP Iterator referencing the element to insert after\&. .br \fI__list\fP Source list\&. .br \fI__before\fP Iterator referencing before the start of range in list\&. .br \fI__last\fP Iterator referencing the end of range in list\&. .RE .PP Removes elements in the range (__before,__last) and inserts them after \fI__pos\fP in constant time\&. .PP Undefined if \fI__pos\fP is in (__before,__last)\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fBvoid\fP \fBstd::forward_list\fP< _Tp, _Alloc >::swap (\fBforward_list\fP< _Tp, _Alloc > & __list)\fC [inline]\fP, \fC [noexcept]\fP" .PP Swaps data with another forward_list\&. .PP \fBParameters\fP .RS 4 \fI__list\fP A forward_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\&. .PP References \fBstd::swap()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> \fB__remove_return_type\fP \fBstd::forward_list\fP< _Tp, _Alloc >::unique ()\fC [inline]\fP" .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::forward_list< _Tp, _Alloc >::unique()\fP\&. .PP Referenced by \fBstd::forward_list< _Tp, _Alloc >::unique()\fP\&. .SS "template<\fBtypename\fP _Tp , \fBtypename\fP _Alloc = allocator<_Tp>> template<\fBtypename\fP \fB_BinPred\fP > \fB__remove_return_type\fP \fBstd::forward_list\fP< _Tp, _Alloc >::unique (\fB_BinPred\fP __binary_pred)" .PP Remove consecutive elements satisfying a predicate\&. .PP \fBParameters\fP .RS 4 \fI__binary_pred\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\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.