22 #ifndef _STLP_INTERNAL_SLIST_H 26 #ifndef _STLP_CARRAY_H 30 #ifndef _STLP_RANGE_ERRORS_H 34 #if defined (_STLP_NESTED_TYPE_PARAM_BUG) 35 # define size_type size_t 42 template <
class _Tp,
class _Alloc>
47 while (__cur != __last_node) {
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) 69 template <
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);
90 template <
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);
105 template <
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);
118 template <
class _Tp,
class _Alloc>
121 while (__cur && __cur->_M_next) {
123 this->_M_erase_after(__cur);
125 __cur = __cur->_M_next;
133 template <
class _Tp,
class _Alloc,
class _BinaryPredicate>
137 if (__ite != __that.
end()) {
138 while (__ite._M_node->_M_next) {
147 template <
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)
183 template <
class _Tp,
class _Alloc,
class _StrictWeakOrdering>
185 if (!__that.
begin()._M_node || !__that.
begin()._M_node->_M_next)
192 while (!__that.
empty()) {
193 __carry.splice_after(__carry.before_begin(), __that, __that.
before_begin());
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) iterator insert_after(iterator __pos, const value_type &__x=_Tp())
_Slist_node_base * _M_erase_after(_Slist_node_base *__pos)
#define __STATIC_CAST(__x, __y)
_STLP_INLINE_LOOP _InputIter _Predicate __pred
_Slist_node_base * _M_next
_STLP_PRIV _Slist_iterator< value_type, _Const_traits< value_type > > const_iterator
#define _STLP_MOVE_TO_PRIV_NAMESPACE
void resize(size_type new_size, const value_type &__x=_Tp())
_Self & operator=(const _Self &__x)
_STLP_PRIV _Slist_node_base _Node_base
#define _STLP_MOVE_TO_STD_NAMESPACE
void remove(const _Tp &__val)
_STLP_PRIV _Slist_node< value_type > _Node
_STLP_INLINE_LOOP _InputIter const _Tp & __val
iterator erase_after(iterator __pos)
void _Slist_merge(slist< _Tp, _Alloc > &__that, slist< _Tp, _Alloc > &__x, _StrictWeakOrdering __comp)
void _Destroy(_Tp *__pointer)
_STLP_MOVE_TO_PRIV_NAMESPACE void _Slist_unique(slist< _Tp, _Alloc > &__that, _BinaryPredicate __pred)
_STLP_PRIV _Slist_iterator< _Tp, _Nonconst_traits< _Tp > > iterator
_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_overflow_error(const char *__msg)
allocator_type get_allocator() const
#define __CONST_CAST(__x, __y)
#define _STLP_END_NAMESPACE
void _Slist_sort(slist< _Tp, _Alloc > &__that, _StrictWeakOrdering __comp)
void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp &__val, const input_iterator_tag &, _Distance *)
void splice_after(iterator __pos, _Self &__x, iterator __before_first, iterator __before_last)
#define _STLP_BEGIN_NAMESPACE
void _M_fill_assign(size_type __n, const _Tp &__val)
#define _STLP_VERBOSE_ASSERT(expr, diagnostic)