46 set<_Key, _Compare, _Allocator>, _Allocator,
47 __gnu_debug::_Safe_node_sequence>,
48 public _GLIBCXX_STD_C::set<_Key,_Compare,_Allocator>
50 typedef _GLIBCXX_STD_C::set<_Key, _Compare, _Allocator>
_Base;
61 typedef _Key value_type;
62 typedef _Compare key_compare;
63 typedef _Compare value_compare;
65 typedef typename _Base::reference reference;
66 typedef typename _Base::const_reference const_reference;
73 typedef typename _Base::size_type size_type;
74 typedef typename _Base::difference_type difference_type;
75 typedef typename _Base::pointer pointer;
76 typedef typename _Base::const_pointer const_pointer;
82#if __cplusplus < 201103L
95 const _Compare& __comp = _Compare(),
104 :
_Base(__x, __a) { }
107 :
_Safe(std::move(__x._M_safe()), __a),
108 _Base(std::move(__x._M_base()), __a) { }
113 template<
typename _InputIterator>
116 :
_Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
118 __gnu_debug::__base(__last), __a) { }
123 explicit set(
const _Compare& __comp,
125 :
_Base(__comp, __a) { }
127 template<
typename _InputIterator>
129 const _Compare& __comp = _Compare(),
131 :
_Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
133 __gnu_debug::__base(__last),
139#if __cplusplus < 201103L
141 operator=(
const set& __x)
143 this->_M_safe() = __x;
149 operator=(
const set&) =
default;
152 operator=(
set&&) =
default;
158 this->_M_invalidate_all();
163 using _Base::get_allocator;
168 {
return iterator(_Base::begin(),
this); }
176 {
return iterator(_Base::end(),
this); }
198#if __cplusplus >= 201103L
200 cbegin()
const noexcept
204 cend()
const noexcept
208 crbegin()
const noexcept
212 crend()
const noexcept
219 using _Base::max_size;
222#if __cplusplus >= 201103L
223 template<
typename...
_Args>
232 template<
typename...
_Args>
244 insert(
const value_type& __x)
251#if __cplusplus >= 201103L
253 insert(value_type&& __x)
256 = _Base::insert(std::move(__x));
269#if __cplusplus >= 201103L
279 template <
typename _InputIterator>
284 __glibcxx_check_valid_range2(__first, __last,
__dist);
286 if (
__dist.second >= __gnu_debug::__dp_sign)
287 _Base::insert(__gnu_debug::__unsafe(__first),
288 __gnu_debug::__unsafe(__last));
290 _Base::insert(__first, __last);
293#if __cplusplus >= 201103L
296 { _Base::insert(
__l); }
299#if __cplusplus >= 201103L
331#if __cplusplus >= 201103L
341 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
342 _M_message(__gnu_debug::__msg_valid_range)
343 ._M_iterator(__first,
"first")
344 ._M_iterator(__last,
"last"));
347 return iterator(_Base::erase(__first.base(), __last.
base()),
this);
359 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
360 _M_message(__gnu_debug::__msg_valid_range)
361 ._M_iterator(__first,
"first")
362 ._M_iterator(__last,
"last"));
365 _Base::erase(__first.base(), __last.
base());
380 this->_M_invalidate_all();
385 using _Base::key_comp;
386 using _Base::value_comp;
391 {
return iterator(_Base::find(__x),
this); }
399#if __cplusplus > 201103L
400 template<
typename _Kt,
402 typename __has_is_transparent<_Compare, _Kt>::type>
405 {
return { _Base::find(__x),
this }; }
407 template<
typename _Kt,
409 typename __has_is_transparent<_Compare, _Kt>::type>
411 find(
const _Kt& __x)
const
412 {
return { _Base::find(__x),
this }; }
419 {
return iterator(_Base::lower_bound(__x),
this); }
424 lower_bound(
const key_type& __x)
const
427#if __cplusplus > 201103L
428 template<
typename _Kt,
430 typename __has_is_transparent<_Compare, _Kt>::type>
432 lower_bound(
const _Kt& __x)
433 {
return { _Base::lower_bound(__x),
this }; }
435 template<
typename _Kt,
437 typename __has_is_transparent<_Compare, _Kt>::type>
439 lower_bound(
const _Kt& __x)
const
440 {
return { _Base::lower_bound(__x),
this }; }
445 {
return iterator(_Base::upper_bound(__x),
this); }
450 upper_bound(
const key_type& __x)
const
453#if __cplusplus > 201103L
454 template<
typename _Kt,
456 typename __has_is_transparent<_Compare, _Kt>::type>
458 upper_bound(
const _Kt& __x)
459 {
return { _Base::upper_bound(__x),
this }; }
461 template<
typename _Kt,
463 typename __has_is_transparent<_Compare, _Kt>::type>
465 upper_bound(
const _Kt& __x)
const
466 {
return { _Base::upper_bound(__x),
this }; }
473 _Base::equal_range(__x);
481 equal_range(
const key_type& __x)
const
484 _Base::equal_range(__x);
489#if __cplusplus > 201103L
490 template<
typename _Kt,
492 typename __has_is_transparent<_Compare, _Kt>::type>
494 equal_range(
const _Kt& __x)
496 auto __res = _Base::equal_range(__x);
497 return { {
__res.first,
this }, {
__res.second,
this } };
500 template<
typename _Kt,
502 typename __has_is_transparent<_Compare, _Kt>::type>
504 equal_range(
const _Kt& __x)
const
506 auto __res = _Base::equal_range(__x);
507 return { {
__res.first,
this }, {
__res.second,
this } };