ReactOS  0.4.14-dev-390-g34947ad
_set.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005
3  * Francois Dumont
4  *
5  * This material is provided "as is", with absolutely no warranty expressed
6  * or implied. Any use is at your own risk.
7  *
8  * Permission to use or copy this software for any purpose is hereby granted
9  * without fee, provided the above notices are retained on all copies.
10  * Permission to modify the code and to distribute modified code is granted,
11  * provided the above notices are retained, and a notice that the code was
12  * modified is included with the above copyright notice.
13  */
14 
15 /* NOTE: This is an internal header file, included by other STL headers.
16  * You should not attempt to use it directly.
17  */
18 
19 #ifndef _STLP_PTR_SPECIALIZED_SET_H
20 #define _STLP_PTR_SPECIALIZED_SET_H
21 
22 #ifndef _STLP_POINTERS_SPEC_TOOLS_H
23 # include <stl/pointers/_tools.h>
24 #endif
25 
27 
28 #if defined (__BORLANDC__) || defined (__DMC__)
29 # define typename
30 #endif
31 
32 //Specific iterator traits creation
33 _STLP_CREATE_ITERATOR_TRAITS(SetTraitsT, Const_traits)
34 
35 #if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
37 
39 
40 typedef _Rb_tree_node<void*> _Node;
43 # if defined (_STLP_DEBUG)
45 # define _Rb_tree _STLP_NON_DBG_NAME(Rb_tree)
47  _SetTraitsT<void*>, allocator<void*> >;
48 # undef _Rb_tree
49 # endif
51  _SetTraitsT<void*>, allocator<void*> >;
53 #endif
54 
55 template <class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
56  _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
57 class set
58 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
59  : public __stlport_class<set<_Key, _Compare, _Alloc> >
60 #endif
61 {
62 #if !defined (__BORLANDC__)
66 #else
69 #endif
72 
74 public:
75  typedef _Key key_type;
76  typedef _Key value_type;
77  typedef _Compare key_compare;
78  typedef _Compare value_compare;
79 
80 protected:
81  //Specific iterator traits creation
82  typedef _STLP_PRIV _SetTraitsT<value_type> _SetTraits;
86 
87  typedef _STLP_PRIV _SetTraitsT<_KeyStorageType> _SetStorageTraits;
88 
89 public:
90  //dums: need the following public for the __move_traits framework
94 
95 private:
96  typedef typename _Rep_type::iterator base_iterator;
97  typedef typename _Rep_type::const_iterator const_base_iterator;
98 
99 public:
101  typedef typename _Priv_Rep_type::const_pointer const_pointer;
103  typedef typename _Priv_Rep_type::const_reference const_reference;
104  typedef typename _Priv_Rep_type::iterator iterator;
105  typedef typename _Priv_Rep_type::const_iterator const_iterator;
107  typedef typename _Priv_Rep_type::const_reverse_iterator const_reverse_iterator;
108  typedef typename _Priv_Rep_type::size_type size_type;
109  typedef typename _Priv_Rep_type::difference_type difference_type;
110  typedef typename _Priv_Rep_type::allocator_type allocator_type;
111 
112 private:
113  _Rep_type _M_t; // red-black tree representing set
115 
116 #if defined (_STLP_DEBUG)
118  { return iterator(__ite._Owner(), __ite._M_iterator._M_node); }
120  { return base_iterator(__ite._Owner(), __ite._M_iterator._M_node); }
121 #else
123  { return iterator(__ite._M_node); }
125  { return base_iterator(__ite._M_node); }
126 #endif
127 
128 public:
130  explicit set(const _Compare& __comp,
131  const allocator_type& __a = allocator_type())
132  : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {}
133 
134 #if defined (_STLP_MEMBER_TEMPLATES)
135  template <class _InputIterator>
136  set(_InputIterator __first, _InputIterator __last)
137  : _M_t(_Compare(), _StorageTypeAlloc()) {
138 # if defined (_STLP_USE_ITERATOR_WRAPPER)
139  _M_t.insert_unique(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
140  _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
141 # else
142  _M_t.insert_unique(__first, __last);
143 # endif
144  }
145 
146 # if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
147  template <class _InputIterator>
148  set(_InputIterator __first, _InputIterator __last, const _Compare& __comp)
149  : _M_t(__comp, _StorageTypeAlloc()) {
150 # if defined (_STLP_USE_ITERATOR_WRAPPER)
151  _M_t.insert_unique(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
152  _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
153 # else
154  _M_t.insert_unique(__first, __last);
155 # endif
156  }
157 # endif
158  template <class _InputIterator>
159  set(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
161  : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {
162 # if defined (_STLP_USE_ITERATOR_WRAPPER)
163  _M_t.insert_unique(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
164  _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
165 # else
166  _M_t.insert_unique(__first, __last);
167 # endif
168  }
169 #else
170  set(const value_type* __first, const value_type* __last)
171  : _M_t(_Compare(), _StorageTypeAlloc()) {
172  _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
173  cast_traits::to_storage_type_cptr(__last));
174  }
175 
176  set(const value_type* __first, const value_type* __last,
177  const _Compare& __comp, const allocator_type& __a = allocator_type())
178  : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {
179  _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
180  cast_traits::to_storage_type_cptr(__last));
181  }
182 
184  : _M_t(_Compare(), _StorageTypeAlloc())
185  { _M_t.insert_unique(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
186 
188  const _Compare& __comp, const allocator_type& __a = allocator_type())
190  { _M_t.insert_unique(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
191 #endif /* _STLP_MEMBER_TEMPLATES */
192 
193  set(const _Self& __x) : _M_t(__x._M_t) {}
194 
195 #if !defined (_STLP_NO_MOVE_SEMANTIC)
198 #endif
199 
200  _Self& operator=(const _Self& __x) {
201  _M_t = __x._M_t;
202  return *this;
203  }
204 
205  // accessors:
206  key_compare key_comp() const { return _M_t.key_comp(); }
207  value_compare value_comp() const { return _M_t.key_comp(); }
209  { return _STLP_CONVERT_ALLOCATOR(_M_t.get_allocator(), value_type); }
210 
211  iterator begin() { return _S_to_value_ite(_M_t.begin()); }
212  iterator end() { return _S_to_value_ite(_M_t.end()); }
213  const_iterator begin() const { return _S_to_value_ite(_M_t.begin()); }
214  const_iterator end() const { return _S_to_value_ite(_M_t.end()); }
219  bool empty() const { return _M_t.empty(); }
220  size_type size() const { return _M_t.size(); }
221  size_type max_size() const { return _M_t.max_size(); }
222  void swap(_Self& __x) { _M_t.swap(__x._M_t); }
223 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
224  void _M_swap_workaround(_Self& __x) { swap(__x); }
225 #endif
226 
227  // insert/erase
229  pair<base_iterator, bool> ret = _M_t.insert_unique(cast_traits::to_storage_type_cref(__x));
230  return pair<iterator, bool>(_S_to_value_ite(ret.first), ret.second);
231  }
232  iterator insert(iterator __pos, const value_type& __x)
233  { return _S_to_value_ite(_M_t.insert_unique(_S_to_storage_ite(__pos), cast_traits::to_storage_type_cref(__x))); }
234 
235 #if defined (_STLP_MEMBER_TEMPLATES)
236  template <class _InputIterator>
237  void insert(_InputIterator __first, _InputIterator __last) {
238 # if defined (_STLP_USE_ITERATOR_WRAPPER)
239  _M_t.insert_unique(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
240  _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
241 # else
242  _M_t.insert_unique(__first, __last);
243 # endif
244  }
245 #else
247  { _M_t.insert_unique(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
248  void insert(const value_type* __first, const value_type* __last) {
249  _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
250  cast_traits::to_storage_type_cptr(__last));
251  }
252 #endif
253  void erase(iterator __pos)
254  { _M_t.erase(_S_to_storage_ite(__pos)); }
256  { return _M_t.erase_unique(cast_traits::to_storage_type_cref(__x)); }
257  void erase(iterator __first, iterator __last)
258  { _M_t.erase(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
259  void clear() { _M_t.clear(); }
260 
261  // set operations:
263  const_iterator find(const _KT& __x) const
264  { return _S_to_value_ite(_M_t.find(cast_traits::to_storage_type_crefT(__x))); }
266  iterator find(const _KT& __x)
267  { return _S_to_value_ite(_M_t.find(cast_traits::to_storage_type_crefT(__x))); }
269  size_type count(const _KT& __x) const
270  { return _M_t.find(cast_traits::to_storage_type_crefT(__x)) == _M_t.end() ? 0 : 1; }
272  iterator lower_bound(const _KT& __x)
273  { return _S_to_value_ite(_M_t.lower_bound(cast_traits::to_storage_type_crefT(__x))); }
275  const_iterator lower_bound(const _KT& __x) const
276  { return _S_to_value_ite(_M_t.lower_bound(cast_traits::to_storage_type_crefT(__x))); }
278  iterator upper_bound(const _KT& __x)
279  { return _S_to_value_ite(_M_t.upper_bound(cast_traits::to_storage_type_crefT(__x))); }
281  const_iterator upper_bound(const _KT& __x) const
282  { return _S_to_value_ite(_M_t.upper_bound(cast_traits::to_storage_type_crefT(__x))); }
286  __ret = _M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
288  _S_to_value_ite(__ret.second));
289  }
293  __ret = _M_t.equal_range_unique(cast_traits::to_storage_type_crefT(__x));
295  _S_to_value_ite(__ret.second));
296  }
297 };
298 
299 //Specific iterator traits creation
300 _STLP_CREATE_ITERATOR_TRAITS(MultisetTraitsT, Const_traits)
301 
302 template <class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
303  _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
304 class multiset
305 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
306  : public __stlport_class<multiset<_Key, _Compare, _Alloc> >
307 #endif
308 {
309 #if !defined (__BORLANDC__)
313 #else
316 #endif
319 
321 public:
322  // typedefs:
323  typedef _Key key_type;
324  typedef _Key value_type;
325  typedef _Compare key_compare;
326  typedef _Compare value_compare;
327 
328 protected:
329  //Specific iterator traits creation
330  typedef _STLP_PRIV _MultisetTraitsT<value_type> _MultisetTraits;
334 
335  typedef _STLP_PRIV _MultisetTraitsT<_KeyStorageType> _MultisetStorageTraits;
336 public:
337  //dums: need the following public for the __move_traits framework
341 
342 private:
343  typedef typename _Rep_type::iterator base_iterator;
344  typedef typename _Rep_type::const_iterator const_base_iterator;
345 
346 public:
348  typedef typename _Priv_Rep_type::const_pointer const_pointer;
350  typedef typename _Priv_Rep_type::const_reference const_reference;
351  typedef typename _Priv_Rep_type::iterator iterator;
352  typedef typename _Priv_Rep_type::const_iterator const_iterator;
354  typedef typename _Priv_Rep_type::const_reverse_iterator const_reverse_iterator;
355  typedef typename _Priv_Rep_type::size_type size_type;
356  typedef typename _Priv_Rep_type::difference_type difference_type;
357  typedef typename _Priv_Rep_type::allocator_type allocator_type;
358 
359 private:
360  _Rep_type _M_t; // red-black tree representing multiset
362 
363 #if defined (_STLP_DEBUG)
365  { return iterator(__ite._Owner(), __ite._M_iterator._M_node); }
367  { return base_iterator(__ite._Owner(), __ite._M_iterator._M_node); }
368 #else
370  { return iterator(__ite._M_node); }
372  { return base_iterator(__ite._M_node); }
373 #endif
374 
375 public:
376  multiset() : _M_t(_Compare(), _StorageTypeAlloc()) {}
377  explicit multiset(const _Compare& __comp,
378  const allocator_type& __a = allocator_type())
379  : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {}
380 
381 #if defined (_STLP_MEMBER_TEMPLATES)
382  template <class _InputIterator>
383  multiset(_InputIterator __first, _InputIterator __last)
384  : _M_t(_Compare(), _StorageTypeAlloc()) {
385 # if defined (_STLP_USE_ITERATOR_WRAPPER)
386  _M_t.insert_equal(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
387  _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
388 # else
389  _M_t.insert_equal(__first, __last);
390 # endif
391  }
392 
393 # if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
394  template <class _InputIterator>
395  multiset(_InputIterator __first, _InputIterator __last,
396  const _Compare& __comp)
397  : _M_t(__comp, _StorageTypeAlloc()) {
398 # if defined (_STLP_USE_ITERATOR_WRAPPER)
399  _M_t.insert_equal(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
400  _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
401 # else
402  _M_t.insert_equal(__first, __last);
403 # endif
404  }
405 # endif
406  template <class _InputIterator>
407  multiset(_InputIterator __first, _InputIterator __last,
408  const _Compare& __comp,
410  : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {
411 # if defined (_STLP_USE_ITERATOR_WRAPPER)
412  _M_t.insert_equal(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
413  _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
414 # else
415  _M_t.insert_equal(__first, __last);
416 # endif
417  }
418 
419 #else
420  multiset(const value_type* __first, const value_type* __last)
421  : _M_t(_Compare(), _StorageTypeAlloc()) {
422  _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
423  cast_traits::to_storage_type_cptr(__last));
424  }
425 
426  multiset(const value_type* __first, const value_type* __last,
427  const _Compare& __comp,
428  const allocator_type& __a = allocator_type())
429  : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {
430  _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
431  cast_traits::to_storage_type_cptr(__last));
432  }
433 
435  : _M_t(_Compare(), _StorageTypeAlloc())
436  { _M_t.insert_equal(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
437 
439  const _Compare& __comp,
440  const allocator_type& __a = allocator_type())
442  { _M_t.insert_equal(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
443 #endif /* _STLP_MEMBER_TEMPLATES */
444 
445  multiset(const _Self& __x)
446  : _M_t(__x._M_t) {}
447 
448  _Self& operator=(const _Self& __x) {
449  _M_t = __x._M_t;
450  return *this;
451  }
452 
453 #if !defined (_STLP_NO_MOVE_SEMANTIC)
456 #endif
457 
458  // accessors:
459  key_compare key_comp() const { return _M_t.key_comp(); }
460  value_compare value_comp() const { return _M_t.key_comp(); }
462  { return _STLP_CONVERT_ALLOCATOR(_M_t.get_allocator(), value_type); }
463 
464  iterator begin() { return _S_to_value_ite(_M_t.begin()); }
465  iterator end() { return _S_to_value_ite(_M_t.end()); }
466  const_iterator begin() const { return _S_to_value_ite(_M_t.begin()); }
467  const_iterator end() const { return _S_to_value_ite(_M_t.end()); }
472  bool empty() const { return _M_t.empty(); }
473  size_type size() const { return _M_t.size(); }
474  size_type max_size() const { return _M_t.max_size(); }
475  void swap(_Self& __x) { _M_t.swap(__x._M_t); }
476 #if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
477  void _M_swap_workaround(_Self& __x) { swap(__x); }
478 #endif
479 
480  // insert/erase
482  { return _S_to_value_ite(_M_t.insert_equal(cast_traits::to_storage_type_cref(__x))); }
483  iterator insert(iterator __pos, const value_type& __x) {
484  return _S_to_value_ite(_M_t.insert_equal(_S_to_storage_ite(__pos),
485  cast_traits::to_storage_type_cref(__x)));
486  }
487 
488 #if defined (_STLP_MEMBER_TEMPLATES)
489  template <class _InputIterator>
490  void insert(_InputIterator __first, _InputIterator __last) {
491 # if defined (_STLP_USE_ITERATOR_WRAPPER)
492  _M_t.insert_equal(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
493  _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
494 # else
495  _M_t.insert_equal(__first, __last);
496 # endif
497  }
498 #else
499  void insert(const value_type* __first, const value_type* __last) {
500  _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
501  cast_traits::to_storage_type_cptr(__last));
502  }
504  { _M_t.insert_equal(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
505 #endif /* _STLP_MEMBER_TEMPLATES */
506 
507  void erase(iterator __pos)
508  { _M_t.erase(_S_to_storage_ite(__pos)); }
510  { return _M_t.erase(cast_traits::to_storage_type_cref(__x)); }
511  void erase(iterator __first, iterator __last)
512  { _M_t.erase(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
513  void clear() { _M_t.clear(); }
514 
515  // multiset operations:
516 
518  iterator find(const _KT& __x)
519  { return _S_to_value_ite(_M_t.find(cast_traits::to_storage_type_crefT(__x))); }
521  const_iterator find(const _KT& __x) const
522  { return _S_to_value_ite(_M_t.find(cast_traits::to_storage_type_crefT(__x))); }
524  size_type count(const _KT& __x) const
525  { return _M_t.count(cast_traits::to_storage_type_crefT(__x)); }
527  iterator lower_bound(const _KT& __x)
528  { return _S_to_value_ite(_M_t.lower_bound(cast_traits::to_storage_type_crefT(__x))); }
530  const_iterator lower_bound(const _KT& __x) const
531  { return _S_to_value_ite(_M_t.lower_bound(cast_traits::to_storage_type_crefT(__x))); }
533  iterator upper_bound(const _KT& __x)
534  { return _S_to_value_ite(_M_t.upper_bound(cast_traits::to_storage_type_crefT(__x))); }
536  const_iterator upper_bound(const _KT& __x) const
537  { return _S_to_value_ite(_M_t.upper_bound(cast_traits::to_storage_type_crefT(__x))); }
541  __ret = _M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
543  _S_to_value_ite(__ret.second));
544  }
548  __ret = _M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
550  _S_to_value_ite(__ret.second));
551  }
552 };
553 
554 #if defined (__BORLANDC__) || defined (__DMC__)
555 # undef typename
556 #endif
557 
559 
560 #endif /* _STLP_PTR_SPECIALIZED_SET_H */
561 
562 // Local Variables:
563 // mode:C++
564 // End:
#define _STLP_CONVERT_ALLOCATOR(__a, _Tp)
Definition: _alloc.h:183
value_compare value_comp() const
Definition: _set.h:460
_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator > equal_range(const _KT &__x)
Definition: _set.h:539
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__x)
Definition: _set.h:266
set< _Key, _Compare, _Alloc > _Self
Definition: _set.h:73
multiset(const value_type *__first, const value_type *__last, const _Compare &__comp, const allocator_type &__a=allocator_type())
Definition: _set.h:426
const_reverse_iterator rbegin() const
Definition: _set.h:217
_STLP_TEMPLATE_FOR_CONT_EXT iterator lower_bound(const _KT &__x)
Definition: _set.h:527
_STLP_PRIV _CastTraits< _KeyStorageType, _Key > cast_traits
Definition: _set.h:71
void insert(const_iterator __first, const_iterator __last)
Definition: _set.h:246
#define _STLP_CREATE_ITERATOR_TRAITS(Motif, Traits)
_Compare value_compare
Definition: _set.h:326
iterator begin()
Definition: _set.h:464
size_type max_size() const
Definition: _set.h:474
_STLP_TEMPLATE_FOR_CONT_EXT iterator upper_bound(const _KT &__x)
Definition: _set.h:533
_Rep_type::const_reverse_iterator const_reverse_iterator
Definition: _set.h:76
size_type max_size() const
Definition: _set.h:221
reverse_iterator rend()
Definition: _set.h:469
const_iterator end() const
Definition: _set.h:467
multiset(__move_source< _Self > src)
Definition: _set.h:454
GLsizei const GLvoid * pointer
Definition: glext.h:5848
set(const _Self &__x)
Definition: _set.h:193
#define _Alloc
Definition: _bvector.h:330
#define _STLP_TYPENAME
Definition: features.h:612
_Priv_Rep_type::reference reference
Definition: _set.h:102
_STLP_PRIV _Rb_tree< _KeyStorageType, _CompareStorageType, _KeyStorageType, _STLP_PRIV _Identity< _KeyStorageType >, _MultisetStorageTraits, _StorageTypeAlloc > _Rep_type
Definition: _set.h:340
multiset(const _Compare &__comp, const allocator_type &__a=allocator_type())
Definition: _set.h:377
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator find(const _KT &__x) const
Definition: _set.h:521
size_type erase(const key_type &__x)
Definition: _set.h:255
set(const_iterator __first, const_iterator __last, const _Compare &__comp, const allocator_type &__a=allocator_type())
Definition: _set.h:187
#define reverse_iterator
Definition: _abbrevs.h:34
_Rep_type::iterator base_iterator
Definition: _set.h:343
_Rep_type::size_type size_type
Definition: _set.h:248
_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator > equal_range(const _KT &__x) const
Definition: _set.h:546
_STLP_PRIV _AssocStorageTypes< _Key, _Compare > _AssocStorageTypes
Definition: _set.h:63
_STLP_PRIV _Rb_tree< key_type, key_compare, value_type, _STLP_PRIV _Identity< value_type >, _SetTraits, _Alloc > _Rep_type
Definition: _set.h:67
#define _STLP_TEMPLATE_FOR_CONT_EXT
Definition: features.h:623
iterator insert(const value_type &__x)
Definition: _set.h:481
key_compare key_comp() const
Definition: _set.h:206
_STLP_PRIV _Rb_tree< _KeyStorageType, _CompareStorageType, _KeyStorageType, _STLP_PRIV _Identity< _KeyStorageType >, _SetStorageTraits, _StorageTypeAlloc > _Rep_type
Definition: _set.h:93
_Self & operator=(const _Self &__x)
Definition: _set.h:200
value_compare value_comp() const
Definition: _set.h:207
set(const_iterator __first, const_iterator __last)
Definition: _set.h:183
Definition: _set.h:216
_STLP_PRIV _SetTraitsT< value_type > _SetTraits
Definition: _set.h:82
_Rep_type::iterator base_iterator
Definition: _set.h:96
_Compare key_compare
Definition: _set.h:325
const_iterator begin() const
Definition: _set.h:213
static base_iterator _S_to_storage_ite(const_iterator __ite)
Definition: _set.h:371
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator lower_bound(const _KT &__x) const
Definition: _set.h:275
multiset()
Definition: _set.h:376
_Rep_type::size_type size_type
Definition: _set.h:77
const_iterator begin() const
Definition: _set.h:466
_Rep_type::const_iterator const_base_iterator
Definition: _set.h:97
_Priv_Rep_type::const_iterator const_iterator
Definition: _set.h:352
__select< is_default_less &&ptr_type, _BinaryPredWrapper< _KeyStorageType, _Tp, _Compare >, _Compare >::_Ret _CompareStorageType
Definition: _tools.h:196
set(const value_type *__first, const value_type *__last, const _Compare &__comp, const allocator_type &__a=allocator_type())
Definition: _set.h:176
_Priv_Rep_type::const_reverse_iterator const_reverse_iterator
Definition: _set.h:107
#define _STLP_MOVE_TO_PRIV_NAMESPACE
Definition: features.h:524
set()
Definition: _set.h:129
_Rep_type::const_iterator const_iterator
Definition: _set.h:245
_Rep_type::allocator_type allocator_type
Definition: _set.h:250
bool empty() const
Definition: _set.h:472
void erase(iterator __pos)
Definition: _set.h:253
_Rep_type _M_t
Definition: _set.h:82
void clear()
Definition: _set.h:259
_Priv_Rep_type::const_reference const_reference
Definition: _set.h:103
_AssocStorageTypes::_CompareStorageType _CompareStorageType
Definition: _set.h:312
multiset(const_iterator __first, const_iterator __last, const _Compare &__comp, const allocator_type &__a=allocator_type())
Definition: _set.h:438
_Priv_Rep_type::reverse_iterator reverse_iterator
Definition: _set.h:106
_Rep_type::reverse_iterator reverse_iterator
Definition: _set.h:246
_AssocStorageTypes::_KeyStorageType _KeyStorageType
Definition: _set.h:311
_STLP_PRIV _MultisetTraitsT< _KeyStorageType > _MultisetStorageTraits
Definition: _set.h:335
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator lower_bound(const _KT &__x) const
Definition: _set.h:530
_Rep_type _M_t
Definition: _set.h:253
_STLP_TEMPLATE_FOR_CONT_EXT size_type count(const _KT &__x) const
Definition: _set.h:524
_Priv_Rep_type::const_pointer const_pointer
Definition: _set.h:348
_Key key_type
Definition: _set.h:323
_Priv_Rep_type::size_type size_type
Definition: _set.h:355
const_reverse_iterator rbegin() const
Definition: _set.h:470
_Key value_type
Definition: _set.h:324
pair< iterator, bool > insert(const value_type &__x)
Definition: _set.h:228
_STLP_PRIV _CastTraits< _KeyStorageType, _Key > cast_traits
Definition: _set.h:318
_Self & operator=(const _Self &__x)
Definition: _set.h:448
_STLP_INLINE_LOOP _InputIter __last
Definition: _algo.h:68
key_compare key_comp() const
Definition: _set.h:459
_Priv_Rep_type::reverse_iterator reverse_iterator
Definition: _set.h:353
_T1 first
Definition: _pair.h:51
void erase(iterator __pos)
Definition: _set.h:507
_Priv_Rep_type::pointer pointer
Definition: _set.h:100
__select< is_default_less, _SType, _Tp >::_Ret _KeyStorageType
Definition: _tools.h:193
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator find(const _KT &__x) const
Definition: _set.h:263
reverse_iterator rend()
Definition: _set.h:216
_Priv_Rep_type::difference_type difference_type
Definition: _set.h:356
#define _STLP_MOVE_TO_STD_NAMESPACE
Definition: features.h:525
_STLP_TEMPLATE_FOR_CONT_EXT pair< iterator, iterator > equal_range(const _KT &__x)
Definition: _set.h:284
void get(int argc, const char *argv[])
Definition: cmds.c:480
const_iterator end() const
Definition: _set.h:214
if(!(yy_init))
Definition: macro.lex.yy.c:714
void erase(iterator __first, iterator __last)
Definition: _set.h:511
_Rep_type::iterator iterator
Definition: _set.h:73
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__x)
Definition: _set.h:518
#define _STLP_ALLOCATOR_TYPE_DFL
Definition: features.h:691
bool empty() const
Definition: _set.h:219
_Rep_type::const_iterator const_base_iterator
Definition: _set.h:344
_Priv_Rep_type::const_reverse_iterator const_reverse_iterator
Definition: _set.h:354
#define _STLP_EXPORT_TEMPLATE_CLASS
Definition: features.h:987
reverse_iterator rbegin()
Definition: _set.h:468
_Compare value_compare
Definition: _set.h:78
_Priv_Rep_type::allocator_type allocator_type
Definition: _set.h:110
_Key value_type
Definition: _set.h:76
#define _STLP_EXPORT
Definition: features.h:951
_Priv_Rep_type::iterator iterator
Definition: _set.h:104
int ret
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator upper_bound(const _KT &__x) const
Definition: _set.h:281
const_reverse_iterator rend() const
Definition: _set.h:218
_STLP_PRIV _Rb_tree< key_type, key_compare, value_type, _STLP_PRIV _Identity< value_type >, _MultisetTraits, _Alloc > _Rep_type
Definition: _set.h:238
_STLP_PRIV _MultisetTraitsT< value_type > _MultisetTraits
Definition: _set.h:330
GLint reference
Definition: glext.h:11729
#define _STLP_PRIV
Definition: _dm.h:70
_Rep_type::reverse_iterator reverse_iterator
Definition: _set.h:75
_Priv_Rep_type::const_pointer const_pointer
Definition: _set.h:101
_Priv_Rep_type::difference_type difference_type
Definition: _set.h:109
_Rebind_type::other allocator_type
Definition: _alloc.h:201
size_type size() const
Definition: _set.h:473
void insert(const value_type *__first, const value_type *__last)
Definition: _set.h:499
_STLP_PRIV _Rb_tree< key_type, key_compare, value_type, _STLP_PRIV _Identity< value_type >, _SetTraits, _Alloc > _Priv_Rep_type
Definition: _set.h:85
size_type size() const
Definition: _set.h:220
GLenum src
Definition: glext.h:6340
#define _STLP_CLASS_DECLSPEC
Definition: features.h:983
iterator begin()
Definition: _set.h:211
iterator end()
Definition: _set.h:465
iterator insert(iterator __pos, const value_type &__x)
Definition: _set.h:483
#define _STLP_KEY_TYPE_FOR_CONT_EXT(type)
Definition: features.h:622
_Priv_Rep_type::iterator iterator
Definition: _set.h:351
void swap(_Self &__x)
Definition: _set.h:222
void insert(const value_type *__first, const value_type *__last)
Definition: _set.h:248
_Priv_Rep_type::allocator_type allocator_type
Definition: _set.h:357
multiset(const _Self &__x)
Definition: _set.h:445
set(const _Compare &__comp, const allocator_type &__a=allocator_type())
Definition: _set.h:130
_STLP_PRIV _SetTraitsT< _KeyStorageType > _SetStorageTraits
Definition: _set.h:87
_Priv_Rep_type::const_reference const_reference
Definition: _set.h:350
_Alloc_traits< _KeyStorageType, _Alloc >::allocator_type _StorageTypeAlloc
Definition: _set.h:70
_AssocStorageTypes::_CompareStorageType _CompareStorageType
Definition: _set.h:65
allocator_type get_allocator() const
Definition: _set.h:208
_Rep_type::const_reverse_iterator const_reverse_iterator
Definition: _set.h:247
_STLP_TEMPLATE_FOR_CONT_EXT size_type count(const _KT &__x) const
Definition: _set.h:269
_STLP_TEMPLATE_FOR_CONT_EXT iterator lower_bound(const _KT &__x)
Definition: _set.h:272
multiset< _Key, _Compare, _Alloc > _Self
Definition: _set.h:320
multiset(const_iterator __first, const_iterator __last)
Definition: _set.h:434
_STLP_PRIV _Rb_tree< key_type, key_compare, value_type, _STLP_PRIV _Identity< value_type >, _MultisetTraits, _Alloc > _Priv_Rep_type
Definition: _set.h:333
#define _STLP_END_NAMESPACE
Definition: features.h:503
iterator insert(iterator __pos, const value_type &__x)
Definition: _set.h:232
size_type erase(const key_type &__x)
Definition: _set.h:509
reverse_iterator rbegin()
Definition: _set.h:215
_Key key_type
Definition: _set.h:75
Definition: _pair.h:47
static iterator _S_to_value_ite(const_base_iterator __ite)
Definition: _set.h:369
multiset(const value_type *__first, const value_type *__last)
Definition: _set.h:420
_STLP_TEMPLATE_FOR_CONT_EXT const_iterator upper_bound(const _KT &__x) const
Definition: _set.h:536
set(__move_source< _Self > src)
Definition: _set.h:196
_T2 second
Definition: _pair.h:52
allocator_type get_allocator() const
Definition: _set.h:461
_AssocStorageTypes::_KeyStorageType _KeyStorageType
Definition: _set.h:64
const_reverse_iterator rend() const
Definition: _set.h:471
iterator end()
Definition: _set.h:212
_STLP_TEMPLATE_FOR_CONT_EXT pair< const_iterator, const_iterator > equal_range(const _KT &__x) const
Definition: _set.h:291
_Rep_type::const_iterator const_iterator
Definition: _set.h:74
_Alloc_traits< _KeyStorageType, _Alloc >::allocator_type _StorageTypeAlloc
Definition: _set.h:317
void insert(const_iterator __first, const_iterator __last)
Definition: _set.h:503
void swap(_Self &__x)
Definition: _set.h:475
set(const value_type *__first, const value_type *__last)
Definition: _set.h:170
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
_Rep_type::iterator iterator
Definition: _set.h:244
static iterator _S_to_value_ite(const_base_iterator __ite)
Definition: _set.h:122
_STLP_TEMPLATE_FOR_CONT_EXT iterator upper_bound(const _KT &__x)
Definition: _set.h:278
_STLP_PRIV _AssocStorageTypes< _Key, _Compare > _AssocStorageTypes
Definition: _set.h:310
void clear()
Definition: _set.h:513
_Priv_Rep_type::pointer pointer
Definition: _set.h:347
Definition: _set.h:46
_Compare key_compare
Definition: _set.h:77
_Priv_Rep_type::reference reference
Definition: _set.h:349
void erase(iterator __first, iterator __last)
Definition: _set.h:257
static base_iterator _S_to_storage_ite(const_iterator __ite)
Definition: _set.h:124
_Priv_Rep_type::size_type size_type
Definition: _set.h:108
_Priv_Rep_type::const_iterator const_iterator
Definition: _set.h:105
_Rep_type::allocator_type allocator_type
Definition: _set.h:79