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;
64 typedef _Key value_type;
65 typedef _Compare key_compare;
66 typedef _Compare value_compare;
68 typedef typename _Base::reference reference;
69 typedef typename _Base::const_reference const_reference;
76 typedef typename _Base::size_type size_type;
77 typedef typename _Base::difference_type difference_type;
78 typedef typename _Base::pointer pointer;
79 typedef typename _Base::const_pointer const_pointer;
85#if __cplusplus < 201103L
98 const _Compare& __comp = _Compare(),
107 :
_Base(__x, __a) { }
117 template<
typename _InputIterator>
121 __glibcxx_check_valid_constructor_range(__first, __last)),
127 explicit set(
const _Compare& __comp,
129 :
_Base(__comp, __a) { }
131 template<
typename _InputIterator>
133 const _Compare& __comp = _Compare(),
136 __glibcxx_check_valid_constructor_range(__first, __last)),
143#if __cplusplus < 201103L
145 operator=(
const set& __x)
147 this->_M_safe() = __x;
153 operator=(
const set&) =
default;
156 operator=(
set&&) =
default;
162 this->_M_invalidate_all();
167 using _Base::get_allocator;
172 {
return iterator(_Base::begin(),
this); }
180 {
return iterator(_Base::end(),
this); }
202#if __cplusplus >= 201103L
204 cbegin()
const noexcept
208 cend()
const noexcept
212 crbegin()
const noexcept
216 crend()
const noexcept
223 using _Base::max_size;
226#if __cplusplus >= 201103L
227 template<
typename...
_Args>
232 return { {
__res.first,
this },
__res.second };
235 template<
typename...
_Args>
249 insert(
const value_type& __x)
256#if __cplusplus >= 201103L
258 insert(value_type&& __x)
261 return { {
__res.first,
this },
__res.second };
272#if __cplusplus >= 201103L
281 template <
typename _InputIterator>
286 __glibcxx_check_valid_range2(__first, __last,
__dist);
288 if (
__dist.second >= __gnu_debug::__dp_sign)
289 _Base::insert(__gnu_debug::__unsafe(__first),
290 __gnu_debug::__unsafe(__last));
292 _Base::insert(__first, __last);
295#if __cplusplus >= 201103L
298 { _Base::insert(
__l); }
301#if __cplusplus > 201402L
302 using node_type =
typename _Base::node_type;
323 insert(node_type&&
__nh)
340#if __cplusplus >= 201103L
341 _GLIBCXX_ABI_TAG_CXX11
347 return { _Base::erase(
__position.base()),
this };
373#if __cplusplus >= 201103L
374 _GLIBCXX_ABI_TAG_CXX11
384 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::cend(),
385 _M_message(__gnu_debug::__msg_valid_range)
386 ._M_iterator(__first,
"first")
387 ._M_iterator(__last,
"last"));
391 return { _Base::erase(__first.base(), __last.
base()),
this };
403 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
404 _M_message(__gnu_debug::__msg_valid_range)
405 ._M_iterator(__first,
"first")
406 ._M_iterator(__last,
"last"));
409 _Base::erase(__first.base(), __last.
base());
424 this->_M_invalidate_all();
429 using _Base::key_comp;
430 using _Base::value_comp;
435 {
return iterator(_Base::find(__x),
this); }
443#if __cplusplus > 201103L
444 template<
typename _Kt,
446 typename __has_is_transparent<_Compare, _Kt>::type>
449 {
return { _Base::find(__x),
this }; }
451 template<
typename _Kt,
453 typename __has_is_transparent<_Compare, _Kt>::type>
455 find(
const _Kt& __x)
const
456 {
return { _Base::find(__x),
this }; }
463 {
return iterator(_Base::lower_bound(__x),
this); }
468 lower_bound(
const key_type& __x)
const
471#if __cplusplus > 201103L
472 template<
typename _Kt,
474 typename __has_is_transparent<_Compare, _Kt>::type>
476 lower_bound(
const _Kt& __x)
477 {
return { _Base::lower_bound(__x),
this }; }
479 template<
typename _Kt,
481 typename __has_is_transparent<_Compare, _Kt>::type>
483 lower_bound(
const _Kt& __x)
const
484 {
return { _Base::lower_bound(__x),
this }; }
489 {
return iterator(_Base::upper_bound(__x),
this); }
494 upper_bound(
const key_type& __x)
const
497#if __cplusplus > 201103L
498 template<
typename _Kt,
500 typename __has_is_transparent<_Compare, _Kt>::type>
502 upper_bound(
const _Kt& __x)
503 {
return { _Base::upper_bound(__x),
this }; }
505 template<
typename _Kt,
507 typename __has_is_transparent<_Compare, _Kt>::type>
509 upper_bound(
const _Kt& __x)
const
510 {
return { _Base::upper_bound(__x),
this }; }
517 _Base::equal_range(__x);
525 equal_range(
const key_type& __x)
const
528 _Base::equal_range(__x);
533#if __cplusplus > 201103L
534 template<
typename _Kt,
536 typename __has_is_transparent<_Compare, _Kt>::type>
538 equal_range(
const _Kt& __x)
540 auto __res = _Base::equal_range(__x);
541 return { {
__res.first,
this }, {
__res.second,
this } };
544 template<
typename _Kt,
546 typename __has_is_transparent<_Compare, _Kt>::type>
548 equal_range(
const _Kt& __x)
const
550 auto __res = _Base::equal_range(__x);
551 return { {
__res.first,
this }, {
__res.second,
this } };