ReactOS 0.4.15-dev-5664-g3bf4ef6
_list.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) 1994
4 * Hewlett-Packard Company
5 *
6 * Copyright (c) 1996,1997
7 * Silicon Graphics Computer Systems, Inc.
8 *
9 * Copyright (c) 1997
10 * Moscow Center for SPARC Technology
11 *
12 * Copyright (c) 1999
13 * Boris Fomitchev
14 *
15 * This material is provided "as is", with absolutely no warranty expressed
16 * or implied. Any use is at your own risk.
17 *
18 * Permission to use or copy this software for any purpose is hereby granted
19 * without fee, provided the above notices are retained on all copies.
20 * Permission to modify the code and to distribute modified code is granted,
21 * provided the above notices are retained, and a notice that the code was
22 * modified is included with the above copyright notice.
23 *
24 */
25
26/* NOTE: This is an internal header file, included by other STL headers.
27 * You should not attempt to use it directly.
28 */
29
30#ifndef _STLP_INTERNAL_LIST_IMPL_H
31#define _STLP_INTERNAL_LIST_IMPL_H
32
33#ifndef _STLP_INTERNAL_ALGOBASE_H
34# include <stl/_algobase.h>
35#endif
36
37#ifndef _STLP_INTERNAL_ALLOC_H
38# include <stl/_alloc.h>
39#endif
40
41#ifndef _STLP_INTERNAL_ITERATOR_H
42# include <stl/_iterator.h>
43#endif
44
45#ifndef _STLP_INTERNAL_CONSTRUCT_H
46# include <stl/_construct.h>
47#endif
48
49#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
50# include <stl/_function_base.h>
51#endif
52
54
56
60};
61
62template <class _Dummy>
64public:
66 static void _STLP_CALL _Transfer(_Node_base* __pos,
67 _Node_base* __first, _Node_base* __last);
68};
69
70#if defined (_STLP_USE_TEMPLATE_EXPORT)
72#endif
74
75template <class _Tp>
77public:
80};
81
83 typedef size_t size_type;
86
88
89 _List_iterator_base(_List_node_base* __x) : _M_node(__x) {}
90
91 void _M_incr() { _M_node = _M_node->_M_next; }
92 void _M_decr() { _M_node = _M_node->_M_prev; }
93};
94
95
96template<class _Tp, class _Traits>
98 typedef _Tp value_type;
99 typedef typename _Traits::pointer pointer;
100 typedef typename _Traits::reference reference;
101
103 typedef typename _Traits::_NonConstTraits _NonConstTraits;
105 typedef typename _Traits::_ConstTraits _ConstTraits;
107
110 typedef size_t size_type;
112
115 //copy constructor for iterator and constructor from iterator for const_iterator
117
118 reference operator*() const { return __STATIC_CAST(_Node*, this->_M_node)->_M_data; }
119
121
123 this->_M_incr();
124 return *this;
125 }
127 _Self __tmp = *this;
128 this->_M_incr();
129 return __tmp;
130 }
132 this->_M_decr();
133 return *this;
134 }
136 _Self __tmp = *this;
137 this->_M_decr();
138 return __tmp;
139 }
140 bool operator==(const_iterator __y ) const {
141 return this->_M_node == __y._M_node;
142 }
143 bool operator!=(const_iterator __y ) const {
144 return this->_M_node != __y._M_node;
145 }
146};
147
148#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
150template <class _Tp, class _Traits>
151struct __type_traits<_STLP_PRIV _List_iterator<_Tp, _Traits> > {
157};
159#endif
160
161#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
163template <class _Tp, class _Traits>
164inline _Tp* value_type(const _STLP_PRIV _List_iterator<_Tp, _Traits>&) { return 0; }
166inline ptrdiff_t* distance_type(const _STLP_PRIV _List_iterator_base&) { return 0; }
168#endif
169
170// Base class that encapsulates details of allocators and helps
171// to simplify EH
172
173template <class _Tp, class _Alloc>
175protected:
178 typedef _List_node<_Tp> _Node;
179 typedef _List_base<_Tp, _Alloc> _Self;
181public:
184
187
190
191#if !defined (_STLP_NO_MOVE_SEMANTIC)
194 if (src.get().empty())
195 //We force this to empty.
197 else {
198 src.get()._M_empty_initialize();
200 }
201 }
202#endif
203
205 { clear(); }
206
207 void clear();
208 bool empty() const { return _M_node._M_data._M_next == &_M_node._M_data; }
209
213 }
214
215public:
217};
218
219#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
220# define list _STLP_PTR_IMPL_NAME(list)
221#elif defined (_STLP_DEBUG)
222# define list _STLP_NON_DBG_NAME(list)
223#else
225#endif
226
227template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
228class list;
229
230#if !defined (list)
232#endif
233
234// helper functions to reduce code duplication
235template <class _Tp, class _Alloc, class _Predicate>
236void _S_remove_if(list<_Tp, _Alloc>& __that, _Predicate __pred);
237
238template <class _Tp, class _Alloc, class _BinaryPredicate>
239void _S_unique(list<_Tp, _Alloc>& __that, _BinaryPredicate __binary_pred);
240
241template <class _Tp, class _Alloc, class _StrictWeakOrdering>
243 _StrictWeakOrdering __comp);
244
245template <class _Tp, class _Alloc, class _StrictWeakOrdering>
246void _S_sort(list<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp);
247
248#if !defined (list)
250#endif
251
252template <class _Tp, class _Alloc>
253class list : public _STLP_PRIV _List_base<_Tp, _Alloc>
254#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (list)
255 , public __stlport_class<list<_Tp, _Alloc> >
256#endif
257{
262public:
263 typedef _Tp value_type;
265 typedef const value_type* const_pointer;
268 typedef size_t size_type;
273
274public:
278
280#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
282#else
284#endif
285 _Node* __p = this->_M_node.allocate(1);
286 _STLP_TRY {
287 _Copy_Construct(&__p->_M_data, __x);
288 }
289 _STLP_UNWIND(this->_M_node.deallocate(__p, 1))
290 return __p;
291 }
292
293#if defined (_STLP_DONT_SUP_DFLT_PARAM)
295 _Node* __p = this->_M_node.allocate(1);
296 _STLP_TRY {
297 _STLP_STD::_Construct(&__p->_M_data);
298 }
299 _STLP_UNWIND(this->_M_node.deallocate(__p, 1))
300 return __p;
301 }
302#endif
303
304public:
305#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
307 const allocator_type& __a = allocator_type())
308#else
309 explicit list(size_type __n)
312 list(size_type __n, const_reference __val)
313 : _STLP_PRIV _List_base<_Tp, _Alloc>(allocator_type())
314 { this->insert(begin(), __n, __val); }
315 list(size_type __n, const_reference __val, const allocator_type& __a)
316#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
318 { this->insert(begin(), __n, __val); }
319
320#if defined (_STLP_MEMBER_TEMPLATES)
321 // We don't need any dispatching tricks here, because insert does all of
322 // that anyway.
323 template <class _InputIterator>
324 list(_InputIterator __first, _InputIterator __last,
325 const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
326 : _STLP_PRIV _List_base<_Tp, _Alloc>(__a)
327 { _M_insert(begin(), __first, __last); }
328
329# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
330 template <class _InputIterator>
331 list(_InputIterator __first, _InputIterator __last)
332 : _STLP_PRIV _List_base<_Tp, _Alloc>(allocator_type())
333 { _M_insert(begin(), __first, __last); }
334# endif
335#else /* _STLP_MEMBER_TEMPLATES */
336 list(const value_type* __first, const value_type* __last,
337 const allocator_type& __a = allocator_type())
338 : _STLP_PRIV _List_base<_Tp, _Alloc>(__a)
339 { _M_insert(begin(), __first, __last); }
341 const allocator_type& __a = allocator_type())
342 : _STLP_PRIV _List_base<_Tp, _Alloc>(__a)
343 { _M_insert(begin(), __first, __last); }
344#endif /* _STLP_MEMBER_TEMPLATES */
345
346#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
347 explicit list(const allocator_type& __a = allocator_type())
348#else
349 list()
351 list(const allocator_type& __a)
352#endif
354
356 { _M_insert(begin(), __x.begin(), __x.end()); }
357
358#if !defined (_STLP_NO_MOVE_SEMANTIC)
361#endif
362
363 ~list() {}
364
365 _Self& operator = (const _Self& __x);
366
367 iterator begin() { return iterator(this->_M_node._M_data._M_next); }
368 const_iterator begin() const { return const_iterator(this->_M_node._M_data._M_next); }
369
370 iterator end() { return iterator(&this->_M_node._M_data); }
371 const_iterator end() const { return const_iterator(__CONST_CAST(_Node_base*, &this->_M_node._M_data)); }
372
374 const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
375
377 const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
378
379 size_type size() const {
380 size_type __result = _STLP_STD::distance(begin(), end());
381 return __result;
382 }
383 size_type max_size() const { return size_type(-1); }
384
385 reference front() { return *begin(); }
386 const_reference front() const { return *begin(); }
387 reference back() { return *(--end()); }
388 const_reference back() const { return *(--end()); }
389
390private:
391 void _M_swap_aux(_Self& __x) {
392 __x._M_node._M_swap_alloc(this->_M_node);
393 __x._M_node._M_data._M_next = this->_M_node._M_data._M_next;
394 __x._M_node._M_data._M_next->_M_prev = &__x._M_node._M_data;
395 __x._M_node._M_data._M_prev = this->_M_node._M_data._M_prev;
396 __x._M_node._M_data._M_prev->_M_next = &__x._M_node._M_data;
397 this->_M_empty_initialize();
398 }
399
400public:
401 void swap(_Self& __x) {
402 if (__x.empty()) {
403 if (this->empty()) {
404 return;
405 }
406 this->_M_swap_aux(__x);
407 } else if (this->empty()) {
408 __x._M_swap_aux(*this);
409 } else {
410 this->_M_node.swap(__x._M_node);
411 _STLP_STD::swap(this->_M_node._M_data._M_prev->_M_next, __x._M_node._M_data._M_prev->_M_next);
412 _STLP_STD::swap(this->_M_node._M_data._M_next->_M_prev, __x._M_node._M_data._M_next->_M_prev);
413 }
414 }
415#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
416 void _M_swap_workaround(_Self& __x) { swap(__x); }
417#endif
418
419#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
421#else
423#endif
424 {
425 _Node_base* __tmp = _M_create_node(__x);
426 _Node_base* __n = __pos._M_node;
427 _Node_base* __p = __n->_M_prev;
428 __tmp->_M_next = __n;
429 __tmp->_M_prev = __p;
430 __p->_M_next = __tmp;
431 __n->_M_prev = __tmp;
432 return iterator(__tmp);
433 }
434
435private:
436#if defined (_STLP_MEMBER_TEMPLATES)
437 template <class _InputIterator>
438 void _M_insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
439 typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
440 _M_insert_dispatch(__pos, __first, __last, _Integral());
441 }
442
443 // Check whether it's an integral type. If so, it's not an iterator.
444 template<class _Integer>
445 void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
446 const __true_type& /*_IsIntegral*/) {
447 _M_fill_insert(__pos, __n, __x);
448 }
449 template <class _InputIter>
450 void _M_insert_dispatch(iterator __pos,
451 _InputIter __first, _InputIter __last,
452 const __false_type& /*_IsIntegral*/) {
453#else /* _STLP_MEMBER_TEMPLATES */
454 void _M_insert(iterator __pos, const value_type* __first, const value_type* __last) {
455 for (; __first != __last; ++__first)
456 insert(__pos, *__first);
457 }
459#endif /* _STLP_MEMBER_TEMPLATES */
460 //We use a temporary list to avoid the auto reference troubles (infinite loop)
461 for (; __first != __last; ++__first)
462 insert(__pos, *__first);
463 }
464
465public:
466#if defined (_STLP_MEMBER_TEMPLATES)
467 template <class _InputIterator>
468 void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
469 typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
470 _M_splice_insert_dispatch(__pos, __first, __last, _Integral());
471 }
472
473private:
474 // Check whether it's an integral type. If so, it's not an iterator.
475 template<class _Integer>
476 void _M_splice_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
477 const __true_type& /*_IsIntegral*/) {
478 _M_fill_insert(__pos, __n, __x);
479 }
480 template <class _InputIter>
481 void _M_splice_insert_dispatch(iterator __pos,
482 _InputIter __first, _InputIter __last,
483 const __false_type& /*_IsIntegral*/) {
484#else /* _STLP_MEMBER_TEMPLATES */
485 void insert(iterator __pos, const value_type* __first, const value_type* __last) {
486 _Self __tmp(__first, __last, this->get_allocator());
487 _STLP_ASSERT(__tmp.get_allocator() == this->get_allocator())
488 splice(__pos, __tmp);
489 }
491#endif /* _STLP_MEMBER_TEMPLATES */
492 //We use a temporary list to avoid the auto reference troubles (infinite loop)
493 _Self __tmp(__first, __last, this->get_allocator());
494 splice(__pos, __tmp);
495 }
496
497public:
499 { _M_fill_insert(__pos, __n, __x); }
500
501private:
503 for ( ; __n > 0; --__n)
504 insert(__pos, __x);
505 }
506
507public:
508 void push_front(const_reference __x) { insert(begin(), __x); }
509 void push_back (const_reference __x) { insert(end(), __x); }
510
511#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
513 { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(value_type)); }
514 void push_front() {insert(begin());}
515 void push_back() {insert(end());}
516# endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
517
519 _Node_base* __next_node = __pos._M_node->_M_next;
520 _Node_base* __prev_node = __pos._M_node->_M_prev;
521 _Node* __n = __STATIC_CAST(_Node*, __pos._M_node);
522 __prev_node->_M_next = __next_node;
523 __next_node->_M_prev = __prev_node;
524 _STLP_STD::_Destroy(&__n->_M_data);
525 this->_M_node.deallocate(__n, 1);
526 return iterator(__next_node);
527 }
528
530 while (__first != __last)
531 erase(__first++);
532 return __last;
533 }
534
535#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
536 void resize(size_type __new_size, const_reference __x = value_type());
537#else
538 void resize(size_type __new_size, const_reference __x);
539 void resize(size_type __new_size)
540 { this->resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(value_type)); }
541#endif
543 void pop_front() { erase(begin()); }
544 void pop_back() {
545 iterator __tmp = end();
546 erase(--__tmp);
547 }
548
549public:
550 // assign(), a generalized assignment member function. Two
551 // versions: one that takes a count, and one that takes a range.
552 // The range version is a member template, so we dispatch on whether
553 // or not the type is an integer.
554
556
557 void _M_fill_assign(size_type __n, const_reference __val);
558
559#if defined (_STLP_MEMBER_TEMPLATES)
560 template <class _InputIterator>
561 void assign(_InputIterator __first, _InputIterator __last) {
562 typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
563 _M_assign_dispatch(__first, __last, _Integral());
564 }
565
566 template <class _Integer>
567 void _M_assign_dispatch(_Integer __n, _Integer __val,
568 const __true_type& /*_IsIntegral*/) {
570 }
571
572 template <class _InputIterator>
573 void _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
574 const __false_type& /*_IsIntegral*/) {
575#else
576 void assign(const value_type *__first2, const value_type *__last2) {
577 iterator __first1 = begin();
578 iterator __last1 = end();
579 for ( ; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
580 *__first1 = *__first2;
581 if (__first2 == __last2)
582 erase(__first1, __last1);
583 else
584 insert(__last1, __first2, __last2);
585 }
586 void assign(const_iterator __first2, const_iterator __last2) {
587#endif /* _STLP_MEMBER_TEMPLATES */
588 iterator __first1 = begin();
589 iterator __last1 = end();
590 for ( ; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
591 *__first1 = *__first2;
592 if (__first2 == __last2)
593 erase(__first1, __last1);
594 else
595 insert(__last1, __first2, __last2);
596 }
597
598public:
599 void splice(iterator __pos, _Self& __x) {
600 if (!__x.empty()) {
601 if (this->get_allocator() == __x.get_allocator()) {
602 _STLP_PRIV _List_global_inst::_Transfer(__pos._M_node, __x.begin()._M_node, __x.end()._M_node);
603 }
604 else {
605 insert(__pos, __x.begin(), __x.end());
606 __x.clear();
607 }
608 }
609 }
610 void splice(iterator __pos, _Self& __x, iterator __i) {
611 iterator __j = __i;
612 ++__j;
613 if (__pos == __i || __pos == __j) return;
614 if (this->get_allocator() == __x.get_allocator()) {
615 _STLP_PRIV _List_global_inst::_Transfer(__pos._M_node, __i._M_node, __j._M_node);
616 }
617 else {
618 insert(__pos, *__i);
619 __x.erase(__i);
620 }
621 }
622 void splice(iterator __pos, _Self& __x, iterator __first, iterator __last) {
623 if (__first != __last) {
624 if (this->get_allocator() == __x.get_allocator()) {
625 _STLP_PRIV _List_global_inst::_Transfer(__pos._M_node, __first._M_node, __last._M_node);
626 }
627 else {
628 insert(__pos, __first, __last);
629 __x.erase(__first, __last);
630 }
631 }
632 }
633
635 iterator __first = begin();
636 iterator __last = end();
637 while (__first != __last) {
638 iterator __next = __first;
639 ++__next;
640 if (__val == *__first) erase(__first);
641 __first = __next;
642 }
643 }
644
645 void unique()
647
648 void merge(_Self& __x)
649 { _STLP_PRIV _S_merge(*this, __x, less<value_type>()); }
650
651 void reverse() {
652 _Node_base* __p = &this->_M_node._M_data;
653 _Node_base* __tmp = __p;
654 do {
655 _STLP_STD::swap(__tmp->_M_next, __tmp->_M_prev);
656 __tmp = __tmp->_M_prev; // Old next node is now prev.
657 } while (__tmp != __p);
658 }
659
660 void sort()
661 { _STLP_PRIV _S_sort(*this, less<value_type>()); }
662
663#if defined (_STLP_MEMBER_TEMPLATES)
664 template <class _Predicate>
665 void remove_if(_Predicate __pred)
666 { _STLP_PRIV _S_remove_if(*this, __pred); }
667 template <class _BinaryPredicate>
668 void unique(_BinaryPredicate __binary_pred)
669 { _STLP_PRIV _S_unique(*this, __binary_pred); }
670
671 template <class _StrictWeakOrdering>
672 void merge(_Self& __x,
673 _StrictWeakOrdering __comp) {
674 _STLP_PRIV _S_merge(*this, __x, __comp);
675 }
676
677 template <class _StrictWeakOrdering>
678 void sort(_StrictWeakOrdering __comp)
679 { _STLP_PRIV _S_sort(*this, __comp); }
680#endif /* _STLP_MEMBER_TEMPLATES */
681};
682
683#if defined (list)
684# undef list
686#endif
687
689
690#if !defined (_STLP_LINK_TIME_INSTANTIATION)
691# include <stl/_list.c>
692#endif
693
694#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
695# include <stl/pointers/_list.h>
696#endif
697
698#if defined (_STLP_DEBUG)
699# include <stl/debug/_list.h>
700#endif
701
703
704template <class _Tp, class _Alloc>
707 typedef typename list<_Tp,_Alloc>::const_iterator const_iterator;
708 const_iterator __end1 = __x.end();
709 const_iterator __end2 = __y.end();
710
711 const_iterator __i1 = __x.begin();
712 const_iterator __i2 = __y.begin();
713 while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
714 ++__i1;
715 ++__i2;
716 }
717 return __i1 == __end1 && __i2 == __end2;
718}
719
720#define _STLP_EQUAL_OPERATOR_SPECIALIZED
721#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
722#define _STLP_TEMPLATE_CONTAINER list<_Tp, _Alloc>
723#include <stl/_relops_cont.h>
724#undef _STLP_TEMPLATE_CONTAINER
725#undef _STLP_TEMPLATE_HEADER
726#undef _STLP_EQUAL_OPERATOR_SPECIALIZED
727
728#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
729template <class _Tp, class _Alloc>
730struct __move_traits<list<_Tp, _Alloc> > {
731 typedef __true_type implemented;
733};
734#endif
735
737
738#endif /* _STLP_INTERNAL_LIST_IMPL_H */
739
740// Local Variables:
741// mode:C++
742// End:
#define reverse_iterator
Definition: _abbrevs.h:34
#define bidirectional_iterator_tag
Definition: _abbrevs.h:27
_STLP_MOVE_TO_STD_NAMESPACE void sort(_RandomAccessIter __first, _RandomAccessIter __last)
Definition: _algo.c:993
_STLP_MOVE_TO_STD_NAMESPACE _OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result)
Definition: _algo.c:1419
_STLP_INLINE_LOOP _InputIter __last
Definition: _algo.h:68
_STLP_INLINE_LOOP _InputIter _Predicate __pred
Definition: _algo.h:68
_STLP_INLINE_LOOP _ForwardIter remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred)
Definition: _algo.h:278
return __n
Definition: _algo.h:75
_STLP_INLINE_LOOP _InputIter const _Tp & __val
Definition: _algobase.h:656
#define _STLP_CONVERT_ALLOCATOR(__a, _Tp)
Definition: _alloc.h:183
#define _STLP_FORCE_ALLOCATORS(a, y)
Definition: _alloc.h:436
#define _STLP_CALL
Definition: _bc.h:131
#define _Alloc
Definition: _bvector.h:330
void _Copy_Construct(_Tp *__p, const _Tp &__val)
Definition: _construct.h:130
#define _STLP_DEFAULT_CONSTRUCTED(_TTp)
Definition: _construct.h:265
#define _STLP_ASSERT(expr)
Definition: _debug.h:165
#define _STLP_PRIV
Definition: _dm.h:70
void _S_sort(list< _Tp, _Alloc > &__that, _StrictWeakOrdering __comp)
Definition: _list.c:206
_STLP_MOVE_TO_PRIV_NAMESPACE void _S_remove_if(list< _Tp, _Alloc > &__that, _Predicate __pred)
Definition: _list.c:139
void _S_merge(list< _Tp, _Alloc > &__that, list< _Tp, _Alloc > &__x, _StrictWeakOrdering __comp)
Definition: _list.c:168
void _S_unique(list< _Tp, _Alloc > &__that, _BinaryPredicate __binary_pred)
Definition: _list.c:152
void _S_sort(list< _Tp, _Alloc > &__that, _StrictWeakOrdering __comp)
Definition: _list.c:206
_STLP_MOVE_TO_PRIV_NAMESPACE void _S_remove_if(list< _Tp, _Alloc > &__that, _Predicate __pred)
Definition: _list.c:139
void _S_merge(list< _Tp, _Alloc > &__that, list< _Tp, _Alloc > &__x, _StrictWeakOrdering __comp)
Definition: _list.c:168
void _S_unique(list< _Tp, _Alloc > &__that, _BinaryPredicate __binary_pred)
Definition: _list.c:152
_List_global< bool > _List_global_inst
Definition: _list.h:73
#define _STLP_DEFINE_ARROW_OPERATOR
void get(int argc, const char *argv[])
Definition: cmds.c:480
void _M_empty_initialize()
Definition: _list.h:210
bool empty() const
Definition: _list.h:208
void clear()
Definition: _list.c:66
_Alloc_traits< _Node, _Alloc >::allocator_type _Node_allocator_type
Definition: _list.h:180
_Alloc allocator_type
Definition: _list.h:183
_List_base(const allocator_type &__a)
Definition: _list.h:188
_AllocProxy _M_node
Definition: _list.h:216
~_List_base()
Definition: _list.h:204
_List_base(__move_source< _Self > src)
Definition: _list.h:192
allocator_type get_allocator() const
Definition: _list.h:185
_List_node_base _Node_base
Definition: _list.h:65
static void _STLP_CALL _Transfer(_Node_base *__pos, _Node_base *__first, _Node_base *__last)
_Tp _M_data
Definition: _list.h:78
void swap(_Self &__x)
Definition: _alloc.h:520
_Value _M_data
Definition: _alloc.h:478
_Tp * allocate(size_type __n, size_type &__allocated_n)
Definition: _alloc.h:525
Definition: list.h:37
void pop_front()
Definition: _list.h:543
void unique()
Definition: _list.h:645
reference back()
Definition: _list.h:387
void _M_swap_aux(_Self &__x)
Definition: _list.h:391
iterator erase(iterator __first, iterator __last)
Definition: _list.h:529
const_reference back() const
Definition: _list.h:388
const_reference front() const
Definition: _list.h:386
list< _Tp, _Alloc > _Self
Definition: _list.h:259
list(size_type __n, const_reference __val=_STLP_DEFAULT_CONSTRUCTED(value_type), const allocator_type &__a=allocator_type())
Definition: _list.h:306
value_type & reference
Definition: _list.h:266
void push_back(const_reference __x)
Definition: _list.h:509
void splice(iterator __pos, _Self &__x)
Definition: _list.h:599
reverse_iterator rend()
Definition: _list.h:376
void insert(iterator __pos, size_type __n, const_reference __x)
Definition: _list.h:498
void merge(_Self &__x)
Definition: _list.h:648
const value_type * const_pointer
Definition: _list.h:265
_Node_base * _M_create_node(const_reference __x=value_type())
Definition: _list.h:281
_STLP_PRIV _List_node< _Tp > _Node
Definition: _list.h:260
void assign(const_iterator __first2, const_iterator __last2)
Definition: _list.h:586
iterator erase(iterator __pos)
Definition: _list.h:518
value_type * pointer
Definition: _list.h:264
void pop_back()
Definition: _list.h:544
allocator_type get_allocator() const
Definition: _list.h:161
void _M_insert(iterator __pos, const_iterator __first, const_iterator __last)
Definition: _list.h:458
void remove(const_reference __val)
Definition: _list.h:634
list(const _Self &__x)
Definition: _list.h:355
void swap(_Self &__x)
Definition: _list.h:401
list(const value_type *__first, const value_type *__last, const allocator_type &__a=allocator_type())
Definition: _list.h:336
void assign(const value_type *__first2, const value_type *__last2)
Definition: _list.h:576
_Base::allocator_type allocator_type
Definition: _list.h:271
_Tp value_type
Definition: _list.h:263
void reverse()
Definition: _list.h:651
void _M_insert(iterator __pos, const value_type *__first, const value_type *__last)
Definition: _list.h:454
const_iterator end() const
Definition: _list.h:371
const value_type & const_reference
Definition: _list.h:267
size_type size() const
Definition: _list.h:379
void sort()
Definition: _list.h:660
void _M_fill_insert(iterator __pos, size_type __n, const_reference __x)
Definition: _list.h:502
_STLP_PRIV _List_node_base _Node_base
Definition: _list.h:261
size_t size_type
Definition: _list.h:268
_STLP_PRIV _List_iterator< _Tp, _Const_traits< _Tp > > const_iterator
Definition: _list.h:276
list(__move_source< _Self > src)
Definition: _list.h:359
ptrdiff_t difference_type
Definition: _list.h:269
const_reverse_iterator rbegin() const
Definition: _list.h:374
iterator begin()
Definition: _list.h:367
void splice(iterator __pos, _Self &__x, iterator __i)
Definition: _list.h:610
size_type max_size() const
Definition: _list.h:383
_STLP_PRIV _List_base< _Tp, _Alloc > _Base
Definition: _list.h:258
const_iterator begin() const
Definition: _list.h:368
iterator end()
Definition: _list.h:370
const_reverse_iterator rend() const
Definition: _list.h:377
list(const_iterator __first, const_iterator __last, const allocator_type &__a=allocator_type())
Definition: _list.h:340
~list()
Definition: _list.h:363
void insert(iterator __pos, const value_type *__first, const value_type *__last)
Definition: _list.h:485
reverse_iterator rbegin()
Definition: _list.h:373
void push_front(const_reference __x)
Definition: _list.h:508
void insert(iterator __pos, const_iterator __first, const_iterator __last)
Definition: _list.h:490
void clear()
Definition: _list.h:352
reference front()
Definition: _list.h:385
void assign(size_type __n, const_reference __val)
Definition: _list.h:555
bool empty() const
Definition: _list.h:177
void resize(size_type __new_size, const_reference __x=value_type())
iterator insert(iterator __pos, const_reference __x=value_type())
Definition: _list.h:420
void splice(iterator __pos, _Self &__x, iterator __first, iterator __last)
Definition: _list.h:622
list(const allocator_type &__a=allocator_type())
Definition: _list.h:347
void _M_fill_assign(size_type __n, const_reference __val)
Definition: _list.c:124
static const WCHAR empty[]
Definition: main.c:47
__kernel_ptrdiff_t ptrdiff_t
Definition: linux.h:247
#define _STLP_UNWIND(action)
Definition: features.h:824
#define _STLP_INLINE_LOOP
Definition: features.h:648
#define __TRIVIAL_STUFF(__type)
Definition: features.h:799
#define _STLP_MOVE_TO_STD_NAMESPACE
Definition: features.h:525
#define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS
Definition: features.h:745
#define __STATIC_CAST(__x, __y)
Definition: features.h:585
#define _STLP_ALLOCATOR_TYPE_DFL
Definition: features.h:691
#define _STLP_TRY
Definition: features.h:817
#define __CONST_CAST(__x, __y)
Definition: features.h:584
#define _STLP_EXPORT_TEMPLATE_CLASS
Definition: features.h:987
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
#define _STLP_END_NAMESPACE
Definition: features.h:503
#define _STLP_MOVE_TO_PRIV_NAMESPACE
Definition: features.h:524
char typename[32]
Definition: main.c:84
GLuint GLuint end
Definition: gl.h:1545
GLenum src
Definition: glext.h:6340
static BOOL protected
Definition: protectdata.c:37
static BOOL complete
Definition: htmldoc.c:198
#define swap(a, b)
Definition: qsort.c:63
#define list
Definition: rosglue.h:35
void _M_decr()
Definition: _list.h:92
_List_node_base * _M_node
Definition: _list.h:87
bidirectional_iterator_tag iterator_category
Definition: _list.h:85
_List_iterator_base(_List_node_base *__x)
Definition: _list.h:89
void _M_incr()
Definition: _list.h:91
size_t size_type
Definition: _list.h:83
ptrdiff_t difference_type
Definition: _list.h:84
_List_node< _Tp > _Node
Definition: _list.h:109
_List_iterator< _Tp, _ConstTraits > const_iterator
Definition: _list.h:106
_Self & operator--()
Definition: _list.h:131
_Traits::_NonConstTraits _NonConstTraits
Definition: _list.h:103
bool operator!=(const_iterator __y) const
Definition: _list.h:143
_List_iterator()
Definition: _list.h:114
size_t size_type
Definition: _list.h:110
_STLP_DEFINE_ARROW_OPERATOR _Self & operator++()
Definition: _list.h:122
_Traits::reference reference
Definition: _list.h:100
_Self operator++(int)
Definition: _list.h:126
reference operator*() const
Definition: _list.h:118
bidirectional_iterator_tag iterator_category
Definition: _list.h:108
_Traits::_ConstTraits _ConstTraits
Definition: _list.h:105
_List_iterator< _Tp, _NonConstTraits > iterator
Definition: _list.h:104
bool operator==(const_iterator __y) const
Definition: _list.h:140
_Tp value_type
Definition: _list.h:98
_List_iterator(const iterator &__x)
Definition: _list.h:116
_Self operator--(int)
Definition: _list.h:135
ptrdiff_t difference_type
Definition: _list.h:111
_List_iterator(_List_node_base *__x)
Definition: _list.h:113
_Traits::pointer pointer
Definition: _list.h:99
_List_iterator< _Tp, _Traits > _Self
Definition: _list.h:102
_List_node_base * _M_prev
Definition: _list.h:59
_List_node_base * _M_next
Definition: _list.h:58
__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)
Definition: tkeydef.cpp:122
static clock_t begin
Definition: xmllint.c:458
static int insert
Definition: xmllint.c:138