46 map<_Key, _Tp, _Compare, _Allocator>, _Allocator,
47 __gnu_debug::_Safe_node_sequence>,
48 public _GLIBCXX_STD_C::map<_Key, _Tp, _Compare, _Allocator>
50 typedef _GLIBCXX_STD_C::map<
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)),
132 explicit map(
const _Compare& __comp,
134 :
_Base(__comp, __a) { }
136 template<
typename _InputIterator>
138 const _Compare& __comp = _Compare(),
141 __glibcxx_check_valid_constructor_range(__first, __last)),
145#if __cplusplus < 201103L
147 operator=(
const map& __x)
149 this->_M_safe() = __x;
155 operator=(
const map&) =
default;
158 operator=(
map&&) =
default;
164 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 using _Base::operator[];
237#if __cplusplus >= 201103L
238 template<
typename...
_Args>
243 return { {
__res.first,
this },
__res.second };
246 template<
typename...
_Args>
267#if __cplusplus >= 201103L
273 auto __res = _Base::insert(std::move(__x));
274 return { {
__res.first,
this },
__res.second };
277 template<
typename _Pair,
typename =
typename
279 _Pair&&>::value>::type>
284 return { {
__res.first,
this },
__res.second };
288#if __cplusplus >= 201103L
291 { _Base::insert(
__list); }
295#if __cplusplus >= 201103L
305#if __cplusplus >= 201103L
312 return { _Base::insert(
__position.base(), std::move(__x)),
this };
315 template<
typename _Pair,
typename =
typename
317 _Pair&&>::value>::type>
330 template<
typename _InputIterator>
335 __glibcxx_check_valid_range2(__first, __last,
__dist);
337 if (
__dist.second >= __gnu_debug::__dp_sign)
338 _Base::insert(__gnu_debug::__unsafe(__first),
339 __gnu_debug::__unsafe(__last));
341 _Base::insert(__first, __last);
345#if __cplusplus > 201402L
346 template <
typename...
_Args>
350 auto __res = _Base::try_emplace(
__k,
352 return { {
__res.first,
this },
__res.second };
355 template <
typename...
_Args>
359 auto __res = _Base::try_emplace(std::move(
__k),
361 return { {
__res.first,
this },
__res.second };
364 template <
typename...
_Args>
378 template <
typename...
_Args>
385 _Base::try_emplace(
__hint.base(), std::move(
__k),
391 template <
typename _Obj>
395 auto __res = _Base::insert_or_assign(
__k,
397 return { {
__res.first,
this },
__res.second };
400 template <
typename _Obj>
404 auto __res = _Base::insert_or_assign(std::move(
__k),
406 return { {
__res.first,
this },
__res.second };
409 template <
typename _Obj>
417 _Base::insert_or_assign(
__hint.base(),
__k,
423 template <
typename _Obj>
430 _Base::insert_or_assign(
__hint.base(), std::move(
__k),
437#if __cplusplus > 201402L
438 using node_type =
typename _Base::node_type;
459 insert(node_type&&
__nh)
461 auto __ret = _Base::insert(std::move(
__nh));
470 return { _Base::insert(
__hint.base(), std::move(
__nh)),
this };
476#if __cplusplus >= 201103L
482 return { _Base::erase(
__position.base()),
this };
485 _GLIBCXX_ABI_TAG_CXX11
513#if __cplusplus >= 201103L
523 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::cend(),
524 _M_message(__gnu_debug::__msg_valid_range)
525 ._M_iterator(__first,
"first")
526 ._M_iterator(__last,
"last"));
530 return { _Base::erase(__first.base(), __last.
base()),
this };
542 _GLIBCXX_DEBUG_VERIFY(
__victim != _Base::end(),
543 _M_message(__gnu_debug::__msg_valid_range)
544 ._M_iterator(__first,
"first")
545 ._M_iterator(__last,
"last"));
548 _Base::erase(__first.base(), __last.
base());
563 this->_M_invalidate_all();
568 using _Base::key_comp;
569 using _Base::value_comp;
574 {
return iterator(_Base::find(__x),
this); }
576#if __cplusplus > 201103L
577 template<
typename _Kt,
579 typename __has_is_transparent<_Compare, _Kt>::type>
582 {
return { _Base::find(__x),
this }; }
589#if __cplusplus > 201103L
590 template<
typename _Kt,
592 typename __has_is_transparent<_Compare, _Kt>::type>
594 find(
const _Kt& __x)
const
595 {
return { _Base::find(__x),
this }; }
602 {
return iterator(_Base::lower_bound(__x),
this); }
604#if __cplusplus > 201103L
605 template<
typename _Kt,
607 typename __has_is_transparent<_Compare, _Kt>::type>
609 lower_bound(
const _Kt& __x)
610 {
return { _Base::lower_bound(__x),
this }; }
614 lower_bound(
const key_type& __x)
const
617#if __cplusplus > 201103L
618 template<
typename _Kt,
620 typename __has_is_transparent<_Compare, _Kt>::type>
622 lower_bound(
const _Kt& __x)
const
623 {
return { _Base::lower_bound(__x),
this }; }
628 {
return iterator(_Base::upper_bound(__x),
this); }
630#if __cplusplus > 201103L
631 template<
typename _Kt,
633 typename __has_is_transparent<_Compare, _Kt>::type>
635 upper_bound(
const _Kt& __x)
636 {
return { _Base::upper_bound(__x),
this }; }
640 upper_bound(
const key_type& __x)
const
643#if __cplusplus > 201103L
644 template<
typename _Kt,
646 typename __has_is_transparent<_Compare, _Kt>::type>
648 upper_bound(
const _Kt& __x)
const
649 {
return { _Base::upper_bound(__x),
this }; }
656 _Base::equal_range(__x);
661#if __cplusplus > 201103L
662 template<
typename _Kt,
664 typename __has_is_transparent<_Compare, _Kt>::type>
666 equal_range(
const _Kt& __x)
668 auto __res = _Base::equal_range(__x);
669 return { {
__res.first,
this }, {
__res.second,
this } };
674 equal_range(
const key_type& __x)
const
677 _Base::equal_range(__x);
682#if __cplusplus > 201103L
683 template<
typename _Kt,
685 typename __has_is_transparent<_Compare, _Kt>::type>
687 equal_range(
const _Kt& __x)
const
689 auto __res = _Base::equal_range(__x);
690 return { {
__res.first,
this }, {
__res.second,
this } };