61 #ifdef __GXX_EXPERIMENTAL_CXX0X__
65 namespace std _GLIBCXX_VISIBILITY(default)
67 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
89 template<
typename _Key,
typename _Compare = std::less<_Key>,
90 typename _Alloc = std::allocator<_Key> >
94 typedef typename _Alloc::value_type _Alloc_value_type;
95 __glibcxx_class_requires(_Key, _SGIAssignableConcept)
96 __glibcxx_class_requires4(_Compare,
bool, _Key, _Key,
97 _BinaryFunctionConcept)
98 __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept)
112 typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
114 typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
121 typedef typename _Key_alloc_type::pointer
pointer;
128 typedef typename _Rep_type::const_iterator
iterator;
149 set(
const _Compare& __comp,
151 : _M_t(__comp, _Key_alloc_type(__a)) { }
163 template<
typename _InputIterator>
164 set(_InputIterator __first, _InputIterator __last)
166 { _M_t._M_insert_unique(__first, __last); }
180 template<
typename _InputIterator>
181 set(_InputIterator __first, _InputIterator __last,
182 const _Compare& __comp,
184 : _M_t(__comp, _Key_alloc_type(__a))
185 { _M_t._M_insert_unique(__first, __last); }
197 #ifdef __GXX_EXPERIMENTAL_CXX0X__
207 : _M_t(std::move(__x._M_t)) { }
220 const _Compare& __comp = _Compare(),
222 : _M_t(__comp, _Key_alloc_type(__a))
223 { _M_t._M_insert_unique(__l.begin(), __l.end()); }
240 #ifdef __GXX_EXPERIMENTAL_CXX0X__
273 this->
insert(__l.begin(), __l.end());
283 {
return _M_t.key_comp(); }
287 {
return _M_t.key_comp(); }
300 {
return _M_t.begin(); }
308 end() const _GLIBCXX_NOEXCEPT
309 {
return _M_t.end(); }
318 {
return _M_t.rbegin(); }
327 {
return _M_t.rend(); }
329 #ifdef __GXX_EXPERIMENTAL_CXX0X__
337 {
return _M_t.begin(); }
346 {
return _M_t.end(); }
355 {
return _M_t.rbegin(); }
364 {
return _M_t.rend(); }
370 {
return _M_t.empty(); }
375 {
return _M_t.size(); }
380 {
return _M_t.max_size(); }
395 { _M_t.swap(__x._M_t); }
415 _M_t._M_insert_unique(__x);
419 #ifdef __GXX_EXPERIMENTAL_CXX0X__
424 _M_t._M_insert_unique(std::move(__x));
450 {
return _M_t._M_insert_unique_(__position, __x); }
452 #ifdef __GXX_EXPERIMENTAL_CXX0X__
455 {
return _M_t._M_insert_unique_(__position, std::move(__x)); }
467 template<
typename _InputIterator>
469 insert(_InputIterator __first, _InputIterator __last)
470 { _M_t._M_insert_unique(__first, __last); }
472 #ifdef __GXX_EXPERIMENTAL_CXX0X__
482 { this->
insert(__l.begin(), __l.end()); }
485 #ifdef __GXX_EXPERIMENTAL_CXX0X__
503 {
return _M_t.erase(__position); }
517 { _M_t.erase(__position); }
533 {
return _M_t.erase(__x); }
535 #ifdef __GXX_EXPERIMENTAL_CXX0X__
554 {
return _M_t.erase(__first, __last); }
570 { _M_t.erase(__first, __last); }
595 {
return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
613 {
return _M_t.find(__x); }
617 {
return _M_t.find(__x); }
634 {
return _M_t.lower_bound(__x); }
638 {
return _M_t.lower_bound(__x); }
650 {
return _M_t.upper_bound(__x); }
654 {
return _M_t.upper_bound(__x); }
675 {
return _M_t.equal_range(__x); }
679 {
return _M_t.equal_range(__x); }
682 template<
typename _K1,
typename _C1,
typename _A1>
686 template<
typename _K1,
typename _C1,
typename _A1>
702 template<
typename _Key,
typename _Compare,
typename _Alloc>
706 {
return __x._M_t == __y._M_t; }
719 template<
typename _Key,
typename _Compare,
typename _Alloc>
721 operator<(const set<_Key, _Compare, _Alloc>& __x,
723 {
return __x._M_t < __y._M_t; }
726 template<
typename _Key,
typename _Compare,
typename _Alloc>
730 {
return !(__x == __y); }
733 template<
typename _Key,
typename _Compare,
typename _Alloc>
737 {
return __y < __x; }
740 template<
typename _Key,
typename _Compare,
typename _Alloc>
742 operator<=(const set<_Key, _Compare, _Alloc>& __x,
744 {
return !(__y < __x); }
747 template<
typename _Key,
typename _Compare,
typename _Alloc>
751 {
return !(__x < __y); }
754 template<
typename _Key,
typename _Compare,
typename _Alloc>
759 _GLIBCXX_END_NAMESPACE_CONTAINER