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<
62 typedef _Tp mapped_type;
64 typedef _Compare key_compare;
66 typedef typename _Base::reference reference;
67 typedef typename _Base::const_reference const_reference;
74 typedef typename _Base::size_type size_type;
75 typedef typename _Base::difference_type difference_type;
76 typedef typename _Base::pointer pointer;
77 typedef typename _Base::const_pointer const_pointer;
83#if __cplusplus < 201103L
96 const _Compare& __c = _Compare(),
105 :
_Base(__m, __a) { }
108 :
_Safe(std::move(__m._M_safe()), __a),
109 _Base(std::move(__m._M_base()), __a) { }
114 template<
typename _InputIterator>
117 :
_Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
119 __gnu_debug::__base(__last), __a) { }
124 explicit multimap(
const _Compare& __comp,
126 :
_Base(__comp, __a) { }
128 template<
typename _InputIterator>
130 const _Compare& __comp = _Compare(),
132 :
_Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
134 __gnu_debug::__base(__last),
140#if __cplusplus < 201103L
144 this->_M_safe() = __x;
150 operator=(
const multimap&) =
default;
159 this->_M_invalidate_all();
164 using _Base::get_allocator;
169 {
return iterator(_Base::begin(),
this); }
177 {
return iterator(_Base::end(),
this); }
199#if __cplusplus >= 201103L
201 cbegin()
const noexcept
205 cend()
const noexcept
209 crbegin()
const noexcept
213 crend()
const noexcept
220 using _Base::max_size;
223#if __cplusplus >= 201103L
224 template<
typename...
_Args>
231 template<
typename...
_Args>
244 {
return iterator(_Base::insert(__x),
this); }
246#if __cplusplus >= 201103L
247 template<
typename _Pair,
typename =
typename
249 _Pair&&>::value>::type>
255#if __cplusplus >= 201103L
258 { _Base::insert(
__list); }
262#if __cplusplus >= 201103L
272#if __cplusplus >= 201103L
273 template<
typename _Pair,
typename =
typename
275 _Pair&&>::value>::type>
285 template<
typename _InputIterator>
290 __glibcxx_check_valid_range2(__first, __last,
__dist);
292 if (
__dist.second >= __gnu_debug::__dp_sign)
293 _Base::insert(__gnu_debug::__unsafe(__first),
294 __gnu_debug::__unsafe(__last));
296 _Base::insert(__first, __last);
299#if __cplusplus >= 201103L
325 _Base::equal_range(__x);
326 size_type __count = 0;
337#if __cplusplus >= 201103L
347 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
348 _M_message(__gnu_debug::__msg_valid_range)
349 ._M_iterator(__first,
"first")
350 ._M_iterator(__last,
"last"));
353 return iterator(_Base::erase(__first.base(), __last.
base()),
this);
365 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
366 _M_message(__gnu_debug::__msg_valid_range)
367 ._M_iterator(__first,
"first")
368 ._M_iterator(__last,
"last"));
371 _Base::erase(__first.base(), __last.
base());
386 this->_M_invalidate_all();
391 using _Base::key_comp;
392 using _Base::value_comp;
397 {
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 }; }
412#if __cplusplus > 201103L
413 template<
typename _Kt,
415 typename __has_is_transparent<_Compare, _Kt>::type>
417 find(
const _Kt& __x)
const
418 {
return { _Base::find(__x),
this }; }
425 {
return iterator(_Base::lower_bound(__x),
this); }
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 }; }
437 lower_bound(
const key_type& __x)
const
440#if __cplusplus > 201103L
441 template<
typename _Kt,
443 typename __has_is_transparent<_Compare, _Kt>::type>
445 lower_bound(
const _Kt& __x)
const
446 {
return { _Base::lower_bound(__x),
this }; }
451 {
return iterator(_Base::upper_bound(__x),
this); }
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 }; }
463 upper_bound(
const key_type& __x)
const
466#if __cplusplus > 201103L
467 template<
typename _Kt,
469 typename __has_is_transparent<_Compare, _Kt>::type>
471 upper_bound(
const _Kt& __x)
const
472 {
return { _Base::upper_bound(__x),
this }; }
479 _Base::equal_range(__x);
484#if __cplusplus > 201103L
485 template<
typename _Kt,
487 typename __has_is_transparent<_Compare, _Kt>::type>
489 equal_range(
const _Kt& __x)
491 auto __res = _Base::equal_range(__x);
492 return { {
__res.first,
this }, {
__res.second,
this } };
497 equal_range(
const key_type& __x)
const
500 _Base::equal_range(__x);
505#if __cplusplus > 201103L
506 template<
typename _Kt,
508 typename __has_is_transparent<_Compare, _Kt>::type>
510 equal_range(
const _Kt& __x)
const
512 auto __res = _Base::equal_range(__x);
513 return { {
__res.first,
this }, {
__res.second,
this } };
541 operator<(
const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
548 operator<=(
const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
555 operator>=(
const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
562 operator>(
const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
569 swap(multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
constexpr pair< typename __decay_and_strip< _T1 >::__type, typename __decay_and_strip< _T2 >::__type > make_pair(_T1 &&__x, _T2 &&__y)
A convenience wrapper for creating a pair from two objects.