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;
58 template<
typename _ItT,
typename _SeqT,
typename _CatT>
59 friend class ::__gnu_debug::_Safe_iterator;
66 _Base_ref(
const _Base& __r) : _M_ref(__r) { }
74 typedef _Key value_type;
75 typedef _Compare key_compare;
76 typedef _Compare value_compare;
78 typedef typename _Base::reference reference;
79 typedef typename _Base::const_reference const_reference;
86 typedef typename _Base::size_type size_type;
87 typedef typename _Base::difference_type difference_type;
88 typedef typename _Base::pointer pointer;
89 typedef typename _Base::const_pointer const_pointer;
95#if __cplusplus < 201103L
104 set(
const set&) =
default;
108 const _Compare& __comp = _Compare(),
117 :
_Base(__x, __a) { }
127 template<
typename _InputIterator>
131 __glibcxx_check_valid_constructor_range(__first, __last)),
137 explicit set(
const _Compare& __comp,
139 :
_Base(__comp, __a) { }
141 template<
typename _InputIterator>
143 const _Compare& __comp = _Compare(),
146 __glibcxx_check_valid_constructor_range(__first, __last)),
151 :
_Base(__x._M_ref) { }
153#if __cplusplus < 201103L
155 operator=(
const set& __x)
157 this->_M_safe() = __x;
163 operator=(
const set&) =
default;
166 operator=(
set&&) =
default;
172 this->_M_invalidate_all();
177 using _Base::get_allocator;
182 {
return iterator(_Base::begin(),
this); }
190 {
return iterator(_Base::end(),
this); }
212#if __cplusplus >= 201103L
214 cbegin()
const noexcept
218 cend()
const noexcept
222 crbegin()
const noexcept
226 crend()
const noexcept
233 using _Base::max_size;
236#if __cplusplus >= 201103L
237 template<
typename...
_Args>
242 return { {
__res.first,
this },
__res.second };
245 template<
typename...
_Args>
259 insert(
const value_type& __x)
266#if __cplusplus >= 201103L
268 insert(value_type&& __x)
271 return { {
__res.first,
this },
__res.second };
282#if __cplusplus >= 201103L
291 template <
typename _InputIterator>
296 __glibcxx_check_valid_range2(__first, __last,
__dist);
298 if (
__dist.second >= __gnu_debug::__dp_sign)
299 _Base::insert(__gnu_debug::__unsafe(__first),
300 __gnu_debug::__unsafe(__last));
302 _Base::insert(__first, __last);
305#if __cplusplus >= 201103L
308 { _Base::insert(
__l); }
311#if __cplusplus > 201402L
312 using node_type =
typename _Base::node_type;
333 insert(node_type&&
__nh)
350#if __cplusplus >= 201103L
351 _GLIBCXX_ABI_TAG_CXX11
357 return { _Base::erase(
__position.base()),
this };
383#if __cplusplus >= 201103L
384 _GLIBCXX_ABI_TAG_CXX11
394 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::cend(),
395 _M_message(__gnu_debug::__msg_valid_range)
396 ._M_iterator(__first,
"first")
397 ._M_iterator(__last,
"last"));
401 return { _Base::erase(__first.base(), __last.
base()),
this };
413 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
414 _M_message(__gnu_debug::__msg_valid_range)
415 ._M_iterator(__first,
"first")
416 ._M_iterator(__last,
"last"));
419 _Base::erase(__first.base(), __last.
base());
434 this->_M_invalidate_all();
439 using _Base::key_comp;
440 using _Base::value_comp;
445 {
return iterator(_Base::find(__x),
this); }
453#if __cplusplus > 201103L
454 template<
typename _Kt,
456 typename __has_is_transparent<_Compare, _Kt>::type>
459 {
return { _Base::find(__x),
this }; }
461 template<
typename _Kt,
463 typename __has_is_transparent<_Compare, _Kt>::type>
465 find(
const _Kt& __x)
const
466 {
return { _Base::find(__x),
this }; }
473 {
return iterator(_Base::lower_bound(__x),
this); }
478 lower_bound(
const key_type& __x)
const
481#if __cplusplus > 201103L
482 template<
typename _Kt,
484 typename __has_is_transparent<_Compare, _Kt>::type>
486 lower_bound(
const _Kt& __x)
487 {
return { _Base::lower_bound(__x),
this }; }
489 template<
typename _Kt,
491 typename __has_is_transparent<_Compare, _Kt>::type>
493 lower_bound(
const _Kt& __x)
const
494 {
return { _Base::lower_bound(__x),
this }; }
499 {
return iterator(_Base::upper_bound(__x),
this); }
504 upper_bound(
const key_type& __x)
const
507#if __cplusplus > 201103L
508 template<
typename _Kt,
510 typename __has_is_transparent<_Compare, _Kt>::type>
512 upper_bound(
const _Kt& __x)
513 {
return { _Base::upper_bound(__x),
this }; }
515 template<
typename _Kt,
517 typename __has_is_transparent<_Compare, _Kt>::type>
519 upper_bound(
const _Kt& __x)
const
520 {
return { _Base::upper_bound(__x),
this }; }
527 _Base::equal_range(__x);
535 equal_range(
const key_type& __x)
const
538 _Base::equal_range(__x);
543#if __cplusplus > 201103L
544 template<
typename _Kt,
546 typename __has_is_transparent<_Compare, _Kt>::type>
548 equal_range(
const _Kt& __x)
550 auto __res = _Base::equal_range(__x);
551 return { {
__res.first,
this }, {
__res.second,
this } };
554 template<
typename _Kt,
556 typename __has_is_transparent<_Compare, _Kt>::type>
558 equal_range(
const _Kt& __x)
const
560 auto __res = _Base::equal_range(__x);
561 return { {
__res.first,
this }, {
__res.second,
this } };