STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | List of all members
list< _Ty, _Alloc > Class Template Reference
Inheritance diagram for list< _Ty, _Alloc >:
_List_buy< _Ty, _Alloc > _List_alloc< _List_base_types< _Ty, _Alloc > >

Public Types

typedef list< _Ty, _Alloc_Myt
 
typedef _List_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
 
typedef _Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
 
typedef _Mybase::_Unchecked_iterator _Unchecked_iterator
 
typedef _STD reverse_iterator< iteratorreverse_iterator
 
typedef _STD reverse_iterator< const_iteratorconst_reverse_iterator
 
- Public Types inherited from _List_buy< _Ty, _Alloc >
typedef _List_buy< _Ty, _Alloc_Myt
 
typedef _List_alloc< _List_base_types< _Ty, _Alloc > > _Mybase
 
typedef _Mybase::_Alty _Alty
 
typedef _Mybase::_Nodeptr _Nodeptr
 
- Public Types inherited from _List_alloc< _List_base_types< _Ty, _Alloc > >
typedef _List_alloc< _List_base_types< _Ty, _Alloc > > _Myt
 
typedef _List_base_types< _Ty, _Alloc >::_Alloc _Alloc
 
typedef _List_base_types< _Ty, _Alloc >::_Alnod_type _Alty
 
typedef _List_base_types< _Ty, _Alloc >::_Node _Node
 
typedef _List_base_types< _Ty, _Alloc >::_Nodeptr _Nodeptr
 
typedef _List_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 _List_const_iterator< _List_val< _Val_types > > const_iterator
 
typedef _List_iterator< _List_val< _Val_types > > iterator
 
typedef _List_unchecked_const_iterator< _List_val< _Val_types > > _Unchecked_const_iterator
 
typedef _List_unchecked_iterator< _List_val< _Val_types > > _Unchecked_iterator
 

Public Member Functions

 list ()
 
 list (const _Alloc &_Al)
 
 list (_CRT_GUARDOVERFLOW size_type _Count, const _Alloc &_Al=_Alloc())
 
 list (_CRT_GUARDOVERFLOW size_type _Count, const _Ty &_Val)
 
 list (_CRT_GUARDOVERFLOW size_type _Count, const _Ty &_Val, const _Alloc &_Al)
 
 list (const _Myt &_Right)
 
 list (const _Myt &_Right, const _Alloc &_Al)
 
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
 list (_Iter _First, _Iter _Last)
 
template<class _Iter , class = typename enable_if<_Is_iterator<_Iter>::value, void>::type>
 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)
 
 list (_Myt &&_Right)
 
 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)
 
void push_back (_Ty &&_Val)
 
iterator insert (const_iterator _Where, _Ty &&_Val)
 
template<class... _Valty>
void emplace_front (_Valty &&..._Val)
 
template<class... _Valty>
void emplace_back (_Valty &&..._Val)
 
template<class... _Valty>
iterator emplace (const_iterator _Where, _Valty &&..._Val)
 
template<class... _Valty>
void _Insert (_Unchecked_const_iterator _Where, _Valty &&..._Val)
 
 list (initializer_list< _Ty > _Ilist, const _Alloc &_Al=allocator_type())
 
_Mytoperator= (initializer_list< _Ty > _Ilist)
 
void assign (initializer_list< _Ty > _Ilist)
 
iterator insert (const_iterator _Where, initializer_list< _Ty > _Ilist)
 
 ~list () _NOEXCEPT
 
_Mytoperator= (const _Myt &_Right)
 
iterator begin () _NOEXCEPT
 
const_iterator begin () const _NOEXCEPT
 
iterator end () _NOEXCEPT
 
const_iterator end () const _NOEXCEPT
 
_Unchecked_iterator _Unchecked_begin ()
 
_Unchecked_const_iterator _Unchecked_begin () const
 
_Unchecked_iterator _Unchecked_end ()
 
_Unchecked_const_iterator _Unchecked_end () const
 
iterator _Make_iter (const_iterator _Where) const _NOEXCEPT
 
iterator _Make_iter (_Unchecked_const_iterator _Where) const
 
reverse_iterator rbegin () _NOEXCEPT
 
const_reverse_iterator rbegin () const _NOEXCEPT
 
reverse_iterator rend () _NOEXCEPT
 
const_reverse_iterator rend () const _NOEXCEPT
 
const_iterator cbegin () const _NOEXCEPT
 
const_iterator cend () const _NOEXCEPT
 
const_reverse_iterator crbegin () const _NOEXCEPT
 
const_reverse_iterator crend () const _NOEXCEPT
 
void resize (_CRT_GUARDOVERFLOW size_type _Newsize)
 
void resize (_CRT_GUARDOVERFLOW size_type _Newsize, const _Ty &_Val)
 
size_type size () const _NOEXCEPT
 
size_type max_size () const _NOEXCEPT
 
bool empty () const _NOEXCEPT
 
allocator_type get_allocator () const _NOEXCEPT
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
void push_front (const _Ty &_Val)
 
void pop_front ()
 
void push_back (const _Ty &_Val)
 
void pop_back ()
 
template<class _Iter >
enable_if< _Is_iterator< _Iter >::value, void >::type assign (_Iter _First, _Iter _Last)
 
template<class _TArg >
void _Reusenode (iterator _Where, _TArg &&_Arg)
 
void assign (_CRT_GUARDOVERFLOW size_type _Count, const _Ty &_Val)
 
iterator insert (const_iterator _Where, const _Ty &_Val)
 
iterator insert (const_iterator _Where, _CRT_GUARDOVERFLOW size_type _Count, const _Ty &_Val)
 
template<class _Iter >
enable_if< _Is_iterator< _Iter >::value, iterator >::type insert (const_iterator _Where, _Iter _First, _Iter _Last)
 
template<class _Iter >
void _Insert_range (_Unchecked_const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
 
template<class _Iter >
void _Insert_range (_Unchecked_const_iterator _Where, _Iter _First, _Iter _Last, forward_iterator_tag)
 
_Nodeptr _Unlinknode (const_iterator _Where)
 
iterator erase (const_iterator _Where)
 
void _Unchecked_erase (_Unchecked_const_iterator _Where)
 
iterator erase (const_iterator _First, const_iterator _Last)
 
void clear () _NOEXCEPT
 
void swap (_Myt &_Right) _NOEXCEPT_OP(_Alty
 
void splice (const_iterator _Where, _Myt &_Right)
 
void splice (const_iterator _Where, _Myt &&_Right)
 
void splice (const_iterator _Where, _Myt &_Right, const_iterator _First)
 
void splice (const_iterator _Where, _Myt &&_Right, const_iterator _First)
 
void splice (const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last)
 
void splice (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 >
iterator _Sort (iterator _First, iterator _Last, _Pr2 &_Pred, size_type _Size)
 
void reverse () _NOEXCEPT
 
void _Splice (const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
 
void _Splice_same (const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
 
void _Unchecked_splice (_Unchecked_const_iterator _Where, _Unchecked_const_iterator _First, _Unchecked_const_iterator _Last)
 
void _Tidy ()
 
void _Insert_n (_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
 
void _Incsize (size_type _Count)
 
- Public Member Functions inherited from _List_buy< _Ty, _Alloc >
 _List_buy ()
 
template<class _Any_alloc , class = enable_if_t<!is_same<decay_t<_Any_alloc>, _Myt>::value>>
 _List_buy (_Any_alloc &&_Al)
 
template<class... _Valty>
_Nodeptr _Buynode (_Nodeptr _Next, _Nodeptr _Prev, _Valty &&..._Val)
 
void _Freenode (_Nodeptr _Pnode)
 
- Public Member Functions inherited from _List_alloc< _List_base_types< _Ty, _Alloc > >
 _List_alloc ()
 
 _List_alloc (_Any_alloc &&_Al)
 
 ~_List_alloc () _NOEXCEPT
 
void _Alloc_proxy ()
 
void _Free_proxy ()
 
void _Copy_alloc (const _Alty &_Al)
 
void _Move_alloc (_Alty &_Al)
 
_Nodeptr _Buyheadnode ()
 
void _Freeheadnode (_Nodeptr _Pnode)
 
_Nodeptr _Buynode0 (_Nodeptr _Next, _Nodeptr _Prev)
 
void _Orphan_all ()
 
void _Swap_all (_Myt &_Right)
 
_Alty_Getal () _NOEXCEPT
 
const _Alty_Getal () const _NOEXCEPT
 
_List_val< _Val_types > & _Get_data () _NOEXCEPT
 
const _List_val< _Val_types > & _Get_data () const _NOEXCEPT
 
_Nodeptr_Myhead () _NOEXCEPT
 
const _Nodeptr_Myhead () const _NOEXCEPT
 
size_type_Mysize () _NOEXCEPT
 
const size_type_Mysize () const _NOEXCEPT
 

Additional Inherited Members

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

Member Typedef Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::_Alty list< _Ty, _Alloc >::_Alty
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _List_buy<_Ty, _Alloc> list< _Ty, _Alloc >::_Mybase
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef list<_Ty, _Alloc> list< _Ty, _Alloc >::_Myt
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::_Node list< _Ty, _Alloc >::_Node
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::_Nodeptr list< _Ty, _Alloc >::_Nodeptr
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::_Unchecked_const_iterator list< _Ty, _Alloc >::_Unchecked_const_iterator
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::_Unchecked_iterator list< _Ty, _Alloc >::_Unchecked_iterator
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Alloc list< _Ty, _Alloc >::allocator_type
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::const_iterator list< _Ty, _Alloc >::const_iterator
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::const_pointer list< _Ty, _Alloc >::const_pointer
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::const_reference list< _Ty, _Alloc >::const_reference
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _STD reverse_iterator<const_iterator> list< _Ty, _Alloc >::const_reverse_iterator
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::difference_type list< _Ty, _Alloc >::difference_type
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::iterator list< _Ty, _Alloc >::iterator
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::pointer list< _Ty, _Alloc >::pointer
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::reference list< _Ty, _Alloc >::reference
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _STD reverse_iterator<iterator> list< _Ty, _Alloc >::reverse_iterator
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::size_type list< _Ty, _Alloc >::size_type
template<class _Ty, class _Alloc = allocator<_Ty>>
typedef _Mybase::value_type list< _Ty, _Alloc >::value_type

Constructor & Destructor Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( )
inline
908  : _Mybase()
909  { // construct empty list
910  }
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( const _Alloc _Al)
inlineexplicit
913  : _Mybase(_Al)
914  { // construct empty list, allocator
915  }
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Alloc _Al = _Alloc() 
)
inlineexplicit
918  : _Mybase(_Al)
919  { // construct list from _Count * _Ty(), optional allocator
920  resize(_Count);
921  }
void resize(_CRT_GUARDOVERFLOW size_type _Newsize)
Definition: list:1237
_Diff _Count
Definition: algorithm:1941
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Ty &  _Val 
)
inline
924  : _Mybase()
925  { // construct list from _Count * _Val
927  }
void _Construct_n(size_type _Count, const _Ty &_Val)
Definition: list:986
_Diff _Count
Definition: algorithm:1941
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Ty &  _Val,
const _Alloc _Al 
)
inline
930  : _Mybase(_Al)
931  { // construct list from _Count * _Val, allocator
933  }
void _Construct_n(size_type _Count, const _Ty &_Val)
Definition: list:986
_Diff _Count
Definition: algorithm:1941
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( const _Myt _Right)
inline
936  : _Mybase(_Right._Getal().select_on_container_copy_construction())
937  { // construct list by copying _Right
938  _TRY_BEGIN
939  insert(begin(), _Right.begin(), _Right.end());
940  _CATCH_ALL
941  _Tidy();
942  _RERAISE;
943  _CATCH_END
944  }
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
iterator begin() _NOEXCEPT
Definition: list:1142
void _Tidy()
Definition: list:1925
#define _CATCH_ALL
Definition: xstddef:28
#define _RERAISE
Definition: xstddef:32
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1048
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( const _Myt _Right,
const _Alloc _Al 
)
inline
947  : _Mybase(_Al)
948  { // construct list by copying _Right, allocator
949  _TRY_BEGIN
950  insert(begin(), _Right.begin(), _Right.end());
951  _CATCH_ALL
952  _Tidy();
953  _RERAISE;
954  _CATCH_END
955  }
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
iterator begin() _NOEXCEPT
Definition: list:1142
void _Tidy()
Definition: list:1925
#define _CATCH_ALL
Definition: xstddef:28
#define _RERAISE
Definition: xstddef:32
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1048
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>
list< _Ty, _Alloc >::list ( _Iter  _First,
_Iter  _Last 
)
inline
961  : _Mybase()
962  { // construct list from [_First, _Last)
963  _Construct(_First, _Last);
964  }
void _Construct(_Iter _First, _Iter _Last)
Definition: list:976
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
_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>
list< _Ty, _Alloc >::list ( _Iter  _First,
_Iter  _Last,
const _Alloc _Al 
)
inline
970  : _Mybase(_Al)
971  { // construct list, allocator from [_First, _Last)
972  _Construct(_First, _Last);
973  }
void _Construct(_Iter _First, _Iter _Last)
Definition: list:976
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( _Myt &&  _Right)
inline
998  : _Mybase(_STD move(_Right._Getal()))
999  { // construct list by moving _Right
1001  }
void _Assign_rv(_Myt &&_Right, true_type)
Definition: list:1022
integral_constant< bool, true > true_type
Definition: xtr1common:41
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( _Myt &&  _Right,
const _Alloc _Al 
)
inline
1004  : _Mybase(_Al)
1005  { // construct list by moving _Right, allocator
1007  }
void _Assign_rv(_Myt &&_Right, true_type)
Definition: list:1022
integral_constant< bool, false > false_type
Definition: xtr1common:42
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( initializer_list< _Ty >  _Ilist,
const _Alloc _Al = allocator_type() 
)
inline
1095  : _Mybase(_Al)
1096  { // construct from initializer_list
1097  insert(begin(), _Ilist.begin(), _Ilist.end());
1098  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
iterator begin() _NOEXCEPT
Definition: list:1142
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:883
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1048
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::~list ( )
inline
1118  { // destroy the object
1119  _Tidy();
1120  }
void _Tidy()
Definition: list:1925

Member Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Assign_rv ( _Myt &&  _Right,
true_type   
)
inline
1023  { // swap with empty *this, same allocator
1024  this->_Swap_all(_Right);
1025  _Swap_adl(this->_Myhead(), _Right._Myhead());
1026  _STD swap(this->_Mysize(), _Right._Mysize());
1027  }
size_type & _Mysize() _NOEXCEPT
Definition: list:806
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:73
void swap(_Myt &_Right) _NOEXCEPT_OP(_Alty
Definition: list:1551
constexpr const _Ty &() _Right
Definition: algorithm:3723
void _Swap_all(_Myt &_Right)
Definition: list:771
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Assign_rv ( _Myt &&  _Right,
false_type   
)
inline
1030  { // move from _Right, possibly moving its contents
1031  if (this->_Getal() == _Right._Getal())
1033  else
1035  _STD make_move_iterator(_Right.end()));
1036  }
void _Assign_rv(_Myt &&_Right, true_type)
Definition: list:1022
_Alty & _Getal() _NOEXCEPT
Definition: list:776
void _Construct(_Iter _First, _Iter _Last)
Definition: list:976
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>>
template<class _Iter >
void list< _Ty, _Alloc >::_Construct ( _Iter  _First,
_Iter  _Last 
)
inline
977  { // construct list from [_First, _Last), input iterators
978  _TRY_BEGIN
979  insert(begin(), _First, _Last);
980  _CATCH_ALL
981  _Tidy();
982  _RERAISE;
983  _CATCH_END
984  }
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
iterator begin() _NOEXCEPT
Definition: list:1142
void _Tidy()
Definition: list:1925
#define _CATCH_ALL
Definition: xstddef:28
#define _RERAISE
Definition: xstddef:32
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1048
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Construct_n ( size_type  _Count,
const _Ty &  _Val 
)
inline
988  { // construct from _Count * _Val
989  _TRY_BEGIN
991  _CATCH_ALL
992  _Tidy();
993  _RERAISE;
994  _CATCH_END
995  }
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
_Unchecked_iterator _Unchecked_begin()
Definition: list:1164
void _Tidy()
Definition: list:1925
#define _CATCH_ALL
Definition: xstddef:28
_Diff _Count
Definition: algorithm:1941
void _Insert_n(_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: list:1930
#define _RERAISE
Definition: xstddef:32
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Incsize ( size_type  _Count)
inline
1949  { // alter element count, with checking
1950  if (max_size() - this->_Mysize() - 1 < _Count)
1951  _Xlength_error("list<T> too long");
1952  this->_Mysize() += _Count;
1953  }
size_type & _Mysize() _NOEXCEPT
Definition: list:806
size_type max_size() const _NOEXCEPT
Definition: list:1270
_Diff _Count
Definition: algorithm:1941
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xlength_error(_In_z_ const char *)
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
void list< _Ty, _Alloc >::_Insert ( _Unchecked_const_iterator  _Where,
_Valty &&...  _Val 
)
inline
1082  { // insert element at _Where
1083  _Nodeptr _Pnode = _Where._Mynode();
1084  _Nodeptr _Newnode =
1085  this->_Buynode(_Pnode, this->_Prevnode(_Pnode),
1086  _STD forward<_Valty>(_Val)...);
1087  _Incsize(1);
1088  this->_Prevnode(_Pnode) = _Newnode;
1089  this->_Nextnode(this->_Prevnode(_Newnode)) = _Newnode;
1090  }
void _Incsize(size_type _Count)
Definition: list:1948
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
_Nodeptr _Buynode(_Nodeptr _Next, _Nodeptr _Prev, _Valty &&..._Val)
Definition: list:845
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Insert_n ( _Unchecked_const_iterator  _Where,
size_type  _Count,
const _Ty &  _Val 
)
inline
1932  { // insert _Count * _Val at _Where
1933  size_type _Countsave = _Count;
1934 
1935  _TRY_BEGIN
1936  for (; 0 < _Count; --_Count)
1937  _Insert(_Where, _Val);
1938  _CATCH_ALL
1939  for (; _Count < _Countsave; ++_Count)
1940  { // undo inserts
1941  _Unchecked_const_iterator _Before = _Where;
1942  _Unchecked_erase(--_Before);
1943  }
1944  _RERAISE;
1945  _CATCH_END
1946  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:900
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
_Mybase::size_type size_type
Definition: list:889
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
#define _CATCH_ALL
Definition: xstddef:28
void _Unchecked_erase(_Unchecked_const_iterator _Where)
Definition: list:1506
_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 >
void list< _Ty, _Alloc >::_Insert_range ( _Unchecked_const_iterator  _Where,
_Iter  _First,
_Iter  _Last,
input_iterator_tag   
)
inline
1438  { // insert [_First, _Last) at _Where, input iterators
1439  size_type _Num = 0;
1440 
1441  _TRY_BEGIN
1442  for (; _First != _Last; ++_First, (void)++_Num)
1443  _Insert(_Where, *_First);
1444  _CATCH_ALL
1445  for (; 0 < _Num; --_Num)
1446  { // undo inserts
1447  _Unchecked_const_iterator _Before = _Where;
1448  _Unchecked_erase(--_Before);
1449  }
1450  _RERAISE;
1451  _CATCH_END
1452  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:900
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
_Mybase::size_type size_type
Definition: list:889
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
#define _CATCH_ALL
Definition: xstddef:28
void _Unchecked_erase(_Unchecked_const_iterator _Where)
Definition: list:1506
#define _RERAISE
Definition: xstddef:32
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
void list< _Ty, _Alloc >::_Insert_range ( _Unchecked_const_iterator  _Where,
_Iter  _First,
_Iter  _Last,
forward_iterator_tag   
)
inline
1457  { // insert [_First, _Last) at _Where, forward iterators
1458  _DEBUG_RANGE(_First, _Last);
1459  _Iter _Next = _First;
1460 
1461  _TRY_BEGIN
1462  for (; _First != _Last; ++_First)
1463  _Insert(_Where, *_First);
1464  _CATCH_ALL
1465  for (; _Next != _First; ++_Next)
1466  { // undo inserts
1467  _Unchecked_const_iterator _Before = _Where;
1468  _Unchecked_erase(--_Before);
1469  }
1470  _RERAISE;
1471  _CATCH_END
1472  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:900
#define _DEBUG_RANGE(first, last)
Definition: xutility:902
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
#define _CATCH_ALL
Definition: xstddef:28
void _Unchecked_erase(_Unchecked_const_iterator _Where)
Definition: list:1506
#define _RERAISE
Definition: xstddef:32
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::_Make_iter ( const_iterator  _Where) const
inline
1188  { // make iterator from const_iterator
1189  return (iterator(_Where._Ptr, _STD addressof(this->_Get_data())));
1190  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::iterator iterator
Definition: list:898
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::_Make_iter ( _Unchecked_const_iterator  _Where) const
inline
1193  { // make iterator from _Unchecked_const_iterator
1194  return (iterator(_Where._Ptr, _STD addressof(this->_Get_data())));
1195  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::iterator iterator
Definition: list:898
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::_Merge1 ( _Myt _Right,
_Pr2 &&  _Pred 
)
inline
1723  { // merge in elements from _Right, both ordered by _Pred
1724  if (this != _STD addressof(_Right))
1725  { // safe to merge, do it
1726  iterator _First1 = begin(), _Last1 = end();
1727  iterator _First2 = _Right.begin(), _Last2 = _Right.end();
1728  _DEBUG_ORDER_PRED(_First1, _Last1, _Pred);
1729  _DEBUG_ORDER_PRED(_First2, _Last2, _Pred);
1730 
1731  while (_First1 != _Last1 && _First2 != _Last2)
1732  if (_DEBUG_LT_PRED(_Pred, *_First2, *_First1))
1733  { // splice in an element from _Right
1734  iterator _Mid2 = _First2;
1735  _Splice(_First1, _Right, _First2, ++_Mid2, 1);
1736  _First2 = _Mid2;
1737  }
1738  else
1739  ++_First1;
1740 
1741  if (_First2 != _Last2)
1742  _Splice(_Last1, _Right, _First2, _Last2,
1743  _Right._Mysize()); // splice remainder of _Right
1744  }
1745  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
#define _DEBUG_LT_PRED(pred, x, y)
Definition: xutility:900
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: list:1142
iterator end() _NOEXCEPT
Definition: list:1154
#define _DEBUG_ORDER_PRED(first, last, pred)
Definition: xutility:901
void _Splice(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1807
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr1 >
void list< _Ty, _Alloc >::_Remove_if ( _Pr1 &  _Pred)
inline
1660  { // erase each element satisfying _Pred
1661  for (iterator _First = begin(); _First != end(); )
1662  if (_Pred(*_First))
1663  _First = erase(_First);
1664  else
1665  ++_First;
1666  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: list:1142
iterator end() _NOEXCEPT
Definition: list:1154
iterator erase(const_iterator _Where)
Definition: list:1499
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _TArg >
void list< _Ty, _Alloc >::_Reusenode ( iterator  _Where,
_TArg &&  _Arg 
)
inline
1346  { // destroy the element at _Where and reconstruct from _Arg
1347  _TRY_BEGIN
1348  this->_Getal().destroy(
1349  _STD addressof(this->_Myval(_Where._Ptr)));
1350  this->_Getal().construct(
1351  _STD addressof(this->_Myval(_Where._Ptr)),
1352  _STD forward<_TArg>(_Arg));
1353  _CATCH_ALL
1354  _Unlinknode(_Where);
1355  this->_Getal().destroy(
1356  _STD addressof(this->_Nextnode(_Where._Ptr)));
1357  this->_Getal().destroy(
1358  _STD addressof(this->_Prevnode(_Where._Ptr)));
1359  this->_Getal().deallocate(_Where._Ptr, 1);
1360  _RERAISE;
1361  _CATCH_END
1362  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
#define _TRY_BEGIN
Definition: xstddef:26
_Nodeptr _Unlinknode(const_iterator _Where)
Definition: list:1474
#define _CATCH_END
Definition: xstddef:29
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
#define _CATCH_ALL
Definition: xstddef:28
_Alty & _Getal() _NOEXCEPT
Definition: list:776
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
#define _RERAISE
Definition: xstddef:32
static reference _Myval(_Nodeptr _Pnode)
Definition: list:588
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
iterator list< _Ty, _Alloc >::_Sort ( iterator  _First,
iterator  _Last,
_Pr2 &  _Pred,
size_type  _Size 
)
inline
1761  { // order [_First, _Last), using _Pred, return new first
1762  // _Size must be distance from _First to _Last
1763  if (_Size < 2)
1764  return (_First); // nothing to do
1765 
1766  iterator _Mid = _STD next(_First, _Size / 2);
1767  _First = _Sort(_First, _Mid, _Pred, _Size / 2);
1768  _Mid = _Sort(_Mid, _Last, _Pred, _Size - _Size / 2);
1769  iterator _Newfirst = _First;
1770 
1771  for (bool _Initial_loop = true; ; _Initial_loop = false)
1772  { // [_First, _Mid) and [_Mid, _Last) are sorted and non-empty
1773  if (_DEBUG_LT_PRED(_Pred, *_Mid, *_First))
1774  { // consume _Mid
1775  if (_Initial_loop)
1776  _Newfirst = _Mid; // update return value
1777  splice(_First, *this, _Mid++);
1778  if (_Mid == _Last)
1779  return (_Newfirst); // exhausted [_Mid, _Last); done
1780  }
1781  else
1782  { // consume _First
1783  ++_First;
1784  if (_First == _Mid)
1785  return (_Newfirst); // exhausted [_First, _Mid); done
1786  }
1787  }
1788  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
#define _DEBUG_LT_PRED(pred, x, y)
Definition: xutility:900
Definition: xutility:565
_CRT_BEGIN_C_HEADER _Check_return_ _Ret_maybenull_ _In_ size_t _Size
Definition: corecrt_malloc.h:58
iterator _Sort(iterator _First, iterator _Last, _Pr2 &_Pred, size_type _Size)
Definition: list:1759
void splice(const_iterator _Where, _Myt &_Right)
Definition: list:1563
_InIt next(_InIt _First, _Iter_diff_t< _InIt > _Off=1)
Definition: xutility:1118
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Splice ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First,
const_iterator  _Last,
size_type  _Count 
)
inline
1810  { // splice _Right [_First, _Last) before _Where
1811  #if _ITERATOR_DEBUG_LEVEL == 2
1812  if (_Where._Getcont() != _STD addressof(this->_Get_data()))
1813  {
1814  _DEBUG_ERROR("list splice iterator outside range");
1815  }
1816 
1817  if (this->_Getal() != _Right._Getal())
1818  {
1819  _DEBUG_ERROR("list containers incompatible for splice");
1820  }
1821 
1822  if (this != _STD addressof(_Right))
1823  { // transfer ownership
1824  _Lockit _Lock(_LOCK_DEBUG);
1825 
1826  const bool _One = _Count == 1;
1827  const bool _All = !_One && _Count == _Right.size();
1828  const bool _Some = !_One && !_All;
1829 
1830  _Nodeptr _Oldprev = this->_Prevnode(_First._Ptr);
1831 
1832  if (_Some)
1833  for (_Nodeptr _Ptr = _First._Ptr; _Ptr != _Last._Ptr;
1834  _Ptr = this->_Nextnode(_Ptr))
1835  { // mark _Prev pointers
1836  this->_Prevnode(_Ptr) = nullptr_t{};
1837  }
1838 
1839  const_iterator **_Pnext = (const_iterator **)_Right._Getpfirst();
1840 
1841  if (_Pnext == 0)
1842  {
1843  _DEBUG_ERROR("list container corrupted");
1844  }
1845 
1846  while (*_Pnext != 0)
1847  { // check the iterator
1848  const_iterator& _Iter = **_Pnext;
1849 
1850  if ((_One && _Iter._Ptr == _First._Ptr)
1851  || (_All && _Iter._Ptr != _Right._Myhead())
1852  || (_Some && this->_Prevnode(_Iter._Ptr) == nullptr_t{}))
1853  { // adopt the iterator
1854  *_Pnext = (const_iterator *)_Iter._Mynextiter;
1855  _Iter._Myproxy = this->_Myproxy();
1856  _Iter._Mynextiter = this->_Myproxy()->_Myfirstiter;
1857  this->_Myproxy()->_Myfirstiter = _STD addressof(_Iter);
1858  }
1859  else
1860  { // skip the iterator
1861  _Pnext = (const_iterator **)_Iter._Getpnext();
1862  }
1863  }
1864 
1865  if (_Some)
1866  for (_Nodeptr _Ptr = _First._Ptr; _Ptr != _Last._Ptr;
1867  _Ptr = this->_Nextnode(_Ptr))
1868  { // restore _Prev pointers
1869  this->_Prevnode(_Ptr) = _Oldprev;
1870  _Oldprev = _Ptr;
1871  }
1872  }
1873 
1874  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
1875  if (this->_Getal() != _Right._Getal())
1876  _STD terminate();
1877  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1878 
1879  _Splice_same(_Where, _Right, _First, _Last, _Count);
1880  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Splice_same(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1882
_Mybase::const_iterator const_iterator
Definition: list:897
void __CRTDECL terminate() _NOEXCEPT
Definition: exception:208
#define _LOCK_DEBUG
Definition: yvals.h:594
return * this
Definition: variant:950
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
_Alty & _Getal() _NOEXCEPT
Definition: list:776
_Diff _Count
Definition: algorithm:1941
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Splice_same ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First,
const_iterator  _Last,
size_type  _Count 
)
inline
1885  { // splice _Right [_First, _Last) before _Where
1886  if (this != _STD addressof(_Right))
1887  { // splicing from another list, adjust counts
1888  _Incsize(_Count);
1889  _Right._Mysize() -= _Count;
1890  }
1891  this->_Nextnode(this->_Prevnode(_First._Mynode())) =
1892  _Last._Mynode();
1893  this->_Nextnode(this->_Prevnode(_Last._Mynode())) =
1894  _Where._Mynode();
1895  this->_Nextnode(this->_Prevnode(_Where._Mynode())) =
1896  _First._Mynode();
1897 
1898  _Nodeptr _Pnode = this->_Prevnode(_Where._Mynode());
1899  this->_Prevnode(_Where._Mynode()) =
1900  this->_Prevnode(_Last._Mynode());
1901  this->_Prevnode(_Last._Mynode()) =
1902  this->_Prevnode(_First._Mynode());
1903  this->_Prevnode(_First._Mynode()) = _Pnode;
1904  }
void _Incsize(size_type _Count)
Definition: list:1948
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
_Diff _Count
Definition: algorithm:1941
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Tidy ( )
inline
1926  { // free all storage
1927  clear();
1928  }
void clear() _NOEXCEPT
Definition: list:1533
template<class _Ty, class _Alloc = allocator<_Ty>>
_Unchecked_iterator list< _Ty, _Alloc >::_Unchecked_begin ( )
inline
1165  { // return iterator for beginning of mutable sequence
1166  return (_Unchecked_iterator(this->_Nextnode(this->_Myhead()),
1167  _STD addressof(this->_Get_data())));
1168  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_Mybase::_Unchecked_iterator _Unchecked_iterator
Definition: list:902
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Ty, class _Alloc = allocator<_Ty>>
_Unchecked_const_iterator list< _Ty, _Alloc >::_Unchecked_begin ( ) const
inline
1171  { // return iterator for beginning of nonmutable sequence
1172  return (_Unchecked_const_iterator(this->_Nextnode(this->_Myhead()),
1173  _STD addressof(this->_Get_data())));
1174  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:900
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Ty, class _Alloc = allocator<_Ty>>
_Unchecked_iterator list< _Ty, _Alloc >::_Unchecked_end ( )
inline
1177  { // return unchecked iterator for end of mutable sequence
1178  return (_Unchecked_iterator(this->_Myhead(), _STD addressof(this->_Get_data())));
1179  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_Mybase::_Unchecked_iterator _Unchecked_iterator
Definition: list:902
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Ty, class _Alloc = allocator<_Ty>>
_Unchecked_const_iterator list< _Ty, _Alloc >::_Unchecked_end ( ) const
inline
1182  { // return unchecked iterator for end of nonmutable sequence
1183  return (_Unchecked_const_iterator(this->_Myhead(),
1184  _STD addressof(this->_Get_data())));
1185  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:900
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Unchecked_erase ( _Unchecked_const_iterator  _Where)
inline
1507  { // erase element at _Where
1508  _Nodeptr _Pnode = _Where._Mynode();
1509 
1510  this->_Nextnode(this->_Prevnode(_Pnode)) =
1511  this->_Nextnode(_Pnode);
1512  this->_Prevnode(this->_Nextnode(_Pnode)) =
1513  this->_Prevnode(_Pnode);
1514  this->_Freenode(_Pnode);
1515  --this->_Mysize();
1516  }
size_type & _Mysize() _NOEXCEPT
Definition: list:806
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
void _Freenode(_Nodeptr _Pnode)
Definition: list:863
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Unchecked_splice ( _Unchecked_const_iterator  _Where,
_Unchecked_const_iterator  _First,
_Unchecked_const_iterator  _Last 
)
inline
1909  { // splice [_First, _Last) before _Where
1910  this->_Nextnode(this->_Prevnode(_First._Mynode())) =
1911  _Last._Mynode();
1912  this->_Nextnode(this->_Prevnode(_Last._Mynode())) =
1913  _Where._Mynode();
1914  this->_Nextnode(this->_Prevnode(_Where._Mynode())) =
1915  _First._Mynode();
1916 
1917  _Nodeptr _Pnode = this->_Prevnode(_Where._Mynode());
1918  this->_Prevnode(_Where._Mynode()) =
1919  this->_Prevnode(_Last._Mynode());
1920  this->_Prevnode(_Last._Mynode()) =
1921  this->_Prevnode(_First._Mynode());
1922  this->_Prevnode(_First._Mynode()) = _Pnode;
1923  }
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
_Nodeptr list< _Ty, _Alloc >::_Unlinknode ( const_iterator  _Where)
inline
1475  { // unlink node at _Where from the list
1476  #if _ITERATOR_DEBUG_LEVEL == 2
1477  if (_Where._Getcont() != _STD addressof(this->_Get_data())
1478  || _Where._Ptr == this->_Myhead())
1479  {
1480  _DEBUG_ERROR("list erase iterator outside range");
1481  }
1482 
1483  _Nodeptr _Pnode = (_Where)._Mynode();
1484  _Orphan_ptr(_Pnode);
1485 
1486  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
1487  _Nodeptr _Pnode = (_Where)._Mynode();
1488  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1489 
1490  this->_Nextnode(this->_Prevnode(_Pnode)) =
1491  this->_Nextnode(_Pnode);
1492  this->_Prevnode(this->_Nextnode(_Pnode)) =
1493  this->_Prevnode(_Pnode);
1494 
1495  --this->_Mysize();
1496  return (_Pnode);
1497  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
size_type & _Mysize() _NOEXCEPT
Definition: list:806
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::assign ( initializer_list< _Ty >  _Ilist)
inline
1107  { // assign initializer_list
1108  assign(_Ilist.begin(), _Ilist.end());
1109  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
void assign(initializer_list< _Ty > _Ilist)
Definition: list:1106
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
enable_if<_Is_iterator<_Iter>::value, void>::type list< _Ty, _Alloc >::assign ( _Iter  _First,
_Iter  _Last 
)
inline
1330  { // assign [_First, _Last), input iterators
1331  iterator _Old = begin();
1332  _TRY_BEGIN
1333  for (; _First != _Last && _Old != end(); ++_First, (void)++_Old)
1334  _Reusenode(_Old, *_First);
1335  for (; _First != _Last; ++_First)
1336  _Insert(_Unchecked_end(), *_First);
1337  _CATCH_ALL
1338  clear();
1339  _RERAISE;
1340  _CATCH_END
1341  erase(_Old, end());
1342  }
void clear() _NOEXCEPT
Definition: list:1533
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
Definition: xutility:565
_Unchecked_iterator _Unchecked_end()
Definition: list:1176
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
iterator begin() _NOEXCEPT
Definition: list:1142
iterator end() _NOEXCEPT
Definition: list:1154
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
void _Reusenode(iterator _Where, _TArg &&_Arg)
Definition: list:1345
#define _CATCH_ALL
Definition: xstddef:28
iterator erase(const_iterator _Where)
Definition: list:1499
#define _RERAISE
Definition: xstddef:32
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::assign ( _CRT_GUARDOVERFLOW size_type  _Count,
const _Ty &  _Val 
)
inline
1365  { // assign _Count * _Val
1366  clear();
1368  }
void clear() _NOEXCEPT
Definition: list:1533
_Unchecked_iterator _Unchecked_begin()
Definition: list:1164
_Diff _Count
Definition: algorithm:1941
void _Insert_n(_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: list:1930
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
reference list< _Ty, _Alloc >::back ( )
inline
1297  { // return last element of mutable sequence
1298  return (*(--end()));
1299  }
iterator end() _NOEXCEPT
Definition: list:1154
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reference list< _Ty, _Alloc >::back ( ) const
inline
1302  { // return last element of nonmutable sequence
1303  return (*(--end()));
1304  }
iterator end() _NOEXCEPT
Definition: list:1154
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::begin ( )
inline
1143  { // return iterator for beginning of mutable sequence
1144  return (iterator(this->_Nextnode(this->_Myhead()),
1145  _STD addressof(this->_Get_data())));
1146  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::iterator iterator
Definition: list:898
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator list< _Ty, _Alloc >::begin ( ) const
inline
1149  { // return iterator for beginning of nonmutable sequence
1150  return (const_iterator(this->_Nextnode(this->_Myhead()),
1151  _STD addressof(this->_Get_data())));
1152  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_Mybase::const_iterator const_iterator
Definition: list:897
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator list< _Ty, _Alloc >::cbegin ( ) const
inline
1218  { // return iterator for beginning of nonmutable sequence
1219  return (begin());
1220  }
iterator begin() _NOEXCEPT
Definition: list:1142
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator list< _Ty, _Alloc >::cend ( ) const
inline
1223  { // return iterator for end of nonmutable sequence
1224  return (end());
1225  }
iterator end() _NOEXCEPT
Definition: list:1154
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::clear ( )
inline
1534  { // erase all
1535  #if _ITERATOR_DEBUG_LEVEL == 2
1536 
1537  this->_Orphan_ptr(nullptr);
1538  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1539  _Nodeptr _Pnode = this->_Nextnode(this->_Myhead());
1540  this->_Nextnode(this->_Myhead()) = this->_Myhead();
1541  this->_Prevnode(this->_Myhead()) = this->_Myhead();
1542  this->_Mysize() = 0;
1543 
1544  for (_Nodeptr _Pnext; _Pnode != this->_Myhead(); _Pnode = _Pnext)
1545  { // delete an element
1546  _Pnext = this->_Nextnode(_Pnode);
1547  this->_Freenode(_Pnode);
1548  }
1549  }
size_type & _Mysize() _NOEXCEPT
Definition: list:806
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
void _Freenode(_Nodeptr _Pnode)
Definition: list:863
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reverse_iterator list< _Ty, _Alloc >::crbegin ( ) const
inline
1228  { // return iterator for beginning of reversed nonmutable sequence
1229  return (rbegin());
1230  }
reverse_iterator rbegin() _NOEXCEPT
Definition: list:1197
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reverse_iterator list< _Ty, _Alloc >::crend ( ) const
inline
1233  { // return iterator for end of reversed nonmutable sequence
1234  return (rend());
1235  }
reverse_iterator rend() _NOEXCEPT
Definition: list:1207
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
iterator list< _Ty, _Alloc >::emplace ( const_iterator  _Where,
_Valty &&...  _Val 
)
inline
1067  { // insert element at _Where
1068  #if _ITERATOR_DEBUG_LEVEL == 2
1069  if (_Where._Getcont() != _STD addressof(this->_Get_data()))
1070  {
1071  _DEBUG_ERROR("list emplace iterator outside range");
1072  }
1073  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1074 
1075  _Insert(_Where._Unchecked(), _STD forward<_Valty>(_Val)...);
1076  return (_Make_iter(--_Where));
1077  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_FwdIt const _Ty _Val
Definition: algorithm:1938
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1187
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
void list< _Ty, _Alloc >::emplace_back ( _Valty &&...  _Val)
inline
1061  { // insert element at end
1062  _Insert(_Unchecked_end(), _STD forward<_Valty>(_Val)...);
1063  }
_Unchecked_iterator _Unchecked_end()
Definition: list:1176
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
void list< _Ty, _Alloc >::emplace_front ( _Valty &&...  _Val)
inline
1055  { // insert element at beginning
1056  _Insert(_Unchecked_begin(), _STD forward<_Valty>(_Val)...);
1057  }
_Unchecked_iterator _Unchecked_begin()
Definition: list:1164
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
bool list< _Ty, _Alloc >::empty ( ) const
inline
1276  { // test if sequence is empty
1277  return (this->_Mysize() == 0);
1278  }
size_type & _Mysize() _NOEXCEPT
Definition: list:806
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::end ( )
inline
1155  { // return iterator for end of mutable sequence
1156  return (iterator(this->_Myhead(), _STD addressof(this->_Get_data())));
1157  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::iterator iterator
Definition: list:898
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator list< _Ty, _Alloc >::end ( ) const
inline
1160  { // return iterator for end of nonmutable sequence
1161  return (const_iterator(this->_Myhead(), _STD addressof(this->_Get_data())));
1162  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
_Mybase::const_iterator const_iterator
Definition: list:897
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::erase ( const_iterator  _Where)
inline
1500  { // erase element at _Where
1501  _Nodeptr _Pnode = _Unlinknode(_Where++);
1502  this->_Freenode(_Pnode);
1503  return (_Make_iter(_Where));
1504  }
_Nodeptr _Unlinknode(const_iterator _Where)
Definition: list:1474
void _Freenode(_Nodeptr _Pnode)
Definition: list:863
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1187
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::erase ( const_iterator  _First,
const_iterator  _Last 
)
inline
1519  { // erase [_First, _Last)
1520  if (_First == begin() && _Last == end())
1521  { // erase all and return fresh iterator
1522  clear();
1523  return (end());
1524  }
1525  else
1526  { // erase subrange
1527  while (_First != _Last)
1528  _First = erase(_First);
1529  return (_Make_iter(_Last));
1530  }
1531  }
void clear() _NOEXCEPT
Definition: list:1533
iterator begin() _NOEXCEPT
Definition: list:1142
iterator end() _NOEXCEPT
Definition: list:1154
iterator erase(const_iterator _Where)
Definition: list:1499
_FwdIt _Last
Definition: algorithm:1936
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1187
template<class _Ty, class _Alloc = allocator<_Ty>>
reference list< _Ty, _Alloc >::front ( )
inline
1287  { // return first element of mutable sequence
1288  return (*begin());
1289  }
iterator begin() _NOEXCEPT
Definition: list:1142
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reference list< _Ty, _Alloc >::front ( ) const
inline
1292  { // return first element of nonmutable sequence
1293  return (*begin());
1294  }
iterator begin() _NOEXCEPT
Definition: list:1142
template<class _Ty, class _Alloc = allocator<_Ty>>
allocator_type list< _Ty, _Alloc >::get_allocator ( ) const
inline
1281  { // return allocator object for values
1282  allocator_type _Ret(this->_Getal());
1283  return (_Ret);
1284  }
_Alloc allocator_type
Definition: list:888
_Alty & _Getal() _NOEXCEPT
Definition: list:776
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::insert ( const_iterator  _Where,
_Ty &&  _Val 
)
inline
1049  { // insert _Val at _Where
1050  return (emplace(_Where, _STD forward<_Ty>(_Val)));
1051  }
iterator emplace(const_iterator _Where, _Valty &&..._Val)
Definition: list:1066
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::insert ( const_iterator  _Where,
initializer_list< _Ty >  _Ilist 
)
inline
1113  { // insert initializer_list
1114  return (insert(_Where, _Ilist.begin(), _Ilist.end()));
1115  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1048
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::insert ( const_iterator  _Where,
const _Ty &  _Val 
)
inline
1371  { // insert _Val at _Where
1372  #if _ITERATOR_DEBUG_LEVEL == 2
1373  if (_Where._Getcont() != _STD addressof(this->_Get_data()))
1374  {
1375  _DEBUG_ERROR("list insert iterator outside range");
1376  }
1377  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1378 
1379  _Insert(_Where._Unchecked(), _Val);
1380  return (_Make_iter(--_Where));
1381  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_FwdIt const _Ty _Val
Definition: algorithm:1938
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1187
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::insert ( const_iterator  _Where,
_CRT_GUARDOVERFLOW size_type  _Count,
const _Ty &  _Val 
)
inline
1385  { // insert _Count * _Val at _Where
1386  #if _ITERATOR_DEBUG_LEVEL == 2
1387  if (_Where._Getcont() != _STD addressof(this->_Get_data()))
1388  {
1389  _DEBUG_ERROR("list insert iterator outside range");
1390  }
1391  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1392 
1393  iterator _Prev = _Make_iter(_Where);
1394  if (_Prev == begin())
1395  { // insert sequence at beginning
1396  _Insert_n(_Where._Unchecked(), _Count, _Val);
1397  return (begin());
1398  }
1399  else
1400  { // insert sequence not at beginning
1401  --_Prev;
1402  _Insert_n(_Where._Unchecked(), _Count, _Val);
1403  return (++_Prev);
1404  }
1405  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: list:1142
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
_Diff _Count
Definition: algorithm:1941
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
void _Insert_n(_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: list:1930
_FwdIt const _Ty _Val
Definition: algorithm:1938
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1187
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
enable_if<_Is_iterator<_Iter>::value, iterator>::type list< _Ty, _Alloc >::insert ( const_iterator  _Where,
_Iter  _First,
_Iter  _Last 
)
inline
1411  { // insert [_First, _Last) at _Where
1412  #if _ITERATOR_DEBUG_LEVEL == 2
1413  if (_Where._Getcont() != _STD addressof(this->_Get_data()))
1414  {
1415  _DEBUG_ERROR("list insert iterator outside range");
1416  }
1417  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1418 
1419  iterator _Prev = _Make_iter(_Where);
1420  if (_Prev == begin())
1421  { // insert sequence at beginning
1422  _Insert_range(_Where._Unchecked(), _First, _Last,
1423  _Iter_cat_t<_Iter>());
1424  return (begin());
1425  }
1426  else
1427  { // insert sequence not at beginning
1428  --_Prev;
1429  _Insert_range(_Where._Unchecked(), _First, _Last,
1430  _Iter_cat_t<_Iter>());
1431  return (++_Prev);
1432  }
1433  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
typename iterator_traits< _Iter >::iterator_category _Iter_cat_t
Definition: xutility:657
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: list:1142
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:786
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
_FwdIt _Last
Definition: algorithm:1936
void _Insert_range(_Unchecked_const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
Definition: list:1436
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1187
template<class _Ty, class _Alloc = allocator<_Ty>>
size_type list< _Ty, _Alloc >::max_size ( ) const
inline
1271  { // return maximum possible length of sequence
1272  return (this->_Getal().max_size());
1273  }
size_type max_size() const _NOEXCEPT
Definition: list:1270
_Alty & _Getal() _NOEXCEPT
Definition: list:776
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::merge ( _Myt _Right)
inline
1700  { // merge in elements from _Right, both ordered by operator<
1701  _Merge1(_Right, less<>());
1702  }
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: list:1722
Definition: xstddef:226
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::merge ( _Myt &&  _Right)
inline
1705  { // merge in elements from _Right, both ordered by operator<
1706  _Merge1(_Right, less<>());
1707  }
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: list:1722
Definition: xstddef:226
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::merge ( _Myt _Right,
_Pr2  _Pred 
)
inline
1711  { // merge in elements from _Right, both ordered by _Pred
1712  _Merge1(_Right, _Pred);
1713  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: list:1722
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::merge ( _Myt &&  _Right,
_Pr2  _Pred 
)
inline
1717  { // merge in elements from _Right, both ordered by _Pred
1718  _Merge1(_Right, _Pred);
1719  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: list:1722
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& list< _Ty, _Alloc >::operator= ( _Myt &&  _Right)
inline
1011  { // assign by moving _Right
1012  if (this != _STD addressof(_Right))
1013  { // different, assign it
1014  clear();
1015  this->_Move_alloc(_Right._Getal());
1017  typename _Alty::propagate_on_container_move_assignment());
1018  }
1019  return (*this);
1020  }
void clear() _NOEXCEPT
Definition: list:1533
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Assign_rv(_Myt &&_Right, true_type)
Definition: list:1022
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
void _Move_alloc(_Alty &_Al)
Definition: list:710
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& list< _Ty, _Alloc >::operator= ( initializer_list< _Ty >  _Ilist)
inline
1101  { // assign initializer_list
1102  assign(_Ilist.begin(), _Ilist.end());
1103  return (*this);
1104  }
constexpr const _Elem * end() const _NOEXCEPT
Definition: initializer_list:44
void assign(initializer_list< _Ty > _Ilist)
Definition: list:1106
constexpr const _Elem * begin() const _NOEXCEPT
Definition: initializer_list:39
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& list< _Ty, _Alloc >::operator= ( const _Myt _Right)
inline
1123  { // assign _Right
1124  if (this != _STD addressof(_Right))
1125  { // different, assign it
1126 #pragma warning(push)
1127 #pragma warning(disable: 4127) // conditional expression is constant
1128  if (_Alty::propagate_on_container_copy_assignment::value
1129  && this->_Getal() != _Right._Getal())
1130  { // change allocator before copying
1131  clear();
1132  }
1133 #pragma warning(pop)
1134 
1135  this->_Copy_alloc(_Right._Getal());
1136 
1137  assign(_Right.begin(), _Right.end());
1138  }
1139  return (*this);
1140  }
void clear() _NOEXCEPT
Definition: list:1533
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void assign(initializer_list< _Ty > _Ilist)
Definition: list:1106
void _Copy_alloc(const _Alty &_Al)
Definition: list:691
_Alty & _Getal() _NOEXCEPT
Definition: list:776
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::pop_back ( )
inline
1322  { // erase element at end
1323  erase(--end());
1324  }
iterator end() _NOEXCEPT
Definition: list:1154
iterator erase(const_iterator _Where)
Definition: list:1499
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::pop_front ( )
inline
1312  { // erase element at beginning
1313  erase(begin());
1314  }
iterator begin() _NOEXCEPT
Definition: list:1142
iterator erase(const_iterator _Where)
Definition: list:1499
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::push_back ( _Ty &&  _Val)
inline
1044  { // insert element at end
1045  _Insert(_Unchecked_end(), _STD forward<_Ty>(_Val));
1046  }
_Unchecked_iterator _Unchecked_end()
Definition: list:1176
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::push_back ( const _Ty &  _Val)
inline
1317  { // insert element at end
1319  }
_Unchecked_iterator _Unchecked_end()
Definition: list:1176
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::push_front ( _Ty &&  _Val)
inline
1039  { // insert element at beginning
1040  _Insert(_Unchecked_begin(), _STD forward<_Ty>(_Val));
1041  }
_Unchecked_iterator _Unchecked_begin()
Definition: list:1164
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::push_front ( const _Ty &  _Val)
inline
1307  { // insert element at beginning
1309  }
_Unchecked_iterator _Unchecked_begin()
Definition: list:1164
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
reverse_iterator list< _Ty, _Alloc >::rbegin ( )
inline
1198  { // return iterator for beginning of reversed mutable sequence
1199  return (reverse_iterator(end()));
1200  }
iterator end() _NOEXCEPT
Definition: list:1154
_STD reverse_iterator< iterator > reverse_iterator
Definition: list:904
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reverse_iterator list< _Ty, _Alloc >::rbegin ( ) const
inline
1203  { // return iterator for beginning of reversed nonmutable sequence
1204  return (const_reverse_iterator(end()));
1205  }
iterator end() _NOEXCEPT
Definition: list:1154
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: list:905
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::remove ( const _Ty &  _Val)
inline
1636  { // erase each element matching _Val
1637  iterator _Val_it = end();
1638 
1639  for (iterator _First = begin(); _First != end(); )
1640  if (*_First == _Val)
1641  if (_STD addressof(*_First) == _STD addressof(_Val))
1642  _Val_it = _First++;
1643  else
1644  _First = erase(_First);
1645  else
1646  ++_First;
1647 
1648  if (_Val_it != end())
1649  erase(_Val_it);
1650  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
Definition: xutility:565
iterator begin() _NOEXCEPT
Definition: list:1142
iterator end() _NOEXCEPT
Definition: list:1154
iterator erase(const_iterator _Where)
Definition: list:1499
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr1 >
void list< _Ty, _Alloc >::remove_if ( _Pr1  _Pred)
inline
1654  { // erase each element satisfying _Pred
1655  _Remove_if(_Pred);
1656  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Remove_if(_Pr1 &_Pred)
Definition: list:1659
template<class _Ty, class _Alloc = allocator<_Ty>>
reverse_iterator list< _Ty, _Alloc >::rend ( )
inline
1208  { // return iterator for end of reversed mutable sequence
1209  return (reverse_iterator(begin()));
1210  }
iterator begin() _NOEXCEPT
Definition: list:1142
_STD reverse_iterator< iterator > reverse_iterator
Definition: list:904
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reverse_iterator list< _Ty, _Alloc >::rend ( ) const
inline
1213  { // return iterator for end of reversed nonmutable sequence
1214  return (const_reverse_iterator(begin()));
1215  }
iterator begin() _NOEXCEPT
Definition: list:1142
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: list:905
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::resize ( _CRT_GUARDOVERFLOW size_type  _Newsize)
inline
1238  { // determine new length, padding with _Ty() elements as needed
1239  if (this->_Mysize() < _Newsize)
1240  { // pad to make larger
1241  size_type _Count = 0;
1242  _TRY_BEGIN
1243  for (; this->_Mysize() < _Newsize; ++_Count)
1245  _CATCH_ALL
1246  for (; 0 < _Count; --_Count)
1247  pop_back(); // undo inserts
1248  _RERAISE;
1249  _CATCH_END
1250  }
1251  else
1252  while (_Newsize < this->_Mysize())
1253  pop_back();
1254  }
void pop_back()
Definition: list:1321
size_type & _Mysize() _NOEXCEPT
Definition: list:806
#define _TRY_BEGIN
Definition: xstddef:26
#define _CATCH_END
Definition: xstddef:29
_Unchecked_iterator _Unchecked_end()
Definition: list:1176
_Mybase::size_type size_type
Definition: list:889
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1080
#define _CATCH_ALL
Definition: xstddef:28
_Diff _Count
Definition: algorithm:1941
#define _RERAISE
Definition: xstddef:32
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::resize ( _CRT_GUARDOVERFLOW size_type  _Newsize,
const _Ty &  _Val 
)
inline
1257  { // determine new length, padding with _Val elements as needed
1258  if (this->_Mysize() < _Newsize)
1259  _Insert_n(_Unchecked_end(), _Newsize - this->_Mysize(), _Val);
1260  else
1261  while (_Newsize < this->_Mysize())
1262  pop_back();
1263  }
void pop_back()
Definition: list:1321
size_type & _Mysize() _NOEXCEPT
Definition: list:806
_Unchecked_iterator _Unchecked_end()
Definition: list:1176
void _Insert_n(_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: list:1930
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::reverse ( )
inline
1791  { // reverse sequence
1792  const _Nodeptr _Phead = this->_Myhead();
1793  _Nodeptr _Pnode = _Phead;
1794 
1795  for (; ; )
1796  { // flip pointers in a node
1797  const _Nodeptr _Pnext = this->_Nextnode(_Pnode);
1798  this->_Nextnode(_Pnode) = this->_Prevnode(_Pnode);
1799  this->_Prevnode(_Pnode) = _Pnext;
1800 
1801  if (_Pnext == _Phead)
1802  break;
1803  _Pnode = _Pnext;
1804  }
1805  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578
template<class _Ty, class _Alloc = allocator<_Ty>>
size_type list< _Ty, _Alloc >::size ( ) const
inline
1266  { // return length of sequence
1267  return (this->_Mysize());
1268  }
size_type & _Mysize() _NOEXCEPT
Definition: list:806
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::sort ( )
inline
1748  { // order sequence, using operator<
1749  sort(less<>());
1750  }
void sort()
Definition: list:1747
Definition: xstddef:226
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::sort ( _Pr2  _Pred)
inline
1754  { // order sequence, using _Pred
1755  _Sort(begin(), end(), _Pred, this->_Mysize());
1756  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
size_type & _Mysize() _NOEXCEPT
Definition: list:806
iterator _Sort(iterator _First, iterator _Last, _Pr2 &_Pred, size_type _Size)
Definition: list:1759
iterator begin() _NOEXCEPT
Definition: list:1142
iterator end() _NOEXCEPT
Definition: list:1154
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt _Right 
)
inline
1564  { // splice all of _Right at _Where
1565  if (this != _STD addressof(_Right) && !_Right.empty())
1566  { // worth splicing, do it
1567  _Splice(_Where, _Right, _Right.begin(), _Right.end(),
1568  _Right._Mysize());
1569  }
1570  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void _Splice(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1807
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt &&  _Right 
)
inline
1573  { // splice all of _Right at _Where
1574  splice(_Where, _Right);
1575  }
void splice(const_iterator _Where, _Myt &_Right)
Definition: list:1563
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First 
)
inline
1579  { // splice _Right [_First, _First + 1) at _Where
1580  #if _ITERATOR_DEBUG_LEVEL == 2
1581  if (_First == _Right.end())
1582  {
1583  _DEBUG_ERROR("list splice iterator outside range");
1584  }
1585  else
1586 
1587  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
1588  if (_First != _Right.end())
1589  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1590 
1591  { // element exists, try splice
1592  const_iterator _Last = _First;
1593  ++_Last;
1594  if (this != _STD addressof(_Right)
1595  || (_Where != _First && _Where != _Last))
1596  _Splice(_Where, _Right, _First, _Last, 1);
1597  }
1598  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::const_iterator const_iterator
Definition: list:897
#define _DEBUG_ERROR(mesg)
Definition: xutility:33
void _Splice(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1807
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt &&  _Right,
const_iterator  _First 
)
inline
1602  { // splice _Right [_First, _First + 1) at _Where
1603  splice(_Where, _Right, _First);
1604  }
void splice(const_iterator _Where, _Myt &_Right)
Definition: list:1563
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First,
const_iterator  _Last 
)
inline
1608  { // splice _Right [_First, _Last) at _Where
1609  if (_First != _Last && (this != _STD addressof(_Right) || _Where != _Last))
1610  { // worth splicing, do it
1611  size_type _Count = 0;
1612 
1613  if (this == _STD addressof(_Right))
1614  ; // just rearrange this list
1615  else if (_First == _Right.begin() && _Last == _Right.end())
1616  _Count = _Right._Mysize(); // splice in whole list
1617  else
1618  { // count nodes and check for knot
1619  const_iterator _Next = _First;
1620 
1621  for (; _Next != _Last; ++_Next, (void)++_Count)
1622  if (_Next == _Right.end())
1623  _Xlength_error("list<T> bad splice");
1624  }
1625  _Splice(_Where, _Right, _First, _Last, _Count);
1626  }
1627  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Mybase::size_type size_type
Definition: list:889
_Mybase::const_iterator const_iterator
Definition: list:897
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *terminate_handler)()
_Diff _Count
Definition: algorithm:1941
void _Splice(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1807
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xlength_error(_In_z_ const char *)
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt &&  _Right,
const_iterator  _First,
const_iterator  _Last 
)
inline
1631  { // splice _Right [_First, _Last) at _Where
1632  splice(_Where, _Right, _First, _Last);
1633  }
void splice(const_iterator _Where, _Myt &_Right)
Definition: list:1563
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::swap ( _Myt _Right)
inline
1553  { // exchange contents with _Right
1554  if (this != _STD addressof(_Right))
1555  { // (maybe) swap allocators, swap control information
1556  _Pocs(this->_Getal(), _Right._Getal());
1557  this->_Swap_all(_Right);
1558  _Swap_adl(this->_Myhead(), _Right._Myhead());
1559  _STD swap(this->_Mysize(), _Right._Mysize());
1560  }
1561  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
size_type & _Mysize() _NOEXCEPT
Definition: list:806
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:73
_Alty & _Getal() _NOEXCEPT
Definition: list:776
void swap(_Myt &_Right) _NOEXCEPT_OP(_Alty
Definition: list:1551
void _Pocs(_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1169
constexpr const _Ty &() _Right
Definition: algorithm:3723
void _Swap_all(_Myt &_Right)
Definition: list:771
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::unique ( )
inline
1669  { // erase each element matching previous
1670  unique(equal_to<>());
1671  }
Definition: xstddef:212
void unique()
Definition: list:1668
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::unique ( _Pr2  _Pred)
inline
1675  { // erase each element satisfying _Pred with previous
1676  const _Nodeptr _Phead = this->_Myhead();
1677  _Nodeptr _Pprev = this->_Nextnode(_Phead);
1678  _Nodeptr _Pnode = this->_Nextnode(_Pprev);
1679 
1680  while (_Pnode != _Phead)
1681  if (_Pred(_Pprev->_Myval, _Pnode->_Myval))
1682  { // match, remove it
1683  const _Nodeptr _Perase = _Pnode;
1684  _Pnode = this->_Nextnode(_Pnode);
1685 
1686  this->_Nextnode(_Pprev) = _Pnode;
1687  this->_Prevnode(_Pnode) = _Pprev;
1688  this->_Freenode(_Perase);
1689 
1690  --this->_Mysize();
1691  }
1692  else
1693  { // no match, advance
1694  _Pprev = _Pnode;
1695  _Pnode = this->_Nextnode(_Pnode);
1696  }
1697  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
size_type & _Mysize() _NOEXCEPT
Definition: list:806
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:796
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:583
void _Freenode(_Nodeptr _Pnode)
Definition: list:863
_Mybase::_Nodeptr _Nodeptr
Definition: list:885
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:578

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