22#ifndef _STLP_INTERNAL_SLIST_H
30#ifndef _STLP_RANGE_ERRORS_H
34#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
35# define size_type size_t
42template <
class _Tp,
class _Alloc>
47 while (__cur != __last_node) {
50 _STLP_STD::_Destroy(&__tmp->
_M_data);
51 _M_head.deallocate(__tmp,1);
53 __before_first->
_M_next = __last_node;
57#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
58# define slist _STLP_PTR_IMPL_NAME(slist)
59#elif defined (_STLP_DEBUG)
60# define slist _STLP_NON_DBG_NAME(slist)
69template <
class _Tp,
class _Alloc>
73 _Node_base* __n1 = this->_M_head._M_data._M_next;
74 const _Node_base* __n2 = __x._M_head._M_data._M_next;
75 while (__n1 && __n2) {
82 this->_M_erase_after(__p1, 0);
90template <
class _Tp,
class _Alloc>
93 _Node_base* __node = this->_M_head._M_data._M_next;
94 for ( ; __node != 0 &&
__n > 0 ; --
__n) {
97 __node = __node->_M_next;
100 _M_insert_after_fill(__prev,
__n,
__val);
102 this->_M_erase_after(__prev, 0);
105template <
class _Tp,
class _Alloc>
108 while (__cur->_M_next != 0 && __len > 0) {
110 __cur = __cur->_M_next;
113 this->_M_erase_after(__cur, 0);
115 _M_insert_after_fill(__cur, __len, __x);
118template <
class _Tp,
class _Alloc>
121 while (__cur && __cur->_M_next) {
123 this->_M_erase_after(__cur);
125 __cur = __cur->_M_next;
133template <
class _Tp,
class _Alloc,
class _BinaryPredicate>
137 if (__ite != __that.
end()) {
138 while (__ite._M_node->_M_next) {
147template <
class _Tp,
class _Alloc,
class _StrictWeakOrdering>
149 _StrictWeakOrdering __comp) {
154 while (__ite._M_node->_M_next && !__x.
empty()) {
157 _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
168 while (__i1._M_node->_M_next && __i2._M_node) {
169 if (__comp(
__STATIC_CAST(_Node*, __i1._M_node->_M_next)->_M_data, *__i2)) {
171 _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
183template <
class _Tp,
class _Alloc,
class _StrictWeakOrdering>
185 if (!__that.
begin()._M_node || !__that.
begin()._M_node->_M_next)
192 while (!__that.
empty()) {
197 __carry.
swap(__counter[__i]);
200 __carry.
swap(__counter[__i]);
210 for (
int __i = 1; __i <
__fill; ++__i)
223#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
_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)
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_overflow_error(const char *__msg)
void _Slist_merge(slist< _Tp, _Alloc > &__that, slist< _Tp, _Alloc > &__x, _StrictWeakOrdering __comp)
void _Slist_sort(slist< _Tp, _Alloc > &__that, _StrictWeakOrdering __comp)
_STLP_MOVE_TO_PRIV_NAMESPACE void _Slist_unique(slist< _Tp, _Alloc > &__that, _BinaryPredicate __pred)
_Slist_node_base * _M_erase_after(_Slist_node_base *__pos)
_Self & operator=(const _Self &__x)
_STLP_PRIV _Slist_iterator< _Tp, _Nonconst_traits< _Tp > > iterator
void resize(size_type new_size, const value_type &__x=_Tp())
void remove(const _Tp &__val)
void splice_after(iterator __pos, _Self &__x, iterator __before_first, iterator __before_last)
void _M_fill_assign(size_type __n, const _Tp &__val)
iterator insert_after(iterator __pos, const value_type &__x=_Tp())
_STLP_PRIV _Slist_node< _Tp > _Node
iterator erase_after(iterator __pos)
allocator_type get_allocator() const
_STLP_PRIV _Slist_node_base _Node_base
_STLP_PRIV _Slist_iterator< _Tp, _Const_traits< _Tp > > const_iterator
static const WCHAR empty[]
#define _STLP_MOVE_TO_STD_NAMESPACE
#define __STATIC_CAST(__x, __y)
#define __CONST_CAST(__x, __y)
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
_Slist_node_base * _M_next