STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | List of all members
forward_list< _Ty, _Alloc > Class Template Reference
Inheritance diagram for forward_list< _Ty, _Alloc >:
_Flist_buy< _Ty, _Alloc > _Flist_alloc< _Flist_base_types< _Ty, _Alloc > >

Public Types

typedef forward_list< _Ty, _Alloc_Myt
 
typedef _Flist_buy< _Ty, _Alloc_Mybase
 
typedef _Mybase::_Node _Node
 
typedef _Mybase::_Nodeptr _Nodeptr
 
typedef _Mybase::_Alty _Alty
 
typedef _Alloc allocator_type
 
typedef _Mybase::size_type size_type
 
typedef _Mybase::difference_type difference_type
 
typedef _Mybase::pointer pointer
 
typedef _Mybase::const_pointer const_pointer
 
typedef _Mybase::reference reference
 
typedef _Mybase::const_reference const_reference
 
typedef _Mybase::value_type value_type
 
typedef _Mybase::const_iterator const_iterator
 
typedef _Mybase::iterator iterator
 
- Public Types inherited from _Flist_buy< _Ty, _Alloc >
typedef _Flist_buy< _Ty, _Alloc_Myt
 
typedef _Flist_alloc< _Flist_base_types< _Ty, _Alloc > > _Mybase
 
typedef _Mybase::_Alty _Alty
 
typedef _Mybase::_Nodeptr _Nodeptr
 
- Public Types inherited from _Flist_alloc< _Flist_base_types< _Ty, _Alloc > >
typedef _Flist_alloc< _Flist_base_types< _Ty, _Alloc > > _Myt
 
typedef _Flist_base_types< _Ty, _Alloc >::_Alloc _Alloc
 
typedef _Flist_base_types< _Ty, _Alloc >::_Alnod_type _Alty
 
typedef _Flist_base_types< _Ty, _Alloc >::_Node _Node
 
typedef _Flist_base_types< _Ty, _Alloc >::_Nodeptr _Nodeptr
 
typedef _Flist_base_types< _Ty, _Alloc >::_Val_types _Val_types
 
typedef _Nodeptr_Nodepref
 
typedef _Val_types::value_type value_type
 
typedef _Val_types::size_type size_type
 
typedef _Val_types::difference_type difference_type
 
typedef _Val_types::pointer pointer
 
typedef _Val_types::const_pointer const_pointer
 
typedef _Val_types::reference reference
 
typedef _Val_types::const_reference const_reference
 
typedef _Flist_const_iterator< _Flist_val< _Val_types > > const_iterator
 
typedef _Flist_iterator< _Flist_val< _Val_types > > iterator
 

Public Member Functions

 forward_list ()
 
 forward_list (_CRT_GUARDOVERFLOW size_type _Count, const _Alloc &_Al=_Alloc())
 
 forward_list (_CRT_GUARDOVERFLOW size_type _Count, const _Ty &_Val)
 
 forward_list (_CRT_GUARDOVERFLOW size_type _Count, const _Ty &_Val, const _Alloc &_Al)
 
 forward_list (const _Alloc &_Al)
 
 forward_list (const _Myt &_Right)
 
 forward_list (const _Myt &_Right, const _Alloc &_Al)
 
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
 forward_list (_Iter _First, _Iter _Last)
 
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
 forward_list (_Iter _First, _Iter _Last, const _Alloc &_Al)
 
template<class _Iter >
void _Construct (_Iter _First, _Iter _Last)
 
void _Construct_n (size_type _Count, const _Ty &_Val)
 
 forward_list (_Myt &&_Right)
 
 forward_list (_Myt &&_Right, const _Alloc &_Al)
 
_Mytoperator= (_Myt &&_Right) _NOEXCEPT_OP(_Alty
 
void _Assign_rv (_Myt &&_Right, true_type)
 
void _Assign_rv (_Myt &&_Right, false_type)
 
void push_front (_Ty &&_Val)
 
iterator insert_after (const_iterator _Where, _Ty &&_Val)
 
template<class... _Valty>
void emplace_front (_Valty &&..._Val)
 
template<class... _Valty>
iterator emplace_after (const_iterator _Where, _Valty &&..._Val)
 
template<class... _Valty>
void _Insert_after (const_iterator _Where, _Valty &&..._Val)
 
 forward_list (initializer_list< _Ty > _Ilist, const _Alloc &_Al=allocator_type())
 
_Mytoperator= (initializer_list< _Ty > _Ilist)
 
void assign (initializer_list< _Ty > _Ilist)
 
iterator insert_after (const_iterator _Where, initializer_list< _Ty > _Ilist)
 
 ~forward_list () _NOEXCEPT
 
_Mytoperator= (const _Myt &_Right)
 
iterator before_begin () _NOEXCEPT
 
const_iterator before_begin () const _NOEXCEPT
 
const_iterator cbefore_begin () const _NOEXCEPT
 
iterator begin () _NOEXCEPT
 
const_iterator begin () const _NOEXCEPT
 
iterator end () _NOEXCEPT
 
const_iterator end () const _NOEXCEPT
 
iterator _Make_iter (const_iterator _Where) const
 
const_iterator cbegin () const _NOEXCEPT
 
const_iterator cend () const _NOEXCEPT
 
void resize (_CRT_GUARDOVERFLOW size_type _Newsize)
 
void resize (_CRT_GUARDOVERFLOW size_type _Newsize, const _Ty &_Val)
 
size_type max_size () const _NOEXCEPT
 
bool empty () const _NOEXCEPT
 
allocator_type get_allocator () const _NOEXCEPT
 
reference front ()
 
const_reference front () const
 
void push_front (const _Ty &_Val)
 
void pop_front ()
 
template<class _Iter >
enable_if< _Is_iterator< _Iter >::value, void >::type assign (_Iter _First, _Iter _Last)
 
void assign (_CRT_GUARDOVERFLOW size_type _Count, const _Ty &_Val)
 
iterator insert_after (const_iterator _Where, const _Ty &_Val)
 
iterator insert_after (const_iterator _Where, _CRT_GUARDOVERFLOW size_type _Count, const _Ty &_Val)
 
template<class _Iter >
enable_if< _Is_iterator< _Iter >::value, iterator >::type insert_after (const_iterator _Where, _Iter _First, _Iter _Last)
 
template<class _Iter >
iterator _Insert_range (const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
 
template<class _Iter >
iterator _Insert_range (const_iterator _Where, _Iter _First, _Iter _Last, forward_iterator_tag)
 
iterator erase_after (const_iterator _Where)
 
iterator erase_after (const_iterator _First, const_iterator _Last)
 
void clear () _NOEXCEPT
 
void swap (_Myt &_Right) _NOEXCEPT_OP(_Alty
 
void splice_after (const_iterator _Where, _Myt &_Right)
 
void splice_after (const_iterator _Where, _Myt &&_Right)
 
void splice_after (const_iterator _Where, _Myt &_Right, const_iterator _First)
 
void splice_after (const_iterator _Where, _Myt &&_Right, const_iterator _First)
 
void splice_after (const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
 
void splice_after (const_iterator _Where, _Myt &&_Right, const_iterator _First, const_iterator _Last)
 
void remove (const _Ty &_Val)
 
template<class _Pr1 >
void remove_if (_Pr1 _Pred)
 
template<class _Pr1 >
void _Remove_if (_Pr1 &_Pred)
 
void unique ()
 
template<class _Pr2 >
void unique (_Pr2 _Pred)
 
void merge (_Myt &_Right)
 
void merge (_Myt &&_Right)
 
template<class _Pr2 >
void merge (_Myt &_Right, _Pr2 _Pred)
 
template<class _Pr2 >
void merge (_Myt &&_Right, _Pr2 _Pred)
 
template<class _Pr2 >
void _Merge1 (_Myt &_Right, _Pr2 &&_Pred)
 
void sort ()
 
template<class _Pr2 >
void sort (_Pr2 _Pred)
 
template<class _Pr2 >
void _Sort (iterator _Before_first, iterator _Last, _Pr2 &_Pred, size_type _Size)
 
void reverse () _NOEXCEPT
 
- Public Member Functions inherited from _Flist_buy< _Ty, _Alloc >
 _Flist_buy ()
 
template<class _Any_alloc , class = enable_if_t<!is_same<decay_t<_Any_alloc>, _Myt>::value>>
 _Flist_buy (_Any_alloc &&_Al)
 
_Nodeptr _Buynode0 (_Nodeptr _Next)
 
template<class... _Valty>
_Nodeptr _Buynode (_Nodeptr _Next, _Valty &&..._Val)
 
void _Freenode (_Nodeptr _Pnode)
 
- Public Member Functions inherited from _Flist_alloc< _Flist_base_types< _Ty, _Alloc > >
 _Flist_alloc ()
 
 _Flist_alloc (_Any_alloc &&_Al)
 
 ~_Flist_alloc () _NOEXCEPT
 
void _Copy_alloc (const _Alty &_Al)
 
void _Move_alloc (_Alty &_Al)
 
void _Orphan_all ()
 
void _Swap_all (_Myt &_Right)
 
_Alty_Getal () _NOEXCEPT
 
const _Alty_Getal () const _NOEXCEPT
 
_Flist_val< _Val_types > & _Get_data () _NOEXCEPT
 
const _Flist_val< _Val_types > & _Get_data () const _NOEXCEPT
 
_Nodeptr_Myhead () _NOEXCEPT
 
const _Nodeptr_Myhead () const _NOEXCEPT
 
_Nodeptr _Before_head () const _NOEXCEPT
 

Private Member Functions

size_type _Size () const
 
const_iterator _Before_end () const
 
void _Splice_after (const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
 
void _Splice_same_after (const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
 
void _Tidy ()
 
iterator _Insert_n_after (const_iterator _Where, size_type _Count, const _Ty &_Val)
 

Additional Inherited Members

- Static Public Member Functions inherited from _Flist_alloc< _Flist_base_types< _Ty, _Alloc > >
static _Nodepref _Nextnode (_Nodeptr _Pnode)
 
static reference _Myval (_Nodeptr _Pnode)
 

Member Typedef Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::_Alty forward_list< _Ty, _Alloc >::_Alty
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Flist_buy<_Ty, _Alloc> forward_list< _Ty, _Alloc >::_Mybase
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef forward_list<_Ty, _Alloc> forward_list< _Ty, _Alloc >::_Myt
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::_Node forward_list< _Ty, _Alloc >::_Node
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::_Nodeptr forward_list< _Ty, _Alloc >::_Nodeptr
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Alloc forward_list< _Ty, _Alloc >::allocator_type
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::const_iterator forward_list< _Ty, _Alloc >::const_iterator
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::const_pointer forward_list< _Ty, _Alloc >::const_pointer
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::const_reference forward_list< _Ty, _Alloc >::const_reference
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::difference_type forward_list< _Ty, _Alloc >::difference_type
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::iterator forward_list< _Ty, _Alloc >::iterator
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::pointer forward_list< _Ty, _Alloc >::pointer
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::reference forward_list< _Ty, _Alloc >::reference
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::size_type forward_list< _Ty, _Alloc >::size_type
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::value_type forward_list< _Ty, _Alloc >::value_type

Constructor & Destructor Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( )
inline
761  : _Mybase()
762  { // construct empty list
763  }
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Alloc _Al = _Alloc() 
)
inlineexplicit
766  : _Mybase(_Al)
767  { // construct list from _Count * _Ty(), optional allocator
768  resize(_Count);
769  }
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
_Diff _Count
Definition: algorithm:1941
void resize(_CRT_GUARDOVERFLOW size_type _Newsize)
Definition: forward_list:1031
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Ty &  _Val 
)
inline
772  : _Mybase()
773  { // construct list from _Count * _Val
775  }
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
void _Construct_n(size_type _Count, const _Ty &_Val)
Definition: forward_list:839
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Ty &  _Val,
const _Alloc _Al 
)
inline
778  : _Mybase(_Al)
779  { // construct list from _Count * _Val, allocator
781  }
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
void _Construct_n(size_type _Count, const _Ty &_Val)
Definition: forward_list:839
_Diff _Count
Definition: algorithm:1941
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( const _Alloc _Al)
inlineexplicit
784  : _Mybase(_Al)
785  { // construct empty list, allocator
786  }
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( const _Myt _Right)
inline
789  : _Mybase(_Right._Getal().select_on_container_copy_construction())
790  { // construct list by copying _Right
791  _TRY_BEGIN
792  insert_after(before_begin(), _Right.begin(), _Right.end());
793  _CATCH_ALL
794  _Tidy();
795  _RERAISE;
796  _CATCH_END
797  }
iterator insert_after(const_iterator _Where, _Ty &&_Val)
Definition: forward_list:895
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
#define _CATCH_ALL
Definition: xstddef:28
void _Tidy()
Definition: forward_list:1575
#define _RERAISE
Definition: xstddef:32
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( const _Myt _Right,
const _Alloc _Al 
)
inline
800  : _Mybase(_Al)
801  { // construct list by copying _Right, allocator
802  _TRY_BEGIN
803  insert_after(before_begin(), _Right.begin(), _Right.end());
804  _CATCH_ALL
805  _Tidy();
806  _RERAISE;
807  _CATCH_END
808  }
iterator insert_after(const_iterator _Where, _Ty &&_Val)
Definition: forward_list:895
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
#define _CATCH_ALL
Definition: xstddef:28
void _Tidy()
Definition: forward_list:1575
#define _RERAISE
Definition: xstddef:32
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
forward_list< _Ty, _Alloc >::forward_list ( _Iter  _First,
_Iter  _Last 
)
inline
814  : _Mybase()
815  { // construct list from [_First, _Last,
816  _Construct(_First, _Last);
817  }
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
void _Construct(_Iter _First, _Iter _Last)
Definition: forward_list:829
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
forward_list< _Ty, _Alloc >::forward_list ( _Iter  _First,
_Iter  _Last,
const _Alloc _Al 
)
inline
823  : _Mybase(_Al)
824  { // construct list, allocator from [_First, _Last)
825  _Construct(_First, _Last);
826  }
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
void _Construct(_Iter _First, _Iter _Last)
Definition: forward_list:829
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( _Myt &&  _Right)
inline
851  : _Mybase(_STD move(_Right._Getal()))
852  { // construct list by moving _Right
854  }
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
void _Assign_rv(_Myt &&_Right, true_type)
Definition: forward_list:875
integral_constant< bool, true > true_type
Definition: xtr1common:41
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( _Myt &&  _Right,
const _Alloc _Al 
)
inline
857  : _Mybase(_Al)
858  { // construct list by moving _Right, allocator
860  }
integral_constant< bool, false > false_type
Definition: xtr1common:42
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
void _Assign_rv(_Myt &&_Right, true_type)
Definition: forward_list:875
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::forward_list ( initializer_list< _Ty >  _Ilist,
const _Alloc _Al = allocator_type() 
)
inline
934  : _Mybase(_Al)
935  { // construct from initializer_list
936  insert_after(before_begin(), _Ilist.begin(), _Ilist.end());
937  }
iterator insert_after(const_iterator _Where, _Ty &&_Val)
Definition: forward_list:895
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_Flist_buy< _Ty, _Alloc > _Mybase
Definition: forward_list:743
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
template<class _Ty, class _Alloc = allocator<_Ty>>
forward_list< _Ty, _Alloc >::~forward_list ( )
inline
957  { // destroy the object
958  _Tidy();
959  }
void _Tidy()
Definition: forward_list:1575

Member Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::_Assign_rv ( _Myt &&  _Right,
true_type   
)
inline
876  { // swap with empty *this, same allocator
877  this->_Swap_all(_Right);
878  _Swap_adl(this->_Myhead(), _Right._Myhead());
879  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: forward_list:648
void _Swap_all(_Myt &_Right)
Definition: forward_list:623
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:73
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::_Assign_rv ( _Myt &&  _Right,
false_type   
)
inline
882  { // move from _Right, possibly moving its contents
883  if (this->_Getal() == _Right._Getal())
885  else
888  }
_Alty & _Getal() _NOEXCEPT
Definition: forward_list:628
void _Assign_rv(_Myt &&_Right, true_type)
Definition: forward_list:875
void _Construct(_Iter _First, _Iter _Last)
Definition: forward_list:829
integral_constant< bool, true > true_type
Definition: xtr1common:41
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
move_iterator< _RanIt > make_move_iterator(_RanIt _Iter)
Definition: xutility:2261
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator forward_list< _Ty, _Alloc >::_Before_end ( ) const
inlineprivate
1513  { // get iterator just before end
1514  const_iterator _Next = before_begin();
1515  for (const_iterator _Nextp = _Next; ++_Nextp != end(); )
1516  _Next = _Nextp;
1517  return (_Next);
1518  }
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
iterator end() _NOEXCEPT
Definition: forward_list:1006
_Mybase::const_iterator const_iterator
Definition: forward_list:757
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
void forward_list< _Ty, _Alloc >::_Construct ( _Iter  _First,
_Iter  _Last 
)
inline
830  { // construct list from [_First, _Last), input iterators
831  _TRY_BEGIN
832  insert_after(before_begin(), _First, _Last);
833  _CATCH_ALL
834  _Tidy();
835  _RERAISE;
836  _CATCH_END
837  }
iterator insert_after(const_iterator _Where, _Ty &&_Val)
Definition: forward_list:895
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
#define _CATCH_ALL
Definition: xstddef:28
void _Tidy()
Definition: forward_list:1575
#define _RERAISE
Definition: xstddef:32
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::_Construct_n ( size_type  _Count,
const _Ty &  _Val 
)
inline
841  { // construct from _Count * _Val
842  _TRY_BEGIN
844  _CATCH_ALL
845  _Tidy();
846  _RERAISE;
847  _CATCH_END
848  }
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
#define _CATCH_ALL
Definition: xstddef:28
void _Tidy()
Definition: forward_list:1575
_Diff _Count
Definition: algorithm:1941
#define _RERAISE
Definition: xstddef:32
iterator _Insert_n_after(const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: forward_list:1580
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
void forward_list< _Ty, _Alloc >::_Insert_after ( const_iterator  _Where,
_Valty &&...  _Val 
)
inline
916  { // insert element after _Where
917  #if _ITERATOR_DEBUG_LEVEL == 2
918  if (_Where._Getcont() != _STD addressof(this->_Get_data()))
919  {
920  _DEBUG_ERROR("forward_list insert_after iterator outside range");
921  }
922  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
923 
924  _Nodeptr _Pnode = _Where._Mynode();
925  _Nodeptr _Newnode =
926  this->_Buynode(this->_Nextnode(_Pnode),
927  _STD forward<_Valty>(_Val)...);
928  this->_Nextnode(_Pnode) = _Newnode;
929  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: forward_list:490
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
_Mybase::_Nodeptr _Nodeptr
Definition: forward_list:745
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_FwdIt const _Ty _Val
Definition: algorithm:1938
_Nodeptr _Buynode(_Nodeptr _Next, _Valty &&..._Val)
Definition: forward_list:707
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::_Insert_n_after ( const_iterator  _Where,
size_type  _Count,
const _Ty &  _Val 
)
inlineprivate
1582  { // insert _Count * _Val after _Where
1583  size_type _Countsave = _Count;
1584 
1585  _TRY_BEGIN
1586  for (; 0 < _Count; --_Count, (void)++_Where)
1587  _Insert_after(_Where, _Val);
1588  _CATCH_ALL
1589  for (; _Count < _Countsave; ++_Count)
1590  erase_after(_Where);
1591  _RERAISE;
1592  _CATCH_END
1593  return (_Make_iter(_Where));
1594  }
iterator _Make_iter(const_iterator _Where) const
Definition: forward_list:1016
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
#define _CATCH_ALL
Definition: xstddef:28
_Mybase::size_type size_type
Definition: forward_list:749
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
_Diff _Count
Definition: algorithm:1941
#define _RERAISE
Definition: xstddef:32
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
iterator forward_list< _Ty, _Alloc >::_Insert_range ( const_iterator  _Where,
_Iter  _First,
_Iter  _Last,
input_iterator_tag   
)
inline
1143  { // insert [_First, _Last) after _Where, input iterators
1144  size_type _Num = 0;
1145  const_iterator _After = _Where;
1146 
1147  _TRY_BEGIN
1148  for (; _First != _Last; ++_After, (void)++_First, ++_Num)
1149  _Insert_after(_After, *_First);
1150  _CATCH_ALL
1151  for (; 0 < _Num; --_Num)
1152  erase_after(_Where);
1153  _RERAISE;
1154  _CATCH_END
1155  return (_Make_iter(_After));
1156  }
iterator _Make_iter(const_iterator _Where) const
Definition: forward_list:1016
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
#define _CATCH_ALL
Definition: xstddef:28
_Mybase::size_type size_type
Definition: forward_list:749
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
_Mybase::const_iterator const_iterator
Definition: forward_list:757
#define _RERAISE
Definition: xstddef:32
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
iterator forward_list< _Ty, _Alloc >::_Insert_range ( const_iterator  _Where,
_Iter  _First,
_Iter  _Last,
forward_iterator_tag   
)
inline
1161  { // insert [_First, _Last) after _Where, forward iterators
1162  _DEBUG_RANGE(_First, _Last);
1163  _Iter _Next = _First;
1164  const_iterator _After = _Where;
1165 
1166  _TRY_BEGIN
1167  for (; _First != _Last; ++_After, (void)++_First)
1168  _Insert_after(_After, *_First);
1169  _CATCH_ALL
1170  for (; _Next != _First; ++_Next)
1171  erase_after(_Where);
1172  _RERAISE;
1173  _CATCH_END
1174  return (_Make_iter(_After));
1175  }
iterator _Make_iter(const_iterator _Where) const
Definition: forward_list:1016
#define _DEBUG_RANGE(first, last)
Definition: xutility:902
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
#define _CATCH_ALL
Definition: xstddef:28
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
_Mybase::const_iterator const_iterator
Definition: forward_list:757
#define _RERAISE
Definition: xstddef:32
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::_Make_iter ( const_iterator  _Where) const
inline
1017  { // make iterator from const_iterator
1018  return (iterator(_Where._Ptr, _STD addressof(this->_Get_data())));
1019  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::iterator iterator
Definition: forward_list:758
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void forward_list< _Ty, _Alloc >::_Merge1 ( _Myt _Right,
_Pr2 &&  _Pred 
)
inline
1418  { // merge in elements from _Right, both ordered by _Pred
1419  if (this != _STD addressof(_Right))
1420  { // safe to merge, do it
1421  iterator _First1 = before_begin();
1422  iterator _After1 = begin();
1423  iterator _Last1 = end();
1424  iterator _First2 = _Right.before_begin();
1425  iterator _After2 = _Right.begin();
1426  iterator _Last2 = _Right.end();
1427  _DEBUG_ORDER_PRED(_After1, _Last1, _Pred);
1428  _DEBUG_ORDER_PRED(_After2, _Last2, _Pred);
1429 
1430  for (; _After1 != _Last1 && _After2 != _Last2; ++_First1)
1431  if (_DEBUG_LT_PRED(_Pred, *_After2, *_After1))
1432  { // splice in an element from _Right
1433  iterator _Mid2 = _After2;
1434  _Splice_after(_First1, _Right, _First2, ++_Mid2);
1435  _After2 = _Mid2;
1436  }
1437  else
1438  ++_After1;
1439 
1440  if (_After2 != _Last2)
1441  _Splice_after(_First1, _Right, _First2,
1442  _Last2); // splice remainder of _Right
1443  }
1444  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Splice_after(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
Definition: forward_list:1520
#define _DEBUG_LT_PRED(pred, x, y)
Definition: xutility:900
Definition: xutility:565
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
iterator begin() _NOEXCEPT
Definition: forward_list:996
iterator end() _NOEXCEPT
Definition: forward_list:1006
#define _DEBUG_ORDER_PRED(first, last, pred)
Definition: xutility:901
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr1 >
void forward_list< _Ty, _Alloc >::_Remove_if ( _Pr1 &  _Pred)
inline
1361  { // erase each element satisfying _Pr1
1362  iterator _Firstb = before_begin();
1363 
1364  for (iterator _First = begin(); _First != end(); )
1365  if (_Pred(*_First))
1366  _First = erase_after(_Firstb);
1367  else
1368  { // advance iterators
1369  ++_Firstb;
1370  ++_First;
1371  }
1372  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
Definition: xutility:565
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
iterator begin() _NOEXCEPT
Definition: forward_list:996
iterator end() _NOEXCEPT
Definition: forward_list:1006
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
template<class _Ty, class _Alloc = allocator<_Ty>>
size_type forward_list< _Ty, _Alloc >::_Size ( ) const
inlineprivate
1505  { // get size by counting
1506  size_type _Ans = 0;
1507  for (const_iterator _Next = begin(); _Next != end(); ++_Next)
1508  ++_Ans;
1509  return (_Ans);
1510  }
iterator begin() _NOEXCEPT
Definition: forward_list:996
iterator end() _NOEXCEPT
Definition: forward_list:1006
_Mybase::size_type size_type
Definition: forward_list:749
_Mybase::const_iterator const_iterator
Definition: forward_list:757
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void forward_list< _Ty, _Alloc >::_Sort ( iterator  _Before_first,
iterator  _Last,
_Pr2 &  _Pred,
size_type  _Size 
)
inline
1460  { // order (_Before_first, _Last), using _Pred
1461  // _Size must be number of elements in range
1462  if (_Size < 2)
1463  return; // nothing to do
1464 
1465  iterator _Mid = _STD next(_Before_first, 1 + _Size / 2);
1466  _Sort(_Before_first, _Mid, _Pred, _Size / 2);
1467  iterator _First = _STD next(_Before_first);
1468 
1469  iterator _Before_mid = _STD next(_Before_first, _Size / 2);
1470  _Sort(_Before_mid, _Last, _Pred, _Size - _Size / 2);
1471  _Mid = _STD next(_Before_mid);
1472 
1473  for (; ; )
1474  { // [_First, _Mid) and [_Mid, _Last) are sorted and non-empty
1475  if (_DEBUG_LT_PRED(_Pred, *_Mid, *_First))
1476  { // consume _Mid
1477  splice_after(_Before_first, *this, _Before_mid);
1478  ++_Before_first;
1479  _Mid = _STD next(_Before_mid);
1480  if (_Mid == _Last)
1481  return; // exhausted [_Mid, _Last); done
1482  }
1483  else
1484  { // consume _First
1485  ++_Before_first;
1486  ++_First;
1487  if (_First == _Mid)
1488  return; // exhausted [_First, _Mid); done
1489  }
1490  }
1491  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
#define _DEBUG_LT_PRED(pred, x, y)
Definition: xutility:900
Definition: xutility:565
size_type _Size() const
Definition: forward_list:1504
_InIt next(_InIt _First, _Iter_diff_t< _InIt > _Off=1)
Definition: xutility:1118
void splice_after(const_iterator _Where, _Myt &_Right)
Definition: forward_list:1270
void _Sort(iterator _Before_first, iterator _Last, _Pr2 &_Pred, size_type _Size)
Definition: forward_list:1458
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::_Splice_after ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First,
const_iterator  _Last 
)
inlineprivate
1522  { // splice _Right (_First, _Last) just after _Where
1523  #if _ITERATOR_DEBUG_LEVEL == 2
1524  if (_Where._Getcont() != _STD addressof(this->_Get_data()) || _Where == end())
1525  {
1526  _DEBUG_ERROR("forward_list splice_after iterator outside range");
1527  }
1528 
1529  if (this->_Getal() != _Right._Getal())
1530  {
1531  _DEBUG_ERROR("forward_list containers incompatible for splice_after");
1532  }
1533 
1534  if (this != _STD addressof(_Right))
1535  { // transfer ownership of (_First, _Last)
1536  const_iterator _Next = _First;
1537  for (++_Next; _Next != _Last; )
1538  { // transfer ownership
1539  const_iterator _Iter = _Next++;
1540  _Right._Orphan_ptr(_Iter._Ptr);
1541  _Iter._Adopt(_STD addressof(this->_Get_data()));
1542  }
1543  }
1544 
1545  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
1546  if (this->_Getal() != _Right._Getal())
1547  _STD terminate();
1548  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1549 
1550  _Splice_same_after(_Where, _Right, _First, _Last);
1551  }
_Alty & _Getal() _NOEXCEPT
Definition: forward_list:628
void _Splice_same_after(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
Definition: forward_list:1553
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
void __CRTDECL terminate() _NOEXCEPT
Definition: exception:208
iterator end() _NOEXCEPT
Definition: forward_list:1006
_Mybase::const_iterator const_iterator
Definition: forward_list:757
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::_Splice_same_after ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First,
const_iterator  _Last 
)
inlineprivate
1555  { // splice _Right (_First, _Last) just after _Where
1556  const_iterator _Next = _First;
1557  const_iterator _After = _Next;
1558  for (++_After; _After != _Last; ++_Next, (void)++_After)
1559  if (_After == _Right.end())
1560  { // find last element, and check for bad range
1561  #if _ITERATOR_DEBUG_LEVEL == 2
1562  _DEBUG_ERROR("forward_list splice_after invalid range");
1563  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1564 
1565  return;
1566  }
1567  this->_Nextnode(_Next._Mynode()) =
1568  this->_Nextnode(_Where._Mynode()); // link last to new home
1569  this->_Nextnode(_Where._Mynode()) =
1570  this->_Nextnode(_First._Mynode()); // link first to new home
1571  this->_Nextnode(_First._Mynode()) =
1572  _Last._Mynode(); // drop range from old home
1573  }
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: forward_list:490
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
_Mybase::const_iterator const_iterator
Definition: forward_list:757
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::_Tidy ( )
inlineprivate
1576  { // free all storage
1577  clear();
1578  }
void clear() _NOEXCEPT
Definition: forward_list:1241
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::assign ( initializer_list< _Ty >  _Ilist)
inline
946  { // assign initializer_list
947  assign(_Ilist.begin(), _Ilist.end());
948  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
void assign(initializer_list< _Ty > _Ilist)
Definition: forward_list:945
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
enable_if<_Is_iterator<_Iter>::value, void>::type forward_list< _Ty, _Alloc >::assign ( _Iter  _First,
_Iter  _Last 
)
inline
1108  { // assign [_First, _Last), input iterators
1109  clear();
1110  insert_after(before_begin(), _First, _Last);
1111  }
iterator insert_after(const_iterator _Where, _Ty &&_Val)
Definition: forward_list:895
void clear() _NOEXCEPT
Definition: forward_list:1241
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::assign ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Ty &  _Val 
)
inline
1114  { // assign _Count * _Val
1115  clear();
1117  }
void clear() _NOEXCEPT
Definition: forward_list:1241
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_Diff _Count
Definition: algorithm:1941
iterator _Insert_n_after(const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: forward_list:1580
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::before_begin ( )
inline
982  { // return iterator before beginning of mutable sequence
983  return (iterator(this->_Before_head(), _STD addressof(this->_Get_data())));
984  }
_Nodeptr _Before_head() const _NOEXCEPT
Definition: forward_list:658
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::iterator iterator
Definition: forward_list:758
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator forward_list< _Ty, _Alloc >::before_begin ( ) const
inline
987  { // return iterator before beginning of nonmutable sequence
988  return (const_iterator(this->_Before_head(), _STD addressof(this->_Get_data())));
989  }
_Nodeptr _Before_head() const _NOEXCEPT
Definition: forward_list:658
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
_Mybase::const_iterator const_iterator
Definition: forward_list:757
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::begin ( )
inline
997  { // return iterator for beginning of mutable sequence
998  return (iterator(this->_Myhead(), _STD addressof(this->_Get_data())));
999  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: forward_list:648
_Mybase::iterator iterator
Definition: forward_list:758
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator forward_list< _Ty, _Alloc >::begin ( ) const
inline
1002  { // return iterator for beginning of nonmutable sequence
1003  return (const_iterator(this->_Myhead(), _STD addressof(this->_Get_data())));
1004  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: forward_list:648
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
_Mybase::const_iterator const_iterator
Definition: forward_list:757
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator forward_list< _Ty, _Alloc >::cbefore_begin ( ) const
inline
992  { // return iterator before beginning of nonmutable sequence
993  return (before_begin());
994  }
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator forward_list< _Ty, _Alloc >::cbegin ( ) const
inline
1022  { // return iterator for beginning of nonmutable sequence
1023  return (begin());
1024  }
iterator begin() _NOEXCEPT
Definition: forward_list:996
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator forward_list< _Ty, _Alloc >::cend ( ) const
inline
1027  { // return iterator for end of nonmutable sequence
1028  return (end());
1029  }
iterator end() _NOEXCEPT
Definition: forward_list:1006
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::clear ( )
inline
1242  { // erase all
1243  #if _ITERATOR_DEBUG_LEVEL == 2
1244  this->_Orphan_ptr(nullptr_t{});
1245  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1246 
1247  _Nodeptr _Pnext;
1248  _Nodeptr _Pnode = this->_Myhead();
1249  this->_Myhead() = nullptr_t{};
1250 
1251  for (; _Pnode != nullptr_t{}; _Pnode = _Pnext)
1252  { // delete an element
1253  _Pnext = this->_Nextnode(_Pnode);
1254 
1255  this->_Freenode(_Pnode);
1256  }
1257  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: forward_list:648
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: forward_list:490
_Mybase::_Nodeptr _Nodeptr
Definition: forward_list:745
void _Freenode(_Nodeptr _Pnode)
Definition: forward_list:725
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
iterator forward_list< _Ty, _Alloc >::emplace_after ( const_iterator  _Where,
_Valty &&...  _Val 
)
inline
908  { // insert element at _Where
909  _Insert_after(_Where, _STD forward<_Valty>(_Val)...);
910  return (_Make_iter(++_Where));
911  }
iterator _Make_iter(const_iterator _Where) const
Definition: forward_list:1016
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
void forward_list< _Ty, _Alloc >::emplace_front ( _Valty &&...  _Val)
inline
902  { // insert element at beginning
903  _Insert_after(before_begin(), _STD forward<_Valty>(_Val)...);
904  }
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
bool forward_list< _Ty, _Alloc >::empty ( ) const
inline
1074  { // test if sequence is empty
1075  return (begin() == end());
1076  }
iterator begin() _NOEXCEPT
Definition: forward_list:996
iterator end() _NOEXCEPT
Definition: forward_list:1006
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::end ( )
inline
1007  { // return iterator for end of mutable sequence
1008  return (iterator(nullptr_t{}, _STD addressof(this->_Get_data())));
1009  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::iterator iterator
Definition: forward_list:758
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator forward_list< _Ty, _Alloc >::end ( ) const
inline
1012  { // return iterator for end of nonmutable sequence
1013  return (const_iterator(nullptr_t{}, _STD addressof(this->_Get_data())));
1014  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
_Mybase::const_iterator const_iterator
Definition: forward_list:757
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::erase_after ( const_iterator  _Where)
inline
1178  { // erase element after _Where
1179  #if _ITERATOR_DEBUG_LEVEL == 2
1180  if (_Where._Getcont() != _STD addressof(this->_Get_data())
1181  || _Where == end())
1182  {
1183  _DEBUG_ERROR("forward_list erase_after iterator outside range");
1184  }
1185 
1186  _Nodeptr _Pnodeb = _Where._Mynode();
1187  _Orphan_ptr(this->_Nextnode(_Pnodeb));
1188 
1189  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
1190  _Nodeptr _Pnodeb = _Where._Mynode();
1191  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1192 
1193  if (++_Where == end())
1194  {
1195  #if _ITERATOR_DEBUG_LEVEL == 2
1196  _DEBUG_ERROR("forward_list erase_after iterator outside range");
1197  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1198  }
1199  else
1200  { // node exists, erase it
1201  _Nodeptr _Pnode = _Where._Mynode(); // subject node
1202  ++_Where; // point past subject node
1203 
1204  this->_Nextnode(_Pnodeb) =
1205  this->_Nextnode(_Pnode); // link past it
1206 
1207  this->_Freenode(_Pnode);
1208  }
1209 
1210  return (_Make_iter(_Where));
1211  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
iterator _Make_iter(const_iterator _Where) const
Definition: forward_list:1016
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: forward_list:490
_Flist_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: forward_list:638
iterator end() _NOEXCEPT
Definition: forward_list:1006
_Mybase::_Nodeptr _Nodeptr
Definition: forward_list:745
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
void _Freenode(_Nodeptr _Pnode)
Definition: forward_list:725
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::erase_after ( const_iterator  _First,
const_iterator  _Last 
)
inline
1215  { // erase (_First, _Last)
1216  if (_First == before_begin() && _Last == end())
1217  { // erase all and return fresh iterator
1218  clear();
1219  return (end());
1220  }
1221  else
1222  { // erase subrange
1223  if (_First == end() || _First == _Last)
1224  {
1225  #if _ITERATOR_DEBUG_LEVEL == 2
1226  _DEBUG_ERROR("forward_list invalid erase_after range");
1227  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1228  }
1229  else
1230  { // range not awful, try it
1231  const_iterator _After = _First;
1232  ++_After;
1233  _DEBUG_RANGE(_After, _Last);
1234  while (_After != _Last)
1235  _After = erase_after(_First);
1236  }
1237  return (_Make_iter(_Last));
1238  }
1239  }
iterator _Make_iter(const_iterator _Where) const
Definition: forward_list:1016
void clear() _NOEXCEPT
Definition: forward_list:1241
#define _DEBUG_RANGE(first, last)
Definition: xutility:902
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
iterator end() _NOEXCEPT
Definition: forward_list:1006
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
_Mybase::const_iterator const_iterator
Definition: forward_list:757
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
reference forward_list< _Ty, _Alloc >::front ( )
inline
1085  { // return first element of mutable sequence
1086  return (*begin());
1087  }
iterator begin() _NOEXCEPT
Definition: forward_list:996
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reference forward_list< _Ty, _Alloc >::front ( ) const
inline
1090  { // return first element of nonmutable sequence
1091  return (*begin());
1092  }
iterator begin() _NOEXCEPT
Definition: forward_list:996
template<class _Ty, class _Alloc = allocator<_Ty>>
allocator_type forward_list< _Ty, _Alloc >::get_allocator ( ) const
inline
1079  { // return allocator object for values
1080  allocator_type _Ret(this->_Getal());
1081  return (_Ret);
1082  }
_Alty & _Getal() _NOEXCEPT
Definition: forward_list:628
_Alloc allocator_type
Definition: forward_list:748
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::insert_after ( const_iterator  _Where,
_Ty &&  _Val 
)
inline
896  { // insert _Val at _Where
897  return (emplace_after(_Where, _STD forward<_Ty>(_Val)));
898  }
iterator emplace_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:907
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::insert_after ( const_iterator  _Where,
initializer_list< _Ty >  _Ilist 
)
inline
952  { // insert initializer_list
953  return (insert_after(_Where, _Ilist.begin(), _Ilist.end()));
954  }
iterator insert_after(const_iterator _Where, _Ty &&_Val)
Definition: forward_list:895
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::insert_after ( const_iterator  _Where,
const _Ty &  _Val 
)
inline
1120  { // insert _Val at _Where
1121  _Insert_after(_Where, _Val);
1122  return (_Make_iter(++_Where));
1123  }
iterator _Make_iter(const_iterator _Where) const
Definition: forward_list:1016
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator forward_list< _Ty, _Alloc >::insert_after ( const_iterator  _Where,
_CRT_GUARDOVERFLOW size_type  _Count,
const _Ty &  _Val 
)
inline
1127  { // insert _Count * _Val at _Where
1128  return (_Insert_n_after(_Where, _Count, _Val));
1129  }
_Diff _Count
Definition: algorithm:1941
iterator _Insert_n_after(const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: forward_list:1580
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
enable_if<_Is_iterator<_Iter>::value, iterator>::type forward_list< _Ty, _Alloc >::insert_after ( const_iterator  _Where,
_Iter  _First,
_Iter  _Last 
)
inline
1136  { // insert [_First, _Last) at _Where
1137  return (_Insert_range(_Where, _First, _Last, _Iter_cat_t<_Iter>()));
1138  }
typename iterator_traits< _Iter >::iterator_category _Iter_cat_t
Definition: xutility:657
iterator _Insert_range(const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
Definition: forward_list:1141
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
size_type forward_list< _Ty, _Alloc >::max_size ( ) const
inline
1069  { // return maximum possible length of sequence
1070  return (this->_Getal().max_size());
1071  }
_Alty & _Getal() _NOEXCEPT
Definition: forward_list:628
size_type max_size() const _NOEXCEPT
Definition: forward_list:1068
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::merge ( _Myt _Right)
inline
1395  { // merge in elements from _Right, both ordered by operator<
1396  _Merge1(_Right, less<>());
1397  }
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: forward_list:1417
Definition: xstddef:226
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::merge ( _Myt &&  _Right)
inline
1400  { // merge in elements from _Right, both ordered by operator<
1401  _Merge1(_Right, less<>());
1402  }
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: forward_list:1417
Definition: xstddef:226
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void forward_list< _Ty, _Alloc >::merge ( _Myt _Right,
_Pr2  _Pred 
)
inline
1406  { // merge in elements from _Right, both ordered by _Pred
1407  _Merge1(_Right, _Pred);
1408  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: forward_list:1417
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void forward_list< _Ty, _Alloc >::merge ( _Myt &&  _Right,
_Pr2  _Pred 
)
inline
1412  { // merge in elements from _Right, both ordered by _Pred
1413  _Merge1(_Right, _Pred);
1414  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: forward_list:1417
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& forward_list< _Ty, _Alloc >::operator= ( _Myt &&  _Right)
inline
864  { // assign by moving _Right
865  if (this != _STD addressof(_Right))
866  { // different, assign it
867  clear();
868  this->_Move_alloc(_Right._Getal());
870  typename _Alty::propagate_on_container_move_assignment());
871  }
872  return (*this);
873  }
void _Move_alloc(_Alty &_Al)
Definition: forward_list:523
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void clear() _NOEXCEPT
Definition: forward_list:1241
void _Assign_rv(_Myt &&_Right, true_type)
Definition: forward_list:875
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& forward_list< _Ty, _Alloc >::operator= ( initializer_list< _Ty >  _Ilist)
inline
940  { // assign initializer_list
941  assign(_Ilist.begin(), _Ilist.end());
942  return (*this);
943  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
void assign(initializer_list< _Ty > _Ilist)
Definition: forward_list:945
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& forward_list< _Ty, _Alloc >::operator= ( const _Myt _Right)
inline
962  { // assign _Right
963  if (this != _STD addressof(_Right))
964  { // different, assign it
965 #pragma warning(push)
966 #pragma warning(disable: 4127) // conditional expression is constant
967  if (_Alty::propagate_on_container_copy_assignment::value
968  && this->_Getal() != _Right._Getal())
969  { // change allocator before copying
970  clear();
971  }
972 #pragma warning(pop)
973 
974  this->_Copy_alloc(_Right._Getal());
975 
976  assign(_Right.begin(), _Right.end());
977  }
978  return (*this);
979  }
_Alty & _Getal() _NOEXCEPT
Definition: forward_list:628
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void clear() _NOEXCEPT
Definition: forward_list:1241
void assign(initializer_list< _Ty > _Ilist)
Definition: forward_list:945
constexpr const _Ty &() _Right
Definition: algorithm:3723
void _Copy_alloc(const _Alty &_Al)
Definition: forward_list:518
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::pop_front ( )
inline
1100  { // erase element at beginning
1102  }
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::push_front ( _Ty &&  _Val)
inline
891  { // insert element at beginning
892  _Insert_after(before_begin(), _STD forward<_Ty>(_Val));
893  }
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::push_front ( const _Ty &  _Val)
inline
1095  { // insert element at beginning
1097  }
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::remove ( const _Ty &  _Val)
inline
1329  { // erase each element matching _Val
1330  iterator _Firstb = before_begin();
1331  iterator _Val_it = end();
1332 
1333  for (iterator _First = begin(); _First != end(); )
1334  if (*_First == _Val)
1335  if (_STD addressof(*_First) == _STD addressof(_Val))
1336  { // store iterator to _Val and advance iterators
1337  _Val_it = _Firstb;
1338  ++_Firstb;
1339  ++_First;
1340  }
1341  else
1342  _First = erase_after(_Firstb);
1343  else
1344  { // advance iterators
1345  ++_Firstb;
1346  ++_First;
1347  }
1348 
1349  if (_Val_it != end())
1350  erase_after(_Val_it);
1351  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
Definition: xutility:565
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
iterator begin() _NOEXCEPT
Definition: forward_list:996
iterator end() _NOEXCEPT
Definition: forward_list:1006
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr1 >
void forward_list< _Ty, _Alloc >::remove_if ( _Pr1  _Pred)
inline
1355  { // erase each element satisfying _Pr1
1356  _Remove_if(_Pred);
1357  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Remove_if(_Pr1 &_Pred)
Definition: forward_list:1360
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::resize ( _CRT_GUARDOVERFLOW size_type  _Newsize)
inline
1032  { // determine new length, padding with _Ty() elements as needed
1033  size_type _Cursize = _Size();
1034  if (_Cursize < _Newsize)
1035  { // pad to make larger
1036  const_iterator _Next = _Before_end();
1037  _TRY_BEGIN
1038  for (; _Cursize < _Newsize; ++_Cursize)
1039  _Insert_after(_Next);
1040  _CATCH_ALL
1041  erase_after(_Next, end());
1042  _RERAISE;
1043  _CATCH_END
1044  }
1045  else if (_Newsize < _Cursize)
1046  { // erase all but _Newsize elements
1047  iterator _Next = before_begin();
1048  for (; 0 < _Newsize; --_Newsize)
1049  ++_Next;
1050  erase_after(_Next, end());
1051  }
1052  }
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
Definition: xutility:565
void _Insert_after(const_iterator _Where, _Valty &&..._Val)
Definition: forward_list:914
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
size_type _Size() const
Definition: forward_list:1504
const_iterator _Before_end() const
Definition: forward_list:1512
iterator end() _NOEXCEPT
Definition: forward_list:1006
#define _CATCH_ALL
Definition: xstddef:28
_Mybase::size_type size_type
Definition: forward_list:749
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
_Mybase::const_iterator const_iterator
Definition: forward_list:757
#define _RERAISE
Definition: xstddef:32
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::resize ( _CRT_GUARDOVERFLOW size_type  _Newsize,
const _Ty &  _Val 
)
inline
1055  { // determine new length, padding with _Val elements as needed
1056  size_type _Cursize = _Size();
1057  if (_Cursize < _Newsize)
1058  _Insert_n_after(_Before_end(), _Newsize - _Cursize, _Val);
1059  else if (_Newsize < _Cursize)
1060  { // erase all but _Newsize elements
1061  iterator _Next = before_begin();
1062  for (; 0 < _Newsize; --_Newsize)
1063  ++_Next;
1064  erase_after(_Next, end());
1065  }
1066  }
Definition: xutility:565
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
size_type _Size() const
Definition: forward_list:1504
const_iterator _Before_end() const
Definition: forward_list:1512
iterator end() _NOEXCEPT
Definition: forward_list:1006
_Mybase::size_type size_type
Definition: forward_list:749
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177
iterator _Insert_n_after(const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: forward_list:1580
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::reverse ( )
inline
1494  { // reverse sequence
1495  if (!empty())
1496  { // worth doing, move to back in reverse order
1497  const_iterator _First = _Before_end();
1498  for (; begin() != _First; )
1499  _Splice_same_after(_First, *this, before_begin(), ++begin());
1500  }
1501  }
void _Splice_same_after(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
Definition: forward_list:1553
bool empty() const _NOEXCEPT
Definition: forward_list:1073
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
iterator begin() _NOEXCEPT
Definition: forward_list:996
const_iterator _Before_end() const
Definition: forward_list:1512
_Mybase::const_iterator const_iterator
Definition: forward_list:757
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::sort ( )
inline
1447  { // order sequence, using operator<
1448  sort(less<>());
1449  }
void sort()
Definition: forward_list:1446
Definition: xstddef:226
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void forward_list< _Ty, _Alloc >::sort ( _Pr2  _Pred)
inline
1453  { // order sequence, using _Pred
1454  _Sort(before_begin(), end(), _Pred, _STD distance(begin(), end()));
1455  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
iterator before_begin() _NOEXCEPT
Definition: forward_list:981
_Iter_diff_t< _InIt > distance(_InIt _First, _InIt _Last)
Definition: xutility:1111
iterator begin() _NOEXCEPT
Definition: forward_list:996
iterator end() _NOEXCEPT
Definition: forward_list:1006
void _Sort(iterator _Before_first, iterator _Last, _Pr2 &_Pred, size_type _Size)
Definition: forward_list:1458
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::splice_after ( const_iterator  _Where,
_Myt _Right 
)
inline
1271  { // splice all of _Right after _Where
1272  if (this != _STD addressof(_Right) && !_Right.empty())
1273  { // worth splicing, do it
1274  _Splice_after(_Where, _Right,
1275  _Right.before_begin(), _Right.end());
1276  }
1277  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Splice_after(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
Definition: forward_list:1520
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::splice_after ( const_iterator  _Where,
_Myt &&  _Right 
)
inline
1280  { // splice all of _Right at _Where
1281  splice_after(_Where, _Right);
1282  }
void splice_after(const_iterator _Where, _Myt &_Right)
Definition: forward_list:1270
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::splice_after ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First 
)
inline
1286  { // splice _Right (_First, _First + 2) after _Where
1287  const_iterator _After = _First;
1288  if (_First == _Right.end() || ++_After == _Right.end())
1289  {
1290  #if _ITERATOR_DEBUG_LEVEL == 2
1291  _DEBUG_ERROR("forward_list splice_after iterator outside range");
1292  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1293  }
1294  else
1295  { // element exists, try splice
1296  if (this != _STD addressof(_Right)
1297  || (_Where != _First && _Where != _After))
1298  _Splice_after(_Where, _Right, _First, ++_After);
1299  }
1300  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Splice_after(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
Definition: forward_list:1520
_Mybase::const_iterator const_iterator
Definition: forward_list:757
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::splice_after ( const_iterator  _Where,
_Myt &&  _Right,
const_iterator  _First 
)
inline
1304  { // splice _Right [_First, _First + 1) at _Where
1305  splice_after(_Where, _Right, _First);
1306  }
void splice_after(const_iterator _Where, _Myt &_Right)
Definition: forward_list:1270
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::splice_after ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First,
const_iterator  _Last 
)
inline
1310  { // splice _Right [_First, _Last) at _Where
1311  const_iterator _After = _First;
1312  if (_First == _Right.end())
1313  {
1314  #if _ITERATOR_DEBUG_LEVEL == 2
1315  _DEBUG_ERROR("forward_list splice_after iterator outside range");
1316  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1317  }
1318  else if (++_After != _Last && (this != _STD addressof(_Right) || _Where != _First))
1319  _Splice_after(_Where, _Right, _First, _Last);
1320  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Splice_after(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
Definition: forward_list:1520
_Mybase::const_iterator const_iterator
Definition: forward_list:757
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::splice_after ( const_iterator  _Where,
_Myt &&  _Right,
const_iterator  _First,
const_iterator  _Last 
)
inline
1324  { // splice _Right [_First, _Last) at _Where
1325  splice_after(_Where, _Right, _First, _Last);
1326  }
void splice_after(const_iterator _Where, _Myt &_Right)
Definition: forward_list:1270
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::swap ( _Myt _Right)
inline
1261  { // exchange contents with _Right
1262  if (this != _STD addressof(_Right))
1263  { // (maybe) swap allocators, swap control information
1264  _Pocs(this->_Getal(), _Right._Getal());
1265  this->_Swap_all(_Right);
1266  _Swap_adl(this->_Myhead(), _Right._Myhead());
1267  }
1268  }
_Alty & _Getal() _NOEXCEPT
Definition: forward_list:628
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: forward_list:648
void _Swap_all(_Myt &_Right)
Definition: forward_list:623
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:73
void _Pocs(_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1169
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void forward_list< _Ty, _Alloc >::unique ( )
inline
1375  { // erase each element matching previous
1376  unique(equal_to<>());
1377  }
Definition: xstddef:212
void unique()
Definition: forward_list:1374
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void forward_list< _Ty, _Alloc >::unique ( _Pr2  _Pred)
inline
1381  { // erase each element satisfying _Pred with previous
1382  iterator _First = begin();
1383  if (_First != end())
1384  { // worth doing
1385  iterator _After = _First;
1386  for (++_After; _After != end(); )
1387  if (_Pred(*_First, *_After))
1388  _After = erase_after(_First);
1389  else
1390  _First = _After++;
1391  }
1392  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: forward_list:996
iterator end() _NOEXCEPT
Definition: forward_list:1006
iterator erase_after(const_iterator _Where)
Definition: forward_list:1177

The documentation for this class was generated from the following file: