46 multimap<_Key, _Tp, _Compare, _Allocator>, _Allocator,
47 __gnu_debug::_Safe_node_sequence>,
48 public _GLIBCXX_STD_C::multimap<_Key, _Tp, _Compare, _Allocator>
50 typedef _GLIBCXX_STD_C::multimap<
59 template<
typename _ItT,
typename _SeqT,
typename _CatT>
60 friend class ::__gnu_debug::_Safe_iterator;
65 typedef _Tp mapped_type;
67 typedef _Compare key_compare;
69 typedef typename _Base::reference reference;
70 typedef typename _Base::const_reference const_reference;
77 typedef typename _Base::size_type size_type;
78 typedef typename _Base::difference_type difference_type;
79 typedef typename _Base::pointer pointer;
80 typedef typename _Base::const_pointer const_pointer;
86#if __cplusplus < 201103L
99 const _Compare& __c = _Compare(),
108 :
_Base(__m, __a) { }
111 noexcept(
noexcept(
_Base(std::move(__m._M_base()), __a)) )
112 :
_Safe(std::move(__m._M_safe()), __a),
113 _Base(std::move(__m._M_base()), __a) { }
118 template<
typename _InputIterator>
122 __glibcxx_check_valid_constructor_range(__first, __last)),
128 explicit multimap(
const _Compare& __comp,
130 :
_Base(__comp, __a) { }
132 template<
typename _InputIterator>
134 const _Compare& __comp = _Compare(),
137 __glibcxx_check_valid_constructor_range(__first, __last)),
144#if __cplusplus < 201103L
148 this->_M_safe() = __x;
154 operator=(
const multimap&) =
default;
163 this->_M_invalidate_all();
168 using _Base::get_allocator;
173 {
return iterator(_Base::begin(),
this); }
181 {
return iterator(_Base::end(),
this); }
203#if __cplusplus >= 201103L
205 cbegin()
const noexcept
209 cend()
const noexcept
213 crbegin()
const noexcept
217 crend()
const noexcept
224 using _Base::max_size;
227#if __cplusplus >= 201103L
228 template<
typename...
_Args>
233 template<
typename...
_Args>
248 {
return iterator(_Base::insert(__x),
this); }
250#if __cplusplus >= 201103L
255 {
return { _Base::insert(std::move(__x)),
this }; }
257 template<
typename _Pair,
typename =
typename
259 _Pair&&>::value>::type>
265#if __cplusplus >= 201103L
268 { _Base::insert(
__list); }
272#if __cplusplus >= 201103L
282#if __cplusplus >= 201103L
289 return { _Base::insert(
__position.base(), std::move(__x)),
this };
292 template<
typename _Pair,
typename =
typename
294 _Pair&&>::value>::type>
307 template<
typename _InputIterator>
312 __glibcxx_check_valid_range2(__first, __last,
__dist);
314 if (
__dist.second >= __gnu_debug::__dp_sign)
315 _Base::insert(__gnu_debug::__unsafe(__first),
316 __gnu_debug::__unsafe(__last));
318 _Base::insert(__first, __last);
321#if __cplusplus > 201402L
322 using node_type =
typename _Base::node_type;
342 insert(node_type&&
__nh)
343 {
return { _Base::insert(std::move(
__nh)),
this }; }
349 return { _Base::insert(
__hint.base(), std::move(
__nh)),
this };
355#if __cplusplus >= 201103L
361 return { _Base::erase(
__position.base()),
this };
364 _GLIBCXX_ABI_TAG_CXX11
382 _Base::equal_range(__x);
383 size_type __count = 0;
394#if __cplusplus >= 201103L
404 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::cend(),
405 _M_message(__gnu_debug::__msg_valid_range)
406 ._M_iterator(__first,
"first")
407 ._M_iterator(__last,
"last"));
411 return { _Base::erase(__first.base(), __last.
base()),
this };
423 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
424 _M_message(__gnu_debug::__msg_valid_range)
425 ._M_iterator(__first,
"first")
426 ._M_iterator(__last,
"last"));
429 _Base::erase(__first.base(), __last.
base());
444 this->_M_invalidate_all();
449 using _Base::key_comp;
450 using _Base::value_comp;
455 {
return iterator(_Base::find(__x),
this); }
457#if __cplusplus > 201103L
458 template<
typename _Kt,
460 typename __has_is_transparent<_Compare, _Kt>::type>
463 {
return { _Base::find(__x),
this }; }
470#if __cplusplus > 201103L
471 template<
typename _Kt,
473 typename __has_is_transparent<_Compare, _Kt>::type>
475 find(
const _Kt& __x)
const
476 {
return { _Base::find(__x),
this }; }
483 {
return iterator(_Base::lower_bound(__x),
this); }
485#if __cplusplus > 201103L
486 template<
typename _Kt,
488 typename __has_is_transparent<_Compare, _Kt>::type>
490 lower_bound(
const _Kt& __x)
491 {
return { _Base::lower_bound(__x),
this }; }
495 lower_bound(
const key_type& __x)
const
498#if __cplusplus > 201103L
499 template<
typename _Kt,
501 typename __has_is_transparent<_Compare, _Kt>::type>
503 lower_bound(
const _Kt& __x)
const
504 {
return { _Base::lower_bound(__x),
this }; }
509 {
return iterator(_Base::upper_bound(__x),
this); }
511#if __cplusplus > 201103L
512 template<
typename _Kt,
514 typename __has_is_transparent<_Compare, _Kt>::type>
516 upper_bound(
const _Kt& __x)
517 {
return { _Base::upper_bound(__x),
this }; }
521 upper_bound(
const key_type& __x)
const
524#if __cplusplus > 201103L
525 template<
typename _Kt,
527 typename __has_is_transparent<_Compare, _Kt>::type>
529 upper_bound(
const _Kt& __x)
const
530 {
return { _Base::upper_bound(__x),
this }; }
537 _Base::equal_range(__x);
542#if __cplusplus > 201103L
543 template<
typename _Kt,
545 typename __has_is_transparent<_Compare, _Kt>::type>
547 equal_range(
const _Kt& __x)
549 auto __res = _Base::equal_range(__x);
550 return { {
__res.first,
this }, {
__res.second,
this } };
555 equal_range(
const key_type& __x)
const
558 _Base::equal_range(__x);
563#if __cplusplus > 201103L
564 template<
typename _Kt,
566 typename __has_is_transparent<_Compare, _Kt>::type>
568 equal_range(
const _Kt& __x)
const
570 auto __res = _Base::equal_range(__x);
571 return { {
__res.first,
this }, {
__res.second,
this } };