63 _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
85 template<typename _Key, typename _Compare = std::less<_Key>,
86 typename _Alloc = std::allocator<_Key> >
90 typedef typename _Alloc::value_type _Alloc_value_type;
91 __glibcxx_class_requires(_Key, _SGIAssignableConcept)
92 __glibcxx_class_requires4(_Compare,
bool, _Key, _Key,
93 _BinaryFunctionConcept)
94 __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept)
108 typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
110 typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
111 key_compare, _Key_alloc_type> _Rep_type;
117 typedef typename _Key_alloc_type::pointer
pointer;
124 typedef typename _Rep_type::const_iterator
iterator;
145 set(
const _Compare& __comp,
146 const allocator_type& __a = allocator_type())
147 : _M_t(__comp, __a) { }
158 template<
typename _InputIterator>
159 set(_InputIterator __first, _InputIterator __last)
161 { _M_t._M_insert_unique(__first, __last); }
174 template<
typename _InputIterator>
175 set(_InputIterator __first, _InputIterator __last,
176 const _Compare& __comp,
177 const allocator_type& __a = allocator_type())
179 { _M_t._M_insert_unique(__first, __last); }
191 #ifdef __GXX_EXPERIMENTAL_CXX0X__
200 : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
213 const _Compare& __comp = _Compare(),
214 const allocator_type& __a = allocator_type())
216 { _M_t._M_insert_unique(__l.begin(), __l.end()); }
227 operator=(
const set& __x)
233 #ifdef __GXX_EXPERIMENTAL_CXX0X__
265 this->insert(__l.begin(), __l.end());
275 {
return _M_t.key_comp(); }
279 {
return _M_t.key_comp(); }
282 get_allocator()
const
283 {
return _M_t.get_allocator(); }
292 {
return _M_t.begin(); }
301 {
return _M_t.end(); }
310 {
return _M_t.rbegin(); }
319 {
return _M_t.rend(); }
321 #ifdef __GXX_EXPERIMENTAL_CXX0X__
329 {
return _M_t.begin(); }
338 {
return _M_t.end(); }
347 {
return _M_t.rbegin(); }
356 {
return _M_t.rend(); }
362 {
return _M_t.empty(); }
367 {
return _M_t.size(); }
372 {
return _M_t.max_size(); }
386 #ifdef __GXX_EXPERIMENTAL_CXX0X__
391 { _M_t.swap(__x._M_t); }
408 insert(
const value_type& __x)
411 _M_t._M_insert_unique(__x);
435 insert(iterator __position,
const value_type& __x)
436 {
return _M_t._M_insert_unique_(__position, __x); }
447 template<
typename _InputIterator>
449 insert(_InputIterator __first, _InputIterator __last)
450 { _M_t._M_insert_unique(__first, __last); }
452 #ifdef __GXX_EXPERIMENTAL_CXX0X__
462 { this->
insert(__l.begin(), __l.end()); }
475 erase(iterator __position)
476 { _M_t.erase(__position); }
490 erase(
const key_type& __x)
491 {
return _M_t.erase(__x); }
505 erase(iterator __first, iterator __last)
506 { _M_t.erase(__first, __last); }
529 count(
const key_type& __x)
const
530 {
return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
547 find(
const key_type& __x)
548 {
return _M_t.find(__x); }
551 find(
const key_type& __x)
const
552 {
return _M_t.find(__x); }
568 lower_bound(
const key_type& __x)
569 {
return _M_t.lower_bound(__x); }
572 lower_bound(
const key_type& __x)
const
573 {
return _M_t.lower_bound(__x); }
584 upper_bound(
const key_type& __x)
585 {
return _M_t.upper_bound(__x); }
588 upper_bound(
const key_type& __x)
const
589 {
return _M_t.upper_bound(__x); }
609 equal_range(
const key_type& __x)
610 {
return _M_t.equal_range(__x); }
613 equal_range(
const key_type& __x)
const
614 {
return _M_t.equal_range(__x); }
617 template<
typename _K1,
typename _C1,
typename _A1>
621 template<
typename _K1,
typename _C1,
typename _A1>
637 template<
typename _Key,
typename _Compare,
typename _Alloc>
641 {
return __x._M_t == __y._M_t; }
654 template<
typename _Key,
typename _Compare,
typename _Alloc>
656 operator<(const set<_Key, _Compare, _Alloc>& __x,
658 {
return __x._M_t < __y._M_t; }
661 template<
typename _Key,
typename _Compare,
typename _Alloc>
665 {
return !(__x == __y); }
668 template<
typename _Key,
typename _Compare,
typename _Alloc>
672 {
return __y < __x; }
675 template<
typename _Key,
typename _Compare,
typename _Alloc>
677 operator<=(const set<_Key, _Compare, _Alloc>& __x,
679 {
return !(__y < __x); }
682 template<
typename _Key,
typename _Compare,
typename _Alloc>
686 {
return !(__x < __y); }
689 template<
typename _Key,
typename _Compare,
typename _Alloc>
694 #ifdef __GXX_EXPERIMENTAL_CXX0X__
695 template<
typename _Key,
typename _Compare,
typename _Alloc>
697 swap(set<_Key, _Compare, _Alloc>&& __x, set<_Key, _Compare, _Alloc>& __y)
700 template<
typename _Key,
typename _Compare,
typename _Alloc>
702 swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>&& __y)
706 _GLIBCXX_END_NESTED_NAMESPACE