29#ifndef _STLP_INTERNAL_LIST_H
37#ifndef _STLP_RANGE_ERRORS_H
45#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
46template <
class _Dummy>
50 if (__position !=
__last) {
52 __last->_M_prev->_M_next = __position;
57 _Node_base* __tmp = __position->
_M_prev;
65template <
class _Tp,
class _Alloc>
69#
if defined (__BORLANDC__)
72 __cur != &(_M_node._M_data)) {
75 _STLP_STD::_Destroy(&__tmp->
_M_data);
76 this->_M_node.deallocate(__tmp, 1);
78 _M_node._M_data._M_next = &_M_node._M_data;
79 _M_node._M_data._M_prev = &_M_node._M_data;
82#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
83# define size_type size_t
86#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
87# define list _STLP_PTR_IMPL_NAME(list)
88#elif defined (_STLP_DEBUG)
89# define list _STLP_NON_DBG_NAME(list)
94template <
class _Tp,
class _Alloc>
98 for ( ; __i !=
end() && __len < __new_size; ++__i, ++__len);
100 if (__len == __new_size)
106template <
class _Tp,
class _Alloc>
113 while (__first1 != __last1 && __first2 != __last2)
114 *__first1++ = *__first2++;
115 if (__first2 == __last2)
116 erase(__first1, __last1);
118 insert(__last1, __first2, __last2);
123template <
class _Tp,
class _Alloc>
126 for ( ; __i !=
end() &&
__n > 0; ++__i, --
__n)
138template <
class _Tp,
class _Alloc,
class _Predicate>
141 _Literator __first = __that.
begin();
143 while (__first !=
__last) {
144 _Literator __next = __first;
151template <
class _Tp,
class _Alloc,
class _BinaryPredicate>
154 _Literator __first = __that.
begin();
156 if (__first ==
__last)
return;
157 _Literator __next = __first;
158 while (++__next !=
__last) {
159 if (__binary_pred(*__first, *__next))
160 __that.
erase(__next);
167template <
class _Tp,
class _Alloc,
class _StrictWeakOrdering>
169 _StrictWeakOrdering __comp) {
171 _Literator __first1 = __that.
begin();
172 _Literator __last1 = __that.
end();
173 _Literator __first2 = __x.
begin();
174 _Literator __last2 = __x.
end();
176 while (__first1 != __last1 && __first2 != __last2) {
177 if (__comp(*__first2, *__first1)) {
179 _Literator __next = __first2;
186 if (__first2 != __last2)
190 while (__first1 != __last1 && __first2 != __last2) {
191 if (__comp(*__first2, *__first1)) {
193 __first1 = __that.
insert(__first1, *__first2);
198 if (__first2 != __last2) {
199 __that.
insert(__first1, __first2, __last2);
205template <
class _Tp,
class _Alloc,
class _StrictWeakOrdering>
208 if (__that._M_node._M_data._M_next == &__that._M_node._M_data ||
209 __that._M_node._M_data._M_next->_M_next == &__that._M_node._M_data)
216 while (!__that.
empty()) {
217 __carry.splice(__carry.begin(), __that, __that.
begin());
220 _S_merge(__counter[__i], __carry, __comp);
221 __carry.swap(__counter[__i++]);
223 __carry.swap(__counter[__i]);
233 for (
int __i = 1; __i <
__fill; ++__i)
234 _S_merge(__counter[__i], __counter[__i - 1], __comp);
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _InputIter _Predicate __pred
void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val, const input_iterator_tag &, _Distance *)
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_VERBOSE_ASSERT(expr, diagnostic)
void _S_sort(list< _Tp, _Alloc > &__that, _StrictWeakOrdering __comp)
_STLP_MOVE_TO_PRIV_NAMESPACE void _S_remove_if(list< _Tp, _Alloc > &__that, _Predicate __pred)
void _S_merge(list< _Tp, _Alloc > &__that, list< _Tp, _Alloc > &__x, _StrictWeakOrdering __comp)
void _S_unique(list< _Tp, _Alloc > &__that, _BinaryPredicate __binary_pred)
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_overflow_error(const char *__msg)
static void _STLP_CALL _Transfer(_Node_base *__pos, _Node_base *__first, _Node_base *__last)
iterator erase(iterator __pos)
allocator_type get_allocator() const
_STLP_PRIV _List_iterator< _Tp, _Const_traits< _Tp > > const_iterator
_STLP_PRIV _List_iterator< _Tp, _Nonconst_traits< _Tp > > iterator
_Self & operator=(const _Self &__x)
void resize(size_type __new_size, const_reference __x=value_type())
iterator insert(iterator __pos, const_reference __x=value_type())
void _M_fill_assign(size_type __n, const_reference __val)
static const WCHAR empty[]
#define _STLP_MOVE_TO_STD_NAMESPACE
#define __STATIC_CAST(__x, __y)
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
_List_node_base * _M_prev
_List_node_base * _M_next