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 (size_type _Count)
 
 list (size_type _Count, const _Ty &_Val)
 
 list (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)
 
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 (_XSTD initializer_list< _Ty > _Ilist, const _Alloc &_Al=allocator_type())
 
_Mytoperator= (_XSTD initializer_list< _Ty > _Ilist)
 
void assign (_XSTD initializer_list< _Ty > _Ilist)
 
iterator insert (const_iterator _Where, _XSTD 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 (size_type _Newsize)
 
void resize (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 (size_type _Count, const _Ty &_Val)
 
iterator insert (const_iterator _Where, const _Ty &_Val)
 
iterator insert (const_iterator _Where, 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 _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
892  : _Mybase()
893  { // construct empty list
894  }
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( const _Alloc _Al)
inlineexplicit
897  : _Mybase(_Al)
898  { // construct empty list, allocator
899  }
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( size_type  _Count)
inlineexplicit
902  : _Mybase()
903  { // construct list from _Count * _Ty()
904  resize(_Count);
905  }
unsigned int _Count
Definition: xcomplex:668
void resize(size_type _Newsize)
Definition: list:1212
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( size_type  _Count,
const _Ty &  _Val 
)
inline
908  : _Mybase()
909  { // construct list from _Count * _Val
911  }
unsigned int _Count
Definition: xcomplex:668
_In_ int _Val
Definition: vcruntime_string.h:62
void _Construct_n(size_type _Count, const _Ty &_Val)
Definition: list:973
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( size_type  _Count,
const _Ty &  _Val,
const _Alloc _Al 
)
inline
914  : _Mybase(_Al)
915  { // construct list from _Count * _Val, allocator
917  }
unsigned int _Count
Definition: xcomplex:668
_In_ int _Val
Definition: vcruntime_string.h:62
void _Construct_n(size_type _Count, const _Ty &_Val)
Definition: list:973
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( const _Myt _Right)
inline
921  : _Mybase(_Right._Getal().select_on_container_copy_construction())
922 
923 
924  { // construct list by copying _Right
925  _TRY_BEGIN
926  insert(begin(), _Right.begin(), _Right.end());
927  _CATCH_ALL
928  _Tidy();
929  _RERAISE;
930  _CATCH_END
931  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
iterator begin() _NOEXCEPT
Definition: list:1117
void _Tidy()
Definition: list:1882
#define _CATCH_ALL
Definition: xstddef:62
#define _RERAISE
Definition: xstddef:74
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1029
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( const _Myt _Right,
const _Alloc _Al 
)
inline
934  : _Mybase(_Al)
935  { // construct list by copying _Right, allocator
936  _TRY_BEGIN
937  insert(begin(), _Right.begin(), _Right.end());
938  _CATCH_ALL
939  _Tidy();
940  _RERAISE;
941  _CATCH_END
942  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
iterator begin() _NOEXCEPT
Definition: list:1117
void _Tidy()
Definition: list:1882
#define _CATCH_ALL
Definition: xstddef:62
#define _RERAISE
Definition: xstddef:74
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1029
constexpr const _Ty &() _Right
Definition: algorithm:3591
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
948  : _Mybase()
949  { // construct list from [_First, _Last)
950  _Construct(_First, _Last);
951  }
void _Construct(_Iter _First, _Iter _Last)
Definition: list:963
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
_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
957  : _Mybase(_Al)
958  { // construct list, allocator from [_First, _Last)
959  _Construct(_First, _Last);
960  }
void _Construct(_Iter _First, _Iter _Last)
Definition: list:963
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( _Myt &&  _Right)
inline
985  : _Mybase(_STD move(_Right._Getal()))
986  { // construct list by moving _Right
987  _Assign_rv(_STD forward<_Myt>(_Right));
988  }
void _Assign_rv(_Myt &&_Right)
Definition: list:1012
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( _Myt &&  _Right,
const _Alloc _Al 
)
inline
991  : _Mybase(_Al)
992  { // construct list by moving _Right, allocator
993  _Assign_rv(_STD forward<_Myt>(_Right));
994  }
void _Assign_rv(_Myt &&_Right)
Definition: list:1012
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::list ( _XSTD initializer_list< _Ty >  _Ilist,
const _Alloc _Al = allocator_type() 
)
inline
1074  : _Mybase(_Al)
1075  { // construct from initializer_list
1076  insert(begin(), _Ilist.begin(), _Ilist.end());
1077  }
iterator begin() _NOEXCEPT
Definition: list:1117
_List_buy< _Ty, _Alloc > _Mybase
Definition: list:867
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1029
template<class _Ty, class _Alloc = allocator<_Ty>>
list< _Ty, _Alloc >::~list ( )
inline
1097  { // destroy the object
1098  _Tidy();
1099  }
void _Tidy()
Definition: list:1882

Member Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Assign_rv ( _Myt &&  _Right)
inline
1013  { // swap with empty *this, same allocator
1014  this->_Swap_all(_Right);
1015  _Swap_adl(this->_Myhead(), _Right._Myhead());
1016  _STD swap(this->_Mysize(), _Right._Mysize());
1017  }
size_type & _Mysize() _NOEXCEPT
Definition: list:790
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:56
void swap(_Myt &_Right) _NOEXCEPT_OP(_Alty
Definition: list:1517
constexpr const _Ty &() _Right
Definition: algorithm:3591
void _Swap_all(_Myt &_Right)
Definition: list:755
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Iter >
void list< _Ty, _Alloc >::_Construct ( _Iter  _First,
_Iter  _Last 
)
inline
964  { // construct list from [_First, _Last), input iterators
965  _TRY_BEGIN
966  insert(begin(), _First, _Last);
967  _CATCH_ALL
968  _Tidy();
969  _RERAISE;
970  _CATCH_END
971  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
iterator begin() _NOEXCEPT
Definition: list:1117
void _Tidy()
Definition: list:1882
#define _CATCH_ALL
Definition: xstddef:62
#define _RERAISE
Definition: xstddef:74
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1029
_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
975  { // construct from _Count * _Val
976  _TRY_BEGIN
978  _CATCH_ALL
979  _Tidy();
980  _RERAISE;
981  _CATCH_END
982  }
unsigned int _Count
Definition: xcomplex:668
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_begin()
Definition: list:1139
void _Tidy()
Definition: list:1882
#define _CATCH_ALL
Definition: xstddef:62
void _Insert_n(_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: list:1887
#define _RERAISE
Definition: xstddef:74
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Incsize ( size_type  _Count)
inline
1906  { // alter element count, with checking
1907  if (max_size() - this->_Mysize() - 1 < _Count)
1908  _Xlength_error("list<T> too long");
1909  this->_Mysize() += _Count;
1910  }
unsigned int _Count
Definition: xcomplex:668
size_type & _Mysize() _NOEXCEPT
Definition: list:790
size_type max_size() const _NOEXCEPT
Definition: list:1245
_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
1061  { // insert element at _Where
1062  _Nodeptr _Pnode = _Where._Mynode();
1063  _Nodeptr _Newnode =
1064  this->_Buynode(_Pnode, this->_Prevnode(_Pnode),
1065  _STD forward<_Valty>(_Val)...);
1066  _Incsize(1);
1067  this->_Prevnode(_Pnode) = _Newnode;
1068  this->_Nextnode(this->_Prevnode(_Newnode)) = _Newnode;
1069  }
void _Incsize(size_type _Count)
Definition: list:1905
_In_ int _Val
Definition: vcruntime_string.h:62
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
_Nodeptr _Buynode(_Nodeptr _Next, _Nodeptr _Prev, _Valty &&..._Val)
Definition: list:829
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Insert_n ( _Unchecked_const_iterator  _Where,
size_type  _Count,
const _Ty &  _Val 
)
inline
1889  { // insert _Count * _Val at _Where
1890  size_type _Countsave = _Count;
1891 
1892  _TRY_BEGIN
1893  for (; 0 < _Count; --_Count)
1894  _Insert(_Where, _Val);
1895  _CATCH_ALL
1896  for (; _Count < _Countsave; ++_Count)
1897  { // undo inserts
1898  _Unchecked_const_iterator _Before = _Where;
1899  _Unchecked_erase(--_Before);
1900  }
1901  _RERAISE;
1902  _CATCH_END
1903  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:884
unsigned int _Count
Definition: xcomplex:668
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
_In_ int _Val
Definition: vcruntime_string.h:62
_Mybase::size_type size_type
Definition: list:873
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
#define _CATCH_ALL
Definition: xstddef:62
void _Unchecked_erase(_Unchecked_const_iterator _Where)
Definition: list:1472
#define _RERAISE
Definition: xstddef:74
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
1407  { // insert [_First, _Last) at _Where, input iterators
1408  size_type _Num = 0;
1409 
1410  _TRY_BEGIN
1411  for (; _First != _Last; ++_First, (void)++_Num)
1412  _Insert(_Where, *_First);
1413  _CATCH_ALL
1414  for (; 0 < _Num; --_Num)
1415  { // undo inserts
1416  _Unchecked_const_iterator _Before = _Where;
1417  _Unchecked_erase(--_Before);
1418  }
1419  _RERAISE;
1420  _CATCH_END
1421  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:884
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
_Mybase::size_type size_type
Definition: list:873
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
#define _CATCH_ALL
Definition: xstddef:62
void _Unchecked_erase(_Unchecked_const_iterator _Where)
Definition: list:1472
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *unexpected_handler)()
#define _RERAISE
Definition: xstddef:74
_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
1426  { // insert [_First, _Last) at _Where, forward iterators
1427  _DEBUG_RANGE(_First, _Last);
1428  _Iter _Next = _First;
1429 
1430  _TRY_BEGIN
1431  for (; _First != _Last; ++_First)
1432  _Insert(_Where, *_First);
1433  _CATCH_ALL
1434  for (; _Next != _First; ++_Next)
1435  { // undo inserts
1436  _Unchecked_const_iterator _Before = _Where;
1437  _Unchecked_erase(--_Before);
1438  }
1439  _RERAISE;
1440  _CATCH_END
1441  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:884
#define _DEBUG_RANGE(first, last)
Definition: xutility:822
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
#define _CATCH_ALL
Definition: xstddef:62
void _Unchecked_erase(_Unchecked_const_iterator _Where)
Definition: list:1472
#define _RERAISE
Definition: xstddef:74
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::_Make_iter ( const_iterator  _Where) const
inline
1163  { // make iterator from const_iterator
1164  return (iterator(_Where._Ptr, &this->_Get_data()));
1165  }
_Mybase::iterator iterator
Definition: list:882
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::_Make_iter ( _Unchecked_const_iterator  _Where) const
inline
1168  { // make iterator from _Unchecked_const_iterator
1169  return (iterator(_Where._Ptr, &this->_Get_data()));
1170  }
_Mybase::iterator iterator
Definition: list:882
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::_Merge1 ( _Myt _Right,
_Pr2 &&  _Pred 
)
inline
1687  { // merge in elements from _Right, both ordered by _Pred
1688  if (&_Right != this)
1689  { // safe to merge, do it
1690  iterator _First1 = begin(), _Last1 = end();
1691  iterator _First2 = _Right.begin(), _Last2 = _Right.end();
1692  _DEBUG_ORDER_PRED(_First1, _Last1, _Pred);
1693  _DEBUG_ORDER_PRED(_First2, _Last2, _Pred);
1694 
1695  while (_First1 != _Last1 && _First2 != _Last2)
1696  if (_DEBUG_LT_PRED(_Pred, *_First2, *_First1))
1697  { // splice in an element from _Right
1698  iterator _Mid2 = _First2;
1699  _Splice(_First1, _Right, _First2, ++_Mid2, 1);
1700  _First2 = _Mid2;
1701  }
1702  else
1703  ++_First1;
1704 
1705  if (_First2 != _Last2)
1706  _Splice(_Last1, _Right, _First2, _Last2,
1707  _Right._Mysize()); // splice remainder of _Right
1708  }
1709  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
#define _DEBUG_LT_PRED(pred, x, y)
Definition: xutility:817
Definition: xutility:563
iterator begin() _NOEXCEPT
Definition: list:1117
iterator end() _NOEXCEPT
Definition: list:1129
#define _DEBUG_ORDER_PRED(first, last, pred)
Definition: xutility:818
void _Splice(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1771
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr1 >
void list< _Ty, _Alloc >::_Remove_if ( _Pr1 &  _Pred)
inline
1624  { // erase each element satisfying _Pred
1625  for (iterator _First = begin(); _First != end(); )
1626  if (_Pred(*_First))
1627  _First = erase(_First);
1628  else
1629  ++_First;
1630  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
Definition: xutility:563
iterator begin() _NOEXCEPT
Definition: list:1117
iterator end() _NOEXCEPT
Definition: list:1129
iterator erase(const_iterator _Where)
Definition: list:1465
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _TArg >
void list< _Ty, _Alloc >::_Reusenode ( iterator  _Where,
_TArg &&  _Arg 
)
inline
1321  { // destroy the element at _Where and reconstruct from _Arg
1322  _TRY_BEGIN
1323  this->_Getal().destroy(
1324  _STD addressof(this->_Myval(_Where._Ptr)));
1325  this->_Getal().construct(
1326  _STD addressof(this->_Myval(_Where._Ptr)),
1327  _STD forward<_TArg>(_Arg));
1328  _CATCH_ALL
1329  _Unlinknode(_Where);
1330  this->_Getal().destroy(
1331  _STD addressof(this->_Nextnode(_Where._Ptr)));
1332  this->_Getal().destroy(
1333  _STD addressof(this->_Prevnode(_Where._Ptr)));
1334  this->_Getal().deallocate(_Where._Ptr, 1);
1335  _RERAISE;
1336  _CATCH_END
1337  }
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
#define _TRY_BEGIN
Definition: xstddef:60
_Nodeptr _Unlinknode(const_iterator _Where)
Definition: list:1443
#define _CATCH_END
Definition: xstddef:63
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
#define _CATCH_ALL
Definition: xstddef:62
_Alty & _Getal() _NOEXCEPT
Definition: list:760
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
#define _RERAISE
Definition: xstddef:74
static reference _Myval(_Nodeptr _Pnode)
Definition: list:594
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
1725  { // order [_First, _Last), using _Pred, return new first
1726  // _Size must be distance from _First to _Last
1727  if (_Size < 2)
1728  return (_First); // nothing to do
1729 
1730  iterator _Mid = _STD next(_First, _Size / 2);
1731  _First = _Sort(_First, _Mid, _Pred, _Size / 2);
1732  _Mid = _Sort(_Mid, _Last, _Pred, _Size - _Size / 2);
1733  iterator _Newfirst = _First;
1734 
1735  for (bool _Initial_loop = true; ; _Initial_loop = false)
1736  { // [_First, _Mid) and [_Mid, _Last) are sorted and non-empty
1737  if (_DEBUG_LT_PRED(_Pred, *_Mid, *_First))
1738  { // consume _Mid
1739  if (_Initial_loop)
1740  _Newfirst = _Mid; // update return value
1741  splice(_First, *this, _Mid++);
1742  if (_Mid == _Last)
1743  return (_Newfirst); // exhausted [_Mid, _Last); done
1744  }
1745  else
1746  { // consume _First
1747  ++_First;
1748  if (_First == _Mid)
1749  return (_Newfirst); // exhausted [_First, _Mid); done
1750  }
1751  }
1752  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
#define _DEBUG_LT_PRED(pred, x, y)
Definition: xutility:817
Definition: xutility:563
iterator _Sort(iterator _First, iterator _Last, _Pr2 &_Pred, size_type _Size)
Definition: list:1723
void splice(const_iterator _Where, _Myt &_Right)
Definition: list:1529
_InIt next(_InIt _First, _Iter_diff_t< _InIt > _Off=1)
Definition: xutility:1131
_Size
Definition: vcruntime_string.h:36
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
1774  { // splice _Right [_First, _Last) before _Where
1775  #if _ITERATOR_DEBUG_LEVEL == 2
1776  if (_Where._Getcont() != &this->_Get_data())
1777  _DEBUG_ERROR("list splice iterator outside range");
1778  if (this->_Getal() != _Right._Getal())
1779  _DEBUG_ERROR("list containers incompatible for splice");
1780 
1781  if (this != &_Right)
1782  { // transfer ownership
1783  _Lockit _Lock(_LOCK_DEBUG);
1784 
1785  const bool _One = _Count == 1;
1786  const bool _All = !_One && _Count == _Right.size();
1787  const bool _Some = !_One && !_All;
1788 
1789  _Nodeptr _Oldprev = this->_Prevnode(_First._Ptr);
1790 
1791  if (_Some)
1792  for (_Nodeptr _Ptr = _First._Ptr; _Ptr != _Last._Ptr;
1793  _Ptr = this->_Nextnode(_Ptr))
1794  { // mark _Prev pointers
1795  this->_Prevnode(_Ptr) = nullptr_t{};
1796  }
1797 
1798  const_iterator **_Pnext = (const_iterator **)_Right._Getpfirst();
1799 
1800  if (_Pnext == 0)
1801  _DEBUG_ERROR("list container corrupted");
1802 
1803  while (*_Pnext != 0)
1804  { // check the iterator
1805  const_iterator& _Iter = **_Pnext;
1806 
1807  if ((_One && _Iter._Ptr == _First._Ptr)
1808  || (_All && _Iter._Ptr != _Right._Myhead())
1809  || (_Some && this->_Prevnode(_Iter._Ptr) == nullptr_t{}))
1810  { // adopt the iterator
1811  *_Pnext = (const_iterator *)_Iter._Mynextiter;
1812  _Iter._Myproxy = this->_Myproxy();
1813  _Iter._Mynextiter = this->_Myproxy()->_Myfirstiter;
1814  this->_Myproxy()->_Myfirstiter = &_Iter;
1815  }
1816  else
1817  { // skip the iterator
1818  _Pnext = (const_iterator **)_Iter._Getpnext();
1819  }
1820  }
1821 
1822  if (_Some)
1823  for (_Nodeptr _Ptr = _First._Ptr; _Ptr != _Last._Ptr;
1824  _Ptr = this->_Nextnode(_Ptr))
1825  { // restore _Prev pointers
1826  this->_Prevnode(_Ptr) = _Oldprev;
1827  _Oldprev = _Ptr;
1828  }
1829  }
1830 
1831  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
1832  if (this->_Getal() != _Right._Getal())
1833  _XSTD terminate();
1834  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1835 
1836  _Splice_same(_Where, _Right, _First, _Last, _Count);
1837  }
unsigned int _Count
Definition: xcomplex:668
void _Splice_same(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1839
_Mybase::const_iterator const_iterator
Definition: list:881
#define _XSTD
Definition: xstddef:21
void __CRTDECL terminate() _NOEXCEPT
Definition: exception:208
#define _LOCK_DEBUG
Definition: yvals.h:607
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
_Alty & _Getal() _NOEXCEPT
Definition: list:760
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3591
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
1842  { // splice _Right [_First, _Last) before _Where
1843  if (this != &_Right)
1844  { // splicing from another list, adjust counts
1845  _Incsize(_Count);
1846  _Right._Mysize() -= _Count;
1847  }
1848  this->_Nextnode(this->_Prevnode(_First._Mynode())) =
1849  _Last._Mynode();
1850  this->_Nextnode(this->_Prevnode(_Last._Mynode())) =
1851  _Where._Mynode();
1852  this->_Nextnode(this->_Prevnode(_Where._Mynode())) =
1853  _First._Mynode();
1854 
1855  _Nodeptr _Pnode = this->_Prevnode(_Where._Mynode());
1856  this->_Prevnode(_Where._Mynode()) =
1857  this->_Prevnode(_Last._Mynode());
1858  this->_Prevnode(_Last._Mynode()) =
1859  this->_Prevnode(_First._Mynode());
1860  this->_Prevnode(_First._Mynode()) = _Pnode;
1861  }
void _Incsize(size_type _Count)
Definition: list:1905
unsigned int _Count
Definition: xcomplex:668
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Tidy ( )
inline
1883  { // free all storage
1884  clear();
1885  }
void clear() _NOEXCEPT
Definition: list:1499
template<class _Ty, class _Alloc = allocator<_Ty>>
_Unchecked_iterator list< _Ty, _Alloc >::_Unchecked_begin ( )
inline
1140  { // return iterator for beginning of mutable sequence
1141  return (_Unchecked_iterator(this->_Nextnode(this->_Myhead()),
1142  &this->_Get_data()));
1143  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
_Mybase::_Unchecked_iterator _Unchecked_iterator
Definition: list:886
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
template<class _Ty, class _Alloc = allocator<_Ty>>
_Unchecked_const_iterator list< _Ty, _Alloc >::_Unchecked_begin ( ) const
inline
1146  { // return iterator for beginning of nonmutable sequence
1147  return (_Unchecked_const_iterator(this->_Nextnode(this->_Myhead()),
1148  &this->_Get_data()));
1149  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:884
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
template<class _Ty, class _Alloc = allocator<_Ty>>
_Unchecked_iterator list< _Ty, _Alloc >::_Unchecked_end ( )
inline
1152  { // return unchecked iterator for end of mutable sequence
1153  return (_Unchecked_iterator(this->_Myhead(), &this->_Get_data()));
1154  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
_Mybase::_Unchecked_iterator _Unchecked_iterator
Definition: list:886
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
template<class _Ty, class _Alloc = allocator<_Ty>>
_Unchecked_const_iterator list< _Ty, _Alloc >::_Unchecked_end ( ) const
inline
1157  { // return unchecked iterator for end of nonmutable sequence
1158  return (_Unchecked_const_iterator(this->_Myhead(),
1159  &this->_Get_data()));
1160  }
_Mybase::_Unchecked_const_iterator _Unchecked_const_iterator
Definition: list:884
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::_Unchecked_erase ( _Unchecked_const_iterator  _Where)
inline
1473  { // erase element at _Where
1474  _Nodeptr _Pnode = _Where._Mynode();
1475 
1476  this->_Nextnode(this->_Prevnode(_Pnode)) =
1477  this->_Nextnode(_Pnode);
1478  this->_Prevnode(this->_Nextnode(_Pnode)) =
1479  this->_Prevnode(_Pnode);
1480  this->_Freenode(_Pnode);
1481  --this->_Mysize();
1482  }
size_type & _Mysize() _NOEXCEPT
Definition: list:790
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
void _Freenode(_Nodeptr _Pnode)
Definition: list:847
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
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
1866  { // splice [_First, _Last) before _Where
1867  this->_Nextnode(this->_Prevnode(_First._Mynode())) =
1868  _Last._Mynode();
1869  this->_Nextnode(this->_Prevnode(_Last._Mynode())) =
1870  _Where._Mynode();
1871  this->_Nextnode(this->_Prevnode(_Where._Mynode())) =
1872  _First._Mynode();
1873 
1874  _Nodeptr _Pnode = this->_Prevnode(_Where._Mynode());
1875  this->_Prevnode(_Where._Mynode()) =
1876  this->_Prevnode(_Last._Mynode());
1877  this->_Prevnode(_Last._Mynode()) =
1878  this->_Prevnode(_First._Mynode());
1879  this->_Prevnode(_First._Mynode()) = _Pnode;
1880  }
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
_Nodeptr list< _Ty, _Alloc >::_Unlinknode ( const_iterator  _Where)
inline
1444  { // unlink node at _Where from the list
1445  #if _ITERATOR_DEBUG_LEVEL == 2
1446  if (_Where._Getcont() != &this->_Get_data()
1447  || _Where._Ptr == this->_Myhead())
1448  _DEBUG_ERROR("list erase iterator outside range");
1449  _Nodeptr _Pnode = (_Where)._Mynode();
1450  _Orphan_ptr(_Pnode);
1451 
1452  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
1453  _Nodeptr _Pnode = (_Where)._Mynode();
1454  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1455 
1456  this->_Nextnode(this->_Prevnode(_Pnode)) =
1457  this->_Nextnode(_Pnode);
1458  this->_Prevnode(this->_Nextnode(_Pnode)) =
1459  this->_Prevnode(_Pnode);
1460 
1461  --this->_Mysize();
1462  return (_Pnode);
1463  }
size_type & _Mysize() _NOEXCEPT
Definition: list:790
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::assign ( _XSTD initializer_list< _Ty >  _Ilist)
inline
1086  { // assign initializer_list
1087  assign(_Ilist.begin(), _Ilist.end());
1088  }
void assign(_XSTD initializer_list< _Ty > _Ilist)
Definition: list:1085
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
1305  { // assign [_First, _Last), input iterators
1306  iterator _Old = begin();
1307  _TRY_BEGIN
1308  for (; _First != _Last && _Old != end(); ++_First, (void)++_Old)
1309  _Reusenode(_Old, *_First);
1310  for (; _First != _Last; ++_First)
1311  _Insert(_Unchecked_end(), *_First);
1312  _CATCH_ALL
1313  clear();
1314  _RERAISE;
1315  _CATCH_END
1316  erase(_Old, end());
1317  }
void clear() _NOEXCEPT
Definition: list:1499
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
Definition: xutility:563
_Unchecked_iterator _Unchecked_end()
Definition: list:1151
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
iterator begin() _NOEXCEPT
Definition: list:1117
iterator end() _NOEXCEPT
Definition: list:1129
void _Reusenode(iterator _Where, _TArg &&_Arg)
Definition: list:1320
#define _CATCH_ALL
Definition: xstddef:62
iterator erase(const_iterator _Where)
Definition: list:1465
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *unexpected_handler)()
#define _RERAISE
Definition: xstddef:74
_FwdIt _Last
Definition: algorithm:1936
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::assign ( size_type  _Count,
const _Ty &  _Val 
)
inline
1340  { // assign _Count * _Val
1341  clear();
1343  }
void clear() _NOEXCEPT
Definition: list:1499
unsigned int _Count
Definition: xcomplex:668
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_begin()
Definition: list:1139
void _Insert_n(_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: list:1887
template<class _Ty, class _Alloc = allocator<_Ty>>
reference list< _Ty, _Alloc >::back ( )
inline
1272  { // return last element of mutable sequence
1273  return (*(--end()));
1274  }
iterator end() _NOEXCEPT
Definition: list:1129
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reference list< _Ty, _Alloc >::back ( ) const
inline
1277  { // return last element of nonmutable sequence
1278  return (*(--end()));
1279  }
iterator end() _NOEXCEPT
Definition: list:1129
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::begin ( )
inline
1118  { // return iterator for beginning of mutable sequence
1119  return (iterator(this->_Nextnode(this->_Myhead()),
1120  &this->_Get_data()));
1121  }
_Mybase::iterator iterator
Definition: list:882
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator list< _Ty, _Alloc >::begin ( ) const
inline
1124  { // return iterator for beginning of nonmutable sequence
1125  return (const_iterator(this->_Nextnode(this->_Myhead()),
1126  &this->_Get_data()));
1127  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
_Mybase::const_iterator const_iterator
Definition: list:881
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator list< _Ty, _Alloc >::cbegin ( ) const
inline
1193  { // return iterator for beginning of nonmutable sequence
1194  return (begin());
1195  }
iterator begin() _NOEXCEPT
Definition: list:1117
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator list< _Ty, _Alloc >::cend ( ) const
inline
1198  { // return iterator for end of nonmutable sequence
1199  return (end());
1200  }
iterator end() _NOEXCEPT
Definition: list:1129
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::clear ( )
inline
1500  { // erase all
1501  #if _ITERATOR_DEBUG_LEVEL == 2
1502 
1503  this->_Orphan_ptr(nullptr);
1504  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1505  _Nodeptr _Pnode = this->_Nextnode(this->_Myhead());
1506  this->_Nextnode(this->_Myhead()) = this->_Myhead();
1507  this->_Prevnode(this->_Myhead()) = this->_Myhead();
1508  this->_Mysize() = 0;
1509 
1510  for (_Nodeptr _Pnext; _Pnode != this->_Myhead(); _Pnode = _Pnext)
1511  { // delete an element
1512  _Pnext = this->_Nextnode(_Pnode);
1513  this->_Freenode(_Pnode);
1514  }
1515  }
size_type & _Mysize() _NOEXCEPT
Definition: list:790
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
void _Freenode(_Nodeptr _Pnode)
Definition: list:847
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reverse_iterator list< _Ty, _Alloc >::crbegin ( ) const
inline
1203  { // return iterator for beginning of reversed nonmutable sequence
1204  return (rbegin());
1205  }
reverse_iterator rbegin() _NOEXCEPT
Definition: list:1172
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reverse_iterator list< _Ty, _Alloc >::crend ( ) const
inline
1208  { // return iterator for end of reversed nonmutable sequence
1209  return (rend());
1210  }
reverse_iterator rend() _NOEXCEPT
Definition: list:1182
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
iterator list< _Ty, _Alloc >::emplace ( const_iterator  _Where,
_Valty &&...  _Val 
)
inline
1048  { // insert element at _Where
1049  #if _ITERATOR_DEBUG_LEVEL == 2
1050  if (_Where._Getcont() != &this->_Get_data())
1051  _DEBUG_ERROR("list emplace iterator outside range");
1052  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1053 
1054  _Insert(_Where._Unchecked(), _STD forward<_Valty>(_Val)...);
1055  return (_Make_iter(--_Where));
1056  }
_In_ int _Val
Definition: vcruntime_string.h:62
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1162
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
void list< _Ty, _Alloc >::emplace_back ( _Valty &&...  _Val)
inline
1042  { // insert element at end
1043  _Insert(_Unchecked_end(), _STD forward<_Valty>(_Val)...);
1044  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_end()
Definition: list:1151
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class... _Valty>
void list< _Ty, _Alloc >::emplace_front ( _Valty &&...  _Val)
inline
1036  { // insert element at beginning
1037  _Insert(_Unchecked_begin(), _STD forward<_Valty>(_Val)...);
1038  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_begin()
Definition: list:1139
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
template<class _Ty, class _Alloc = allocator<_Ty>>
bool list< _Ty, _Alloc >::empty ( ) const
inline
1251  { // test if sequence is empty
1252  return (this->_Mysize() == 0);
1253  }
size_type & _Mysize() _NOEXCEPT
Definition: list:790
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::end ( )
inline
1130  { // return iterator for end of mutable sequence
1131  return (iterator(this->_Myhead(), &this->_Get_data()));
1132  }
_Mybase::iterator iterator
Definition: list:882
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
template<class _Ty, class _Alloc = allocator<_Ty>>
const_iterator list< _Ty, _Alloc >::end ( ) const
inline
1135  { // return iterator for end of nonmutable sequence
1136  return (const_iterator(this->_Myhead(), &this->_Get_data()));
1137  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
_Mybase::const_iterator const_iterator
Definition: list:881
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::erase ( const_iterator  _Where)
inline
1466  { // erase element at _Where
1467  _Nodeptr _Pnode = _Unlinknode(_Where++);
1468  this->_Freenode(_Pnode);
1469  return (_Make_iter(_Where));
1470  }
_Nodeptr _Unlinknode(const_iterator _Where)
Definition: list:1443
void _Freenode(_Nodeptr _Pnode)
Definition: list:847
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1162
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::erase ( const_iterator  _First,
const_iterator  _Last 
)
inline
1485  { // erase [_First, _Last)
1486  if (_First == begin() && _Last == end())
1487  { // erase all and return fresh iterator
1488  clear();
1489  return (end());
1490  }
1491  else
1492  { // erase subrange
1493  while (_First != _Last)
1494  _First = erase(_First);
1495  return (_Make_iter(_Last));
1496  }
1497  }
void clear() _NOEXCEPT
Definition: list:1499
iterator begin() _NOEXCEPT
Definition: list:1117
iterator end() _NOEXCEPT
Definition: list:1129
iterator erase(const_iterator _Where)
Definition: list:1465
_FwdIt _Last
Definition: algorithm:1936
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1162
template<class _Ty, class _Alloc = allocator<_Ty>>
reference list< _Ty, _Alloc >::front ( )
inline
1262  { // return first element of mutable sequence
1263  return (*begin());
1264  }
iterator begin() _NOEXCEPT
Definition: list:1117
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reference list< _Ty, _Alloc >::front ( ) const
inline
1267  { // return first element of nonmutable sequence
1268  return (*begin());
1269  }
iterator begin() _NOEXCEPT
Definition: list:1117
template<class _Ty, class _Alloc = allocator<_Ty>>
allocator_type list< _Ty, _Alloc >::get_allocator ( ) const
inline
1256  { // return allocator object for values
1257  allocator_type _Ret(this->_Getal());
1258  return (_Ret);
1259  }
_Alloc allocator_type
Definition: list:872
_Alty & _Getal() _NOEXCEPT
Definition: list:760
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::insert ( const_iterator  _Where,
_Ty &&  _Val 
)
inline
1030  { // insert _Val at _Where
1031  return (emplace(_Where, _STD forward<_Ty>(_Val)));
1032  }
iterator emplace(const_iterator _Where, _Valty &&..._Val)
Definition: list:1047
_In_ int _Val
Definition: vcruntime_string.h:62
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::insert ( const_iterator  _Where,
_XSTD initializer_list< _Ty >  _Ilist 
)
inline
1092  { // insert initializer_list
1093  return (insert(_Where, _Ilist.begin(), _Ilist.end()));
1094  }
iterator insert(const_iterator _Where, _Ty &&_Val)
Definition: list:1029
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::insert ( const_iterator  _Where,
const _Ty &  _Val 
)
inline
1346  { // insert _Val at _Where
1347  #if _ITERATOR_DEBUG_LEVEL == 2
1348  if (_Where._Getcont() != &this->_Get_data())
1349  _DEBUG_ERROR("list insert iterator outside range");
1350  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1351 
1352  _Insert(_Where._Unchecked(), _Val);
1353  return (_Make_iter(--_Where));
1354  }
_In_ int _Val
Definition: vcruntime_string.h:62
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1162
template<class _Ty, class _Alloc = allocator<_Ty>>
iterator list< _Ty, _Alloc >::insert ( const_iterator  _Where,
size_type  _Count,
const _Ty &  _Val 
)
inline
1358  { // insert _Count * _Val at _Where
1359  #if _ITERATOR_DEBUG_LEVEL == 2
1360  if (_Where._Getcont() != &this->_Get_data())
1361  _DEBUG_ERROR("list insert iterator outside range");
1362  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1363 
1364  iterator _Prev = _Make_iter(_Where);
1365  if (_Prev == begin())
1366  { // insert sequence at beginning
1367  _Insert_n(_Where._Unchecked(), _Count, _Val);
1368  return (begin());
1369  }
1370  else
1371  { // insert sequence not at beginning
1372  --_Prev;
1373  _Insert_n(_Where._Unchecked(), _Count, _Val);
1374  return (++_Prev);
1375  }
1376  }
unsigned int _Count
Definition: xcomplex:668
Definition: xutility:563
_In_ int _Val
Definition: vcruntime_string.h:62
iterator begin() _NOEXCEPT
Definition: list:1117
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
void _Insert_n(_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: list:1887
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1162
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
1382  { // insert [_First, _Last) at _Where
1383  #if _ITERATOR_DEBUG_LEVEL == 2
1384  if (_Where._Getcont() != &this->_Get_data())
1385  _DEBUG_ERROR("list insert iterator outside range");
1386  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1387 
1388  iterator _Prev = _Make_iter(_Where);
1389  if (_Prev == begin())
1390  { // insert sequence at beginning
1391  _Insert_range(_Where._Unchecked(), _First, _Last,
1392  _Iter_cat_t<_Iter>());
1393  return (begin());
1394  }
1395  else
1396  { // insert sequence not at beginning
1397  --_Prev;
1398  _Insert_range(_Where._Unchecked(), _First, _Last,
1399  _Iter_cat_t<_Iter>());
1400  return (++_Prev);
1401  }
1402  }
typename iterator_traits< _Iter >::iterator_category _Iter_cat_t
Definition: xutility:655
Definition: xutility:563
iterator begin() _NOEXCEPT
Definition: list:1117
_List_val< _Val_types > & _Get_data() _NOEXCEPT
Definition: list:770
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
_FwdIt _Last
Definition: algorithm:1936
void _Insert_range(_Unchecked_const_iterator _Where, _Iter _First, _Iter _Last, input_iterator_tag)
Definition: list:1405
iterator _Make_iter(const_iterator _Where) const _NOEXCEPT
Definition: list:1162
template<class _Ty, class _Alloc = allocator<_Ty>>
size_type list< _Ty, _Alloc >::max_size ( ) const
inline
1246  { // return maximum possible length of sequence
1247  return (this->_Getal().max_size());
1248  }
size_type max_size() const _NOEXCEPT
Definition: list:1245
_Alty & _Getal() _NOEXCEPT
Definition: list:760
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::merge ( _Myt _Right)
inline
1664  { // merge in elements from _Right, both ordered by operator<
1665  _Merge1(_Right, less<>());
1666  }
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: list:1686
Definition: xstddef:231
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::merge ( _Myt &&  _Right)
inline
1669  { // merge in elements from _Right, both ordered by operator<
1670  _Merge1(_Right, less<>());
1671  }
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: list:1686
Definition: xstddef:231
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::merge ( _Myt _Right,
_Pr2  _Pred 
)
inline
1675  { // merge in elements from _Right, both ordered by _Pred
1676  _Merge1(_Right, _Pred);
1677  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: list:1686
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::merge ( _Myt &&  _Right,
_Pr2  _Pred 
)
inline
1681  { // merge in elements from _Right, both ordered by _Pred
1682  _Merge1(_Right, _Pred);
1683  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Merge1(_Myt &_Right, _Pr2 &&_Pred)
Definition: list:1686
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& list< _Ty, _Alloc >::operator= ( _Myt &&  _Right)
inline
998  { // assign by moving _Right
999  if (this != &_Right)
1000  { // different, assign it
1001  clear();
1002 
1003  if (_Alty::propagate_on_container_move_assignment::value
1004  && this->_Getal() != _Right._Getal())
1005  this->_Move_alloc(_Right._Getal());
1006 
1007  _Assign_rv(_STD forward<_Myt>(_Right));
1008  }
1009  return (*this);
1010  }
void clear() _NOEXCEPT
Definition: list:1499
void _Assign_rv(_Myt &&_Right)
Definition: list:1012
_Alty & _Getal() _NOEXCEPT
Definition: list:760
void _Move_alloc(_Alty &_Al)
Definition: list:625
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& list< _Ty, _Alloc >::operator= ( _XSTD initializer_list< _Ty >  _Ilist)
inline
1080  { // assign initializer_list
1081  assign(_Ilist.begin(), _Ilist.end());
1082  return (*this);
1083  }
void assign(_XSTD initializer_list< _Ty > _Ilist)
Definition: list:1085
template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt& list< _Ty, _Alloc >::operator= ( const _Myt _Right)
inline
1102  { // assign _Right
1103  if (this != &_Right)
1104  { // different, assign it
1105  if (this->_Getal() != _Right._Getal()
1106  && _Alty::propagate_on_container_copy_assignment::value)
1107  { // change allocator before copying
1108  clear();
1109  this->_Copy_alloc(_Right._Getal());
1110  }
1111 
1112  assign(_Right.begin(), _Right.end());
1113  }
1114  return (*this);
1115  }
void clear() _NOEXCEPT
Definition: list:1499
void _Copy_alloc(const _Alty &_Al)
Definition: list:620
_Alty & _Getal() _NOEXCEPT
Definition: list:760
void assign(_XSTD initializer_list< _Ty > _Ilist)
Definition: list:1085
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::pop_back ( )
inline
1297  { // erase element at end
1298  erase(--end());
1299  }
iterator end() _NOEXCEPT
Definition: list:1129
iterator erase(const_iterator _Where)
Definition: list:1465
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::pop_front ( )
inline
1287  { // erase element at beginning
1288  erase(begin());
1289  }
iterator begin() _NOEXCEPT
Definition: list:1117
iterator erase(const_iterator _Where)
Definition: list:1465
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::push_back ( _Ty &&  _Val)
inline
1025  { // insert element at end
1026  _Insert(_Unchecked_end(), _STD forward<_Ty>(_Val));
1027  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_end()
Definition: list:1151
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::push_back ( const _Ty &  _Val)
inline
1292  { // insert element at end
1294  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_end()
Definition: list:1151
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::push_front ( _Ty &&  _Val)
inline
1020  { // insert element at beginning
1021  _Insert(_Unchecked_begin(), _STD forward<_Ty>(_Val));
1022  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_begin()
Definition: list:1139
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::push_front ( const _Ty &  _Val)
inline
1282  { // insert element at beginning
1284  }
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_begin()
Definition: list:1139
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
template<class _Ty, class _Alloc = allocator<_Ty>>
reverse_iterator list< _Ty, _Alloc >::rbegin ( )
inline
1173  { // return iterator for beginning of reversed mutable sequence
1174  return (reverse_iterator(end()));
1175  }
iterator end() _NOEXCEPT
Definition: list:1129
_STD reverse_iterator< iterator > reverse_iterator
Definition: list:888
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reverse_iterator list< _Ty, _Alloc >::rbegin ( ) const
inline
1178  { // return iterator for beginning of reversed nonmutable sequence
1179  return (const_reverse_iterator(end()));
1180  }
iterator end() _NOEXCEPT
Definition: list:1129
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: list:889
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::remove ( const _Ty &  _Val)
inline
1600  { // erase each element matching _Val
1601  iterator _Val_it = end();
1602 
1603  for (iterator _First = begin(); _First != end(); )
1604  if (*_First == _Val)
1605  if (_STD addressof(*_First) == _STD addressof(_Val))
1606  _Val_it = _First++;
1607  else
1608  _First = erase(_First);
1609  else
1610  ++_First;
1611 
1612  if (_Val_it != end())
1613  erase(_Val_it);
1614  }
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
Definition: xutility:563
_In_ int _Val
Definition: vcruntime_string.h:62
iterator begin() _NOEXCEPT
Definition: list:1117
iterator end() _NOEXCEPT
Definition: list:1129
iterator erase(const_iterator _Where)
Definition: list:1465
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr1 >
void list< _Ty, _Alloc >::remove_if ( _Pr1  _Pred)
inline
1618  { // erase each element satisfying _Pred
1619  _Remove_if(_Pred);
1620  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
void _Remove_if(_Pr1 &_Pred)
Definition: list:1623
template<class _Ty, class _Alloc = allocator<_Ty>>
reverse_iterator list< _Ty, _Alloc >::rend ( )
inline
1183  { // return iterator for end of reversed mutable sequence
1184  return (reverse_iterator(begin()));
1185  }
iterator begin() _NOEXCEPT
Definition: list:1117
_STD reverse_iterator< iterator > reverse_iterator
Definition: list:888
template<class _Ty, class _Alloc = allocator<_Ty>>
const_reverse_iterator list< _Ty, _Alloc >::rend ( ) const
inline
1188  { // return iterator for end of reversed nonmutable sequence
1189  return (const_reverse_iterator(begin()));
1190  }
iterator begin() _NOEXCEPT
Definition: list:1117
_STD reverse_iterator< const_iterator > const_reverse_iterator
Definition: list:889
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::resize ( size_type  _Newsize)
inline
1213  { // determine new length, padding with _Ty() elements as needed
1214  if (this->_Mysize() < _Newsize)
1215  { // pad to make larger
1216  size_type _Count = 0;
1217  _TRY_BEGIN
1218  for (; this->_Mysize() < _Newsize; ++_Count)
1220  _CATCH_ALL
1221  for (; 0 < _Count; --_Count)
1222  pop_back(); // undo inserts
1223  _RERAISE;
1224  _CATCH_END
1225  }
1226  else
1227  while (_Newsize < this->_Mysize())
1228  pop_back();
1229  }
void pop_back()
Definition: list:1296
unsigned int _Count
Definition: xcomplex:668
size_type & _Mysize() _NOEXCEPT
Definition: list:790
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
_Unchecked_iterator _Unchecked_end()
Definition: list:1151
_Mybase::size_type size_type
Definition: list:873
void _Insert(_Unchecked_const_iterator _Where, _Valty &&..._Val)
Definition: list:1059
#define _CATCH_ALL
Definition: xstddef:62
#define _RERAISE
Definition: xstddef:74
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::resize ( size_type  _Newsize,
const _Ty &  _Val 
)
inline
1232  { // determine new length, padding with _Val elements as needed
1233  if (this->_Mysize() < _Newsize)
1234  _Insert_n(_Unchecked_end(), _Newsize - this->_Mysize(), _Val);
1235  else
1236  while (_Newsize < this->_Mysize())
1237  pop_back();
1238  }
void pop_back()
Definition: list:1296
size_type & _Mysize() _NOEXCEPT
Definition: list:790
_In_ int _Val
Definition: vcruntime_string.h:62
_Unchecked_iterator _Unchecked_end()
Definition: list:1151
void _Insert_n(_Unchecked_const_iterator _Where, size_type _Count, const _Ty &_Val)
Definition: list:1887
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::reverse ( )
inline
1755  { // reverse sequence
1756  const _Nodeptr _Phead = this->_Myhead();
1757  _Nodeptr _Pnode = _Phead;
1758 
1759  for (; ; )
1760  { // flip pointers in a node
1761  const _Nodeptr _Pnext = this->_Nextnode(_Pnode);
1762  this->_Nextnode(_Pnode) = this->_Prevnode(_Pnode);
1763  this->_Prevnode(_Pnode) = _Pnext;
1764 
1765  if (_Pnext == _Phead)
1766  break;
1767  _Pnode = _Pnext;
1768  }
1769  }
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584
template<class _Ty, class _Alloc = allocator<_Ty>>
size_type list< _Ty, _Alloc >::size ( ) const
inline
1241  { // return length of sequence
1242  return (this->_Mysize());
1243  }
size_type & _Mysize() _NOEXCEPT
Definition: list:790
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::sort ( )
inline
1712  { // order sequence, using operator<
1713  sort(less<>());
1714  }
void sort()
Definition: list:1711
Definition: xstddef:231
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::sort ( _Pr2  _Pred)
inline
1718  { // order sequence, using _Pred
1719  _Sort(begin(), end(), _Pred, this->_Mysize());
1720  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
size_type & _Mysize() _NOEXCEPT
Definition: list:790
iterator _Sort(iterator _First, iterator _Last, _Pr2 &_Pred, size_type _Size)
Definition: list:1723
iterator begin() _NOEXCEPT
Definition: list:1117
iterator end() _NOEXCEPT
Definition: list:1129
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt _Right 
)
inline
1530  { // splice all of _Right at _Where
1531  if (this != &_Right && !_Right.empty())
1532  { // worth splicing, do it
1533  _Splice(_Where, _Right, _Right.begin(), _Right.end(),
1534  _Right._Mysize());
1535  }
1536  }
void _Splice(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1771
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt &&  _Right 
)
inline
1539  { // splice all of _Right at _Where
1540  splice(_Where, (_Myt&)_Right);
1541  }
list< _Ty, _Alloc > _Myt
Definition: list:866
void splice(const_iterator _Where, _Myt &_Right)
Definition: list:1529
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First 
)
inline
1545  { // splice _Right [_First, _First + 1) at _Where
1546  #if _ITERATOR_DEBUG_LEVEL == 2
1547  if (_First == _Right.end())
1548  _DEBUG_ERROR("list splice iterator outside range");
1549  else
1550 
1551  #else /* _ITERATOR_DEBUG_LEVEL == 2 */
1552  if (_First != _Right.end())
1553  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
1554 
1555  { // element exists, try splice
1556  const_iterator _Last = _First;
1557  ++_Last;
1558  if (this != &_Right
1559  || (_Where != _First && _Where != _Last))
1560  _Splice(_Where, _Right, _First, _Last, 1);
1561  }
1562  }
_Mybase::const_iterator const_iterator
Definition: list:881
#define _DEBUG_ERROR(mesg)
Definition: xutility:32
void _Splice(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1771
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt &&  _Right,
const_iterator  _First 
)
inline
1566  { // splice _Right [_First, _First + 1) at _Where
1567  splice(_Where, (_Myt&)_Right, _First);
1568  }
list< _Ty, _Alloc > _Myt
Definition: list:866
void splice(const_iterator _Where, _Myt &_Right)
Definition: list:1529
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::splice ( const_iterator  _Where,
_Myt _Right,
const_iterator  _First,
const_iterator  _Last 
)
inline
1572  { // splice _Right [_First, _Last) at _Where
1573  if (_First != _Last && (this != &_Right || _Where != _Last))
1574  { // worth splicing, do it
1575  size_type _Count = 0;
1576 
1577  if (this == &_Right)
1578  ; // just rearrange this list
1579  else if (_First == _Right.begin() && _Last == _Right.end())
1580  _Count = _Right._Mysize(); // splice in whole list
1581  else
1582  { // count nodes and check for knot
1583  const_iterator _Next = _First;
1584 
1585  for (; _Next != _Last; ++_Next, (void)++_Count)
1586  if (_Next == _Right.end())
1587  _Xlength_error("list<T> bad splice");
1588  }
1589  _Splice(_Where, _Right, _First, _Last, _Count);
1590  }
1591  }
unsigned int _Count
Definition: xcomplex:668
_Mybase::size_type size_type
Definition: list:873
_Mybase::const_iterator const_iterator
Definition: list:881
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *unexpected_handler)()
void _Splice(const_iterator _Where, _Myt &_Right, const_iterator _First, const_iterator _Last, size_type _Count)
Definition: list:1771
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3591
_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
1595  { // splice _Right [_First, _Last) at _Where
1596  splice(_Where, (_Myt&)_Right, _First, _Last);
1597  }
list< _Ty, _Alloc > _Myt
Definition: list:866
void splice(const_iterator _Where, _Myt &_Right)
Definition: list:1529
_FwdIt _Last
Definition: algorithm:1936
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::swap ( _Myt _Right)
inline
1519  { // exchange contents with _Right
1520  if (this != &_Right)
1521  { // (maybe) swap allocators, swap control information
1522  _Pocs(this->_Getal(), _Right._Getal());
1523  this->_Swap_all(_Right);
1524  _Swap_adl(this->_Myhead(), _Right._Myhead());
1525  _STD swap(this->_Mysize(), _Right._Mysize());
1526  }
1527  }
size_type & _Mysize() _NOEXCEPT
Definition: list:790
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
void _Swap_adl(_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:56
_Alty & _Getal() _NOEXCEPT
Definition: list:760
void swap(_Myt &_Right) _NOEXCEPT_OP(_Alty
Definition: list:1517
void _Pocs(_Alty &_Left, _Alty &_Right, true_type) _NOEXCEPT
Definition: xmemory0:1069
constexpr const _Ty &() _Right
Definition: algorithm:3591
void _Swap_all(_Myt &_Right)
Definition: list:755
template<class _Ty, class _Alloc = allocator<_Ty>>
void list< _Ty, _Alloc >::unique ( )
inline
1633  { // erase each element matching previous
1634  unique(equal_to<>());
1635  }
Definition: xstddef:217
void unique()
Definition: list:1632
template<class _Ty, class _Alloc = allocator<_Ty>>
template<class _Pr2 >
void list< _Ty, _Alloc >::unique ( _Pr2  _Pred)
inline
1639  { // erase each element satisfying _Pred with previous
1640  const _Nodeptr _Phead = this->_Myhead();
1641  _Nodeptr _Pprev = this->_Nextnode(_Phead);
1642  _Nodeptr _Pnode = this->_Nextnode(_Pprev);
1643 
1644  while (_Pnode != _Phead)
1645  if (_Pred(_Pprev->_Myval, _Pnode->_Myval))
1646  { // match, remove it
1647  const _Nodeptr _Perase = _Pnode;
1648  _Pnode = this->_Nextnode(_Pnode);
1649 
1650  this->_Nextnode(_Pprev) = _Pnode;
1651  this->_Prevnode(_Pnode) = _Pprev;
1652  this->_Freenode(_Perase);
1653 
1654  --this->_Mysize();
1655  }
1656  else
1657  { // no match, advance
1658  _Pprev = _Pnode;
1659  _Pnode = this->_Nextnode(_Pnode);
1660  }
1661  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
size_type & _Mysize() _NOEXCEPT
Definition: list:790
_Nodeptr & _Myhead() _NOEXCEPT
Definition: list:780
static _Nodepref _Prevnode(_Nodeptr _Pnode)
Definition: list:589
void _Freenode(_Nodeptr _Pnode)
Definition: list:847
_Mybase::_Nodeptr _Nodeptr
Definition: list:869
static _Nodepref _Nextnode(_Nodeptr _Pnode)
Definition: list:584

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