27#ifndef _STLP_INTERNAL_SLIST_H
28#define _STLP_INTERNAL_SLIST_H
30#ifndef _STLP_INTERNAL_ALGOBASE_H
34#ifndef _STLP_INTERNAL_ALLOC_H
38#ifndef _STLP_INTERNAL_ITERATOR_H
42#ifndef _STLP_INTERNAL_CONSTRUCT_H
46#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
50#ifndef _STLP_INTERNAL_SLIST_BASE_H
79template <
class _Tp,
class _Traits>
83 typedef typename _Traits::pointer
pointer;
124#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
126template <
class _Tp,
class _Traits>
137#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
139template <
class _Tp,
class _Traits>
147template <
class _Tp,
class _Alloc>
164#if !defined (_STLP_NO_MOVE_SEMANTIC)
177 _STLP_STD::_Destroy(&__next->
_M_data);
189#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
190# define slist _STLP_PTR_IMPL_NAME(slist)
191#elif defined (_STLP_DEBUG)
192# define slist _STLP_NON_DBG_NAME(slist)
197template <
class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
205template <
class _Tp,
class _Alloc,
class _BinaryPredicate>
208template <
class _Tp,
class _Alloc,
class _StrictWeakOrdering>
210 _StrictWeakOrdering __comp);
212template <
class _Tp,
class _Alloc,
class _StrictWeakOrdering>
219template <
class _Tp,
class _Alloc>
221#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (slist)
249#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
254 _Node* __node = this->_M_head.allocate(1);
263#if defined(_STLP_DONT_SUP_DFLT_PARAM)
265 _Node* __node = this->_M_head.allocate(1);
267 _STLP_STD::_Construct(&__node->_M_data);
279#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
288#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
303#if defined (_STLP_MEMBER_TEMPLATES)
306 template <
class _InputIterator>
307 slist(_InputIterator __first, _InputIterator
__last,
311# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
313 template <
class _InputIterator>
314 slist(_InputIterator __first, _InputIterator
__last)
333#if !defined (_STLP_NO_MOVE_SEMANTIC)
353#if defined (_STLP_MEMBER_TEMPLATES)
355 template <
class _InputIterator>
356 void assign(_InputIterator __first, _InputIterator
__last) {
358 _M_assign_dispatch(__first,
__last, _Integral());
362 template <
class _Integer>
363 void _M_assign_dispatch(_Integer
__n, _Integer
__val,
368 template <
class _InputIter>
369 void _M_assign_dispatch(_InputIter __first, _InputIter
__last,
375 _Node_base* __node = this->_M_head._M_data._M_next;
376 while (__node != 0 && __first !=
__last) {
379 __node = __node->_M_next;
385 this->_M_erase_after(__prev, 0);
390 _Node_base* __node = this->_M_head._M_data._M_next;
391 while (__node != 0 && __first !=
__last) {
394 __node = __node->_M_next;
400 this->_M_erase_after(__prev, 0);
428 bool empty()
const {
return this->_M_head._M_data._M_next == 0; }
431 { this->_M_head.swap(__x._M_head); }
432#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
433 void _M_swap_workaround(
_Self& __x) {
swap(__x); }
439#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
447#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
453 this->_M_head._M_data._M_next = __node->_M_next;
454 _STLP_STD::_Destroy(&__node->_M_data);
455 this->_M_head.deallocate(__node, 1);
468#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
476#if defined (_STLP_DONT_SUP_DFLT_PARAM)
488#if defined (_STLP_MEMBER_TEMPLATES)
490 template <
class _InIter>
492 _InIter __first, _InIter
__last) {
497 template <
class _Integer>
503 template <
class _InIter>
505 _InIter __first, _InIter
__last,
511 while (__first !=
__last) {
519 while (__first !=
__last) {
525#if defined (_STLP_MEMBER_TEMPLATES)
527 template <
class _InIter>
529 _InIter __first, _InIter
__last) {
534 template <
class _Integer>
540 template <
class _InIter>
542 _InIter __first, _InIter
__last,
548 while (__first !=
__last) {
561#if defined (_STLP_MEMBER_TEMPLATES)
563 template <
class _InIter>
565 _InIter __first, _InIter
__last) {
570 template <
class _Integer>
577 template <
class _InIter>
579 _InIter __first, _InIter
__last,
585 while (__first !=
__last) {
600#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
608#if defined (_STLP_DONT_SUP_DFLT_PARAM)
618#if defined (_STLP_MEMBER_TEMPLATES)
621 template <
class _InIter>
634#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
643#if defined (_STLP_DONT_SUP_DFLT_PARAM)
654#if defined (_STLP_MEMBER_TEMPLATES)
657 template <
class _InIter>
672 {
return iterator(this->_M_erase_after(__pos._M_node)); }
674 {
return iterator(this->_M_erase_after(__before_first._M_node,
__last._M_node)); }
681#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
687#if defined (_STLP_DONT_SUP_DFLT_PARAM)
692 { this->_M_erase_after(&this->_M_head._M_data, 0); }
699 if (__before_first != __before_last) {
702 __before_first._M_node, __before_last._M_node);
716 __prev._M_node, __prev._M_node->_M_next);
738 if (__x._M_head._M_data._M_next) {
741 &__x._M_head._M_data,
782 if (this->_M_head._M_data._M_next)
792#if defined (_STLP_MEMBER_TEMPLATES)
793 template <
class _Predicate>
796 while (__cur->_M_next) {
798 this->_M_erase_after(__cur);
800 __cur = __cur->_M_next;
804 template <
class _BinaryPredicate>
808 template <
class _StrictWeakOrdering>
809 void merge(
_Self& __x, _StrictWeakOrdering __comp)
812 template <
class _StrictWeakOrdering>
813 void sort(_StrictWeakOrdering __comp)
825#if !defined (_STLP_LINK_TIME_INSTANTIATION)
829#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
833#if defined (_STLP_DEBUG)
839template <
class _Tp,
class _Alloc>
848 while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
852 return __i1 == __end1 && __i2 == __end2;
855#define _STLP_EQUAL_OPERATOR_SPECIALIZED
856#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
857#define _STLP_TEMPLATE_CONTAINER slist<_Tp, _Alloc>
859#undef _STLP_TEMPLATE_CONTAINER
860#undef _STLP_TEMPLATE_HEADER
861#undef _STLP_EQUAL_OPERATOR_SPECIALIZED
863#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
864# if !defined (_STLP_NO_MOVE_SEMANTIC)
865template <
class _Tp,
class _Alloc>
874template <
class _Tp,
class _Alloc>
878 _Container* _M_container;
879 typename _Container::iterator _M_iter;
883 typedef void value_type;
884 typedef void difference_type;
889 : _M_container(&__x) {
890 if (__i == __x.begin())
891 _M_iter = __x.before_begin();
893 _M_iter = __x.previous(__i);
897 operator = (
const typename _Container::value_type&
__val) {
898 _M_iter = _M_container->insert_after(_M_iter,
__val);
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _InputIter _Predicate __pred
_STLP_INLINE_LOOP _ForwardIter remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred)
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_CONVERT_ALLOCATOR(__a, _Tp)
#define _STLP_FORCE_ALLOCATORS(a, y)
complex< _Tp > _STLP_CALL operator*(const _Tp &__x, const complex< _Tp > &__z)
void _Copy_Construct(_Tp *__p, const _Tp &__val)
#define _STLP_DEFAULT_CONSTRUCTED(_TTp)
#define _STLP_DEFINE_ARROW_OPERATOR
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)
void _Slist_merge(slist< _Tp, _Alloc > &__that, slist< _Tp, _Alloc > &__x, _StrictWeakOrdering __comp)
_STLP_MOVE_TO_PRIV_NAMESPACE void _Slist_unique(slist< _Tp, _Alloc > &__that, _BinaryPredicate __binary_pred)
void _Slist_sort(slist< _Tp, _Alloc > &__that, _StrictWeakOrdering __comp)
_Slist_node_base * __slist_make_link(_Slist_node_base *__prev_node, _Slist_node_base *__new_node)
void get(int argc, const char *argv[])
static size_t _STLP_CALL size(_Slist_node_base *__node)
static _Slist_node_base *_STLP_CALL __previous(_Slist_node_base *__head, const _Slist_node_base *__node)
static void _STLP_CALL __splice_after(_Slist_node_base *__pos, _Slist_node_base *__before_first, _Slist_node_base *__before_last)
static _Slist_node_base *_STLP_CALL __reverse(_Slist_node_base *__node)
_Slist_node_base * _M_erase_after(_Slist_node_base *__pos)
allocator_type get_allocator() const
_Slist_base< _Tp, _Alloc > _Self
_STLP_alloc_proxy< _Slist_node_base, _Node, _M_node_allocator_type > _AllocProxy
_Alloc_traits< _Node, _Alloc >::allocator_type _M_node_allocator_type
_Slist_base(__move_source< _Self > src)
_Slist_iterator< _Tp, _Traits > _Self
_Slist_node< value_type > _Node
_Slist_iterator< _Tp, _NonConstTraits > iterator
_Traits::reference reference
_Slist_iterator(_Slist_node_base *__x)
_Traits::value_type value_type
bool operator==(const_iterator __y) const
_Traits::_NonConstTraits _NonConstTraits
_Slist_iterator(const iterator &__x)
ptrdiff_t difference_type
bool operator!=(const_iterator __y) const
forward_iterator_tag iterator_category
_STLP_DEFINE_ARROW_OPERATOR _Self & operator++()
_Traits::_ConstTraits _ConstTraits
_Slist_iterator< _Tp, _ConstTraits > const_iterator
reference operator*() const
_Self & operator=(const _Self &__x)
void _M_splice_range(_Node_base *__pos, const value_type *__first, const value_type *__last)
const_iterator end() const
const value_type * const_pointer
void insert(iterator __pos, const_iterator __first, const_iterator __last)
_STLP_PRIV _Slist_iterator< _Tp, _Nonconst_traits< _Tp > > iterator
iterator erase_after(iterator __before_first, iterator __last)
void resize(size_type new_size, const value_type &__x=_Tp())
_Node * _M_insert_after(_Node_base *__pos, const value_type &__x=_Tp())
slist(const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
void insert(iterator __pos, const value_type *__first, const value_type *__last)
iterator erase(iterator __pos)
_Node * _M_create_node(const value_type &__x=_Tp())
void splice_after(iterator __pos, _Self &__x, iterator __before_first, iterator __before_last)
void splice(iterator __pos, _Self &__x, iterator __first, iterator __last)
void _M_fill_assign(size_type __n, const _Tp &__val)
iterator erase(iterator __first, iterator __last)
_Base::allocator_type allocator_type
const value_type & const_reference
void _M_splice_after_range(_Node_base *__pos, const_iterator __first, const_iterator __last)
size_type max_size() const
const_reference front() const
void insert_after(iterator __pos, const value_type *__first, const value_type *__last)
void assign(const_pointer __first, const_pointer __last)
void _M_insert_after_range(_Node_base *__pos, const_iterator __first, const_iterator __last)
iterator insert_after(iterator __pos, const value_type &__x=_Tp())
slist(const value_type *__first, const value_type *__last, const allocator_type &__a=allocator_type())
slist(size_type __n, const value_type &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp), const allocator_type &__a=allocator_type())
slist(__move_source< _Self > src)
iterator insert(iterator __pos, const value_type &__x=_Tp())
void push_front(const value_type &__x=_Tp())
_STLP_PRIV _Slist_node< _Tp > _Node
iterator erase_after(iterator __pos)
void _M_splice_range(_Node_base *__pos, const_iterator __first, const_iterator __last)
forward_iterator_tag _Iterator_category
const_iterator before_begin() const
allocator_type get_allocator() const
void assign(const_iterator __first, const_iterator __last)
void assign(size_type __n, const _Tp &__val)
const_iterator begin() const
void _M_insert_after_range(_Node_base *__pos, const value_type *__first, const value_type *__last)
void insert_after(iterator __pos, size_type __n, const value_type &__x)
_STLP_PRIV _Slist_node_base _Node_base
void _M_splice_after_range(_Node_base *__pos, const value_type *__first, const value_type *__last)
void splice_after(iterator __pos, _Self &__x)
void _M_insert_after_fill(_Node_base *__pos, size_type __n, const value_type &__x)
void insert_after(iterator __pos, const_iterator __first, const_iterator __last)
void insert(iterator __pos, size_type __n, const value_type &__x)
_STLP_PRIV _Slist_iterator< _Tp, _Const_traits< _Tp > > const_iterator
void splice(iterator __pos, _Self &__x)
slist(const allocator_type &__a=allocator_type())
slist< _Tp, _Alloc > _Self
_STLP_PRIV _Slist_base< _Tp, _Alloc > _Base
void splice(iterator __pos, _Self &__x, iterator __i)
void splice_after(iterator __pos, _Self &__x, iterator __prev)
iterator previous(const_iterator __pos)
const_iterator previous(const_iterator __pos) const
ptrdiff_t difference_type
__kernel_ptrdiff_t ptrdiff_t
#define _STLP_UNWIND(action)
#define __TRIVIAL_STUFF(__type)
#define _STLP_MOVE_TO_STD_NAMESPACE
#define __STATIC_CAST(__x, __y)
#define _STLP_ALLOCATOR_TYPE_DFL
#define __CONST_CAST(__x, __y)
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE
GLsizei const GLvoid * pointer
_Rebind_type::other allocator_type
_Slist_iterator_base(_Slist_node_base *__x)
_Slist_node_base * _M_node
ptrdiff_t difference_type
forward_iterator_tag iterator_category
_Slist_node_base * _M_next
__bool2type< pod >::_Ret is_POD_type
__bool2type< trivial_destructor >::_Ret has_trivial_destructor
__bool2type< trivial_constructor >::_Ret has_trivial_default_constructor
__bool2type< trivial_copy >::_Ret has_trivial_copy_constructor
__bool2type< trivial_assign >::_Ret has_trivial_assignment_operator
bool operator==(const TKeyDef &t1, const TKeyDef &t2)