46 multiset<_Key, _Compare, _Allocator>, _Allocator,
47 __gnu_debug::_Safe_node_sequence>,
48 public _GLIBCXX_STD_C::multiset<_Key, _Compare, _Allocator>
50 typedef _GLIBCXX_STD_C::multiset<_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
108 const _Compare& __comp = _Compare(),
129 template<
typename _InputIterator>
133 __glibcxx_check_valid_constructor_range(__first, __last)),
139 explicit multiset(
const _Compare& __comp,
141 :
_Base(__comp, __a) { }
143 template<
typename _InputIterator>
145 const _Compare& __comp = _Compare(),
148 __glibcxx_check_valid_constructor_range(__first, __last)),
153 :
_Base(__x._M_ref) { }
155#if __cplusplus >= 201103L
157 operator=(
const multiset&) =
default;
165 _Base::operator=(
__l);
166 this->_M_invalidate_all();
171 using _Base::get_allocator;
176 {
return iterator(_Base::begin(),
this); }
184 {
return iterator(_Base::end(),
this); }
206#if __cplusplus >= 201103L
208 cbegin()
const noexcept
212 cend()
const noexcept
216 crbegin()
const noexcept
220 crend()
const noexcept
227 using _Base::max_size;
230#if __cplusplus >= 201103L
231 template<
typename...
_Args>
236 template<
typename...
_Args>
250 insert(
const value_type& __x)
251 {
return iterator(_Base::insert(__x),
this); }
253#if __cplusplus >= 201103L
255 insert(value_type&& __x)
256 {
return { _Base::insert(
std::move(__x)),
this }; }
266#if __cplusplus >= 201103L
275 template<
typename _InputIterator>
280 __glibcxx_check_valid_range2(__first, __last,
__dist);
282 if (
__dist.second >= __gnu_debug::__dp_sign)
283 _Base::insert(__gnu_debug::__unsafe(__first),
284 __gnu_debug::__unsafe(__last));
286 _Base::insert(__first, __last);
289#if __cplusplus >= 201103L
292 { _Base::insert(
__l); }
295#if __cplusplus > 201402L
296 using node_type =
typename _Base::node_type;
316 insert(node_type&&
__nh)
329#if __cplusplus >= 201103L
330 _GLIBCXX_ABI_TAG_CXX11
359 _Base::equal_range(__x);
360 size_type __count = 0;
371#if __cplusplus >= 201103L
372 _GLIBCXX_ABI_TAG_CXX11
382 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::cend(),
383 _M_message(__gnu_debug::__msg_valid_range)
384 ._M_iterator(__first,
"first")
385 ._M_iterator(__last,
"last"));
389 return { _Base::erase(__first.base(), __last.
base()),
this };
401 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
402 _M_message(__gnu_debug::__msg_valid_range)
403 ._M_iterator(__first,
"first")
404 ._M_iterator(__last,
"last"));
407 _Base::erase(__first.base(), __last.
base());
422 this->_M_invalidate_all();
427 using _Base::key_comp;
428 using _Base::value_comp;
433 {
return iterator(_Base::find(__x),
this); }
441#if __cplusplus > 201103L
442 template<
typename _Kt,
444 typename __has_is_transparent<_Compare, _Kt>::type>
447 {
return { _Base::find(__x),
this }; }
449 template<
typename _Kt,
451 typename __has_is_transparent<_Compare, _Kt>::type>
453 find(
const _Kt& __x)
const
454 {
return { _Base::find(__x),
this }; }
461 {
return iterator(_Base::lower_bound(__x),
this); }
466 lower_bound(
const key_type& __x)
const
469#if __cplusplus > 201103L
470 template<
typename _Kt,
472 typename __has_is_transparent<_Compare, _Kt>::type>
474 lower_bound(
const _Kt& __x)
475 {
return { _Base::lower_bound(__x),
this }; }
477 template<
typename _Kt,
479 typename __has_is_transparent<_Compare, _Kt>::type>
481 lower_bound(
const _Kt& __x)
const
482 {
return { _Base::lower_bound(__x),
this }; }
487 {
return iterator(_Base::upper_bound(__x),
this); }
492 upper_bound(
const key_type& __x)
const
495#if __cplusplus > 201103L
496 template<
typename _Kt,
498 typename __has_is_transparent<_Compare, _Kt>::type>
500 upper_bound(
const _Kt& __x)
501 {
return { _Base::upper_bound(__x),
this }; }
503 template<
typename _Kt,
505 typename __has_is_transparent<_Compare, _Kt>::type>
507 upper_bound(
const _Kt& __x)
const
508 {
return { _Base::upper_bound(__x),
this }; }
515 _Base::equal_range(__x);
523 equal_range(
const key_type& __x)
const
526 _Base::equal_range(__x);
531#if __cplusplus > 201103L
532 template<
typename _Kt,
534 typename __has_is_transparent<_Compare, _Kt>::type>
536 equal_range(
const _Kt& __x)
538 auto __res = _Base::equal_range(__x);
539 return { {
__res.first,
this }, {
__res.second,
this } };
542 template<
typename _Kt,
544 typename __has_is_transparent<_Compare, _Kt>::type>
546 equal_range(
const _Kt& __x)
const
548 auto __res = _Base::equal_range(__x);
549 return { {
__res.first,
this }, {
__res.second,
this } };