60 #if __cplusplus >= 201103L
66 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
88 template<
typename _Key,
typename _Compare = std::less<_Key>,
89 typename _Alloc = std::allocator<_Key> >
93 typedef typename _Alloc::value_type _Alloc_value_type;
96 _BinaryFunctionConcept)
102 typedef _Key key_type;
104 typedef _Key value_type;
105 typedef _Compare key_compare;
106 typedef _Compare value_compare;
107 typedef _Alloc allocator_type;
111 typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
113 typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
114 key_compare, _Key_alloc_type> _Rep_type;
119 typedef typename _Key_alloc_type::pointer pointer;
121 typedef typename _Key_alloc_type::const_pointer const_pointer;
122 typedef typename _Key_alloc_type::reference reference;
123 typedef typename _Key_alloc_type::const_reference const_reference;
127 typedef typename _Rep_type::const_iterator iterator;
128 typedef typename _Rep_type::const_iterator const_iterator;
129 typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
130 typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
131 typedef typename _Rep_type::size_type size_type;
132 typedef typename _Rep_type::difference_type difference_type;
148 set(
const _Compare& __comp,
149 const allocator_type& __a = allocator_type())
150 : _M_t(__comp, _Key_alloc_type(__a)) { }
162 template<
typename _InputIterator>
163 set(_InputIterator __first, _InputIterator __last)
165 { _M_t._M_insert_unique(__first, __last); }
179 template<
typename _InputIterator>
180 set(_InputIterator __first, _InputIterator __last,
181 const _Compare& __comp,
182 const allocator_type& __a = allocator_type())
183 : _M_t(__comp, _Key_alloc_type(__a))
184 { _M_t._M_insert_unique(__first, __last); }
196 #if __cplusplus >= 201103L
205 noexcept(is_nothrow_copy_constructible<_Compare>::value)
206 : _M_t(std::move(__x._M_t)) { }
218 set(initializer_list<value_type> __l,
219 const _Compare& __comp = _Compare(),
220 const allocator_type& __a = allocator_type())
221 : _M_t(__comp, _Key_alloc_type(__a))
222 { _M_t._M_insert_unique(__l.begin(), __l.end()); }
233 operator=(
const set& __x)
239 #if __cplusplus >= 201103L
269 operator=(initializer_list<value_type> __l)
272 this->insert(__l.begin(), __l.end());
282 {
return _M_t.key_comp(); }
286 {
return _M_t.key_comp(); }
289 get_allocator()
const _GLIBCXX_NOEXCEPT
290 {
return allocator_type(_M_t.get_allocator()); }
298 begin()
const _GLIBCXX_NOEXCEPT
299 {
return _M_t.begin(); }
307 end()
const _GLIBCXX_NOEXCEPT
308 {
return _M_t.end(); }
316 rbegin()
const _GLIBCXX_NOEXCEPT
317 {
return _M_t.rbegin(); }
325 rend()
const _GLIBCXX_NOEXCEPT
326 {
return _M_t.rend(); }
328 #if __cplusplus >= 201103L
335 cbegin()
const noexcept
336 {
return _M_t.begin(); }
344 cend()
const noexcept
345 {
return _M_t.end(); }
353 crbegin()
const noexcept
354 {
return _M_t.rbegin(); }
362 crend()
const noexcept
363 {
return _M_t.rend(); }
368 empty()
const _GLIBCXX_NOEXCEPT
369 {
return _M_t.empty(); }
373 size()
const _GLIBCXX_NOEXCEPT
374 {
return _M_t.size(); }
378 max_size()
const _GLIBCXX_NOEXCEPT
379 {
return _M_t.max_size(); }
394 { _M_t.swap(__x._M_t); }
397 #if __cplusplus >= 201103L
411 template<
typename... _Args>
412 std::pair<iterator, bool>
413 emplace(_Args&&... __args)
414 {
return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); }
437 template<
typename... _Args>
439 emplace_hint(const_iterator __pos, _Args&&... __args)
441 return _M_t._M_emplace_hint_unique(__pos,
442 std::forward<_Args>(__args)...);
459 std::pair<iterator, bool>
460 insert(
const value_type& __x)
462 std::pair<typename _Rep_type::iterator, bool> __p =
463 _M_t._M_insert_unique(__x);
464 return std::pair<iterator, bool>(__p.first, __p.second);
467 #if __cplusplus >= 201103L
468 std::pair<iterator, bool>
469 insert(value_type&& __x)
471 std::pair<typename _Rep_type::iterator, bool> __p =
472 _M_t._M_insert_unique(std::move(__x));
473 return std::pair<iterator, bool>(__p.first, __p.second);
497 insert(const_iterator __position,
const value_type& __x)
498 {
return _M_t._M_insert_unique_(__position, __x); }
500 #if __cplusplus >= 201103L
502 insert(const_iterator __position, value_type&& __x)
503 {
return _M_t._M_insert_unique_(__position, std::move(__x)); }
515 template<
typename _InputIterator>
517 insert(_InputIterator __first, _InputIterator __last)
518 { _M_t._M_insert_unique(__first, __last); }
520 #if __cplusplus >= 201103L
529 insert(initializer_list<value_type> __l)
530 { this->insert(__l.begin(), __l.end()); }
533 #if __cplusplus >= 201103L
549 _GLIBCXX_ABI_TAG_CXX11
551 erase(const_iterator __position)
552 {
return _M_t.erase(__position); }
565 erase(iterator __position)
566 { _M_t.erase(__position); }
581 erase(
const key_type& __x)
582 {
return _M_t.erase(__x); }
584 #if __cplusplus >= 201103L
601 _GLIBCXX_ABI_TAG_CXX11
603 erase(const_iterator __first, const_iterator __last)
604 {
return _M_t.erase(__first, __last); }
619 erase(iterator __first, iterator __last)
620 { _M_t.erase(__first, __last); }
630 clear() _GLIBCXX_NOEXCEPT
644 count(
const key_type& __x)
const
645 {
return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
662 find(
const key_type& __x)
663 {
return _M_t.find(__x); }
666 find(
const key_type& __x)
const
667 {
return _M_t.find(__x); }
683 lower_bound(
const key_type& __x)
684 {
return _M_t.lower_bound(__x); }
687 lower_bound(
const key_type& __x)
const
688 {
return _M_t.lower_bound(__x); }
699 upper_bound(
const key_type& __x)
700 {
return _M_t.upper_bound(__x); }
703 upper_bound(
const key_type& __x)
const
704 {
return _M_t.upper_bound(__x); }
723 std::pair<iterator, iterator>
724 equal_range(
const key_type& __x)
725 {
return _M_t.equal_range(__x); }
727 std::pair<const_iterator, const_iterator>
728 equal_range(
const key_type& __x)
const
729 {
return _M_t.equal_range(__x); }
732 template<
typename _K1,
typename _C1,
typename _A1>
734 operator==(
const set<_K1, _C1, _A1>&,
const set<_K1, _C1, _A1>&);
736 template<
typename _K1,
typename _C1,
typename _A1>
738 operator<(const set<_K1, _C1, _A1>&,
const set<_K1, _C1, _A1>&);
752 template<
typename _Key,
typename _Compare,
typename _Alloc>
754 operator==(
const set<_Key, _Compare, _Alloc>& __x,
755 const set<_Key, _Compare, _Alloc>& __y)
756 {
return __x._M_t == __y._M_t; }
769 template<
typename _Key,
typename _Compare,
typename _Alloc>
771 operator<(const set<_Key, _Compare, _Alloc>& __x,
772 const set<_Key, _Compare, _Alloc>& __y)
773 {
return __x._M_t < __y._M_t; }
776 template<
typename _Key,
typename _Compare,
typename _Alloc>
778 operator!=(
const set<_Key, _Compare, _Alloc>& __x,
779 const set<_Key, _Compare, _Alloc>& __y)
780 {
return !(__x == __y); }
783 template<
typename _Key,
typename _Compare,
typename _Alloc>
785 operator>(
const set<_Key, _Compare, _Alloc>& __x,
786 const set<_Key, _Compare, _Alloc>& __y)
787 {
return __y < __x; }
790 template<
typename _Key,
typename _Compare,
typename _Alloc>
792 operator<=(const set<_Key, _Compare, _Alloc>& __x,
793 const set<_Key, _Compare, _Alloc>& __y)
794 {
return !(__y < __x); }
797 template<
typename _Key,
typename _Compare,
typename _Alloc>
799 operator>=(
const set<_Key, _Compare, _Alloc>& __x,
800 const set<_Key, _Compare, _Alloc>& __y)
801 {
return !(__x < __y); }
804 template<
typename _Key,
typename _Compare,
typename _Alloc>
806 swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y)
809 _GLIBCXX_END_NAMESPACE_CONTAINER
bool operator>=(const _Safe_iterator< _IteratorL, _Sequence > &__lhs, const _Safe_iterator< _IteratorR, _Sequence > &__rhs)
Definition: safe_iterator.h:644
bool operator==(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))
#define __glibcxx_class_requires(_a, _b)
Definition: concept_check.h:48
bool operator>(const _Safe_iterator< _IteratorL, _Sequence > &__lhs, const _Safe_iterator< _IteratorR, _Sequence > &__rhs)
Definition: safe_iterator.h:612
namespace std _GLIBCXX_VISIBILITY(default)
Definition: stl_set.h:64
#define __glibcxx_class_requires2(_a, _b, _c)
Definition: concept_check.h:49
bool operator!=(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))
void swap(exception_ptr &__lhs, exception_ptr &__rhs)
Definition: exception_ptr.h:160
#define __glibcxx_class_requires4(_a, _b, _c, _d, _e)
Definition: concept_check.h:51