29 #ifndef _GLIBCXX_DEBUG_UNORDERED_SET
30 #define _GLIBCXX_DEBUG_UNORDERED_SET 1
32 #pragma GCC system_header
34 #if __cplusplus < 201103L
38 namespace std _GLIBCXX_VISIBILITY(default) {
namespace __debug {
39 template<
typename _Key,
typename _Hash,
typename _Pred,
typename _Allocator>
41 template<
typename _Key,
typename _Hash,
typename _Pred,
typename _Allocator>
42 class unordered_multiset;
51 namespace std _GLIBCXX_VISIBILITY(default)
56 template<
typename _Value,
62 unordered_set<_Value, _Hash, _Pred, _Alloc>, _Alloc,
63 __gnu_debug::_Safe_unordered_container>,
64 public _GLIBCXX_STD_C::unordered_set<_Value, _Hash, _Pred, _Alloc>
66 typedef _GLIBCXX_STD_C::unordered_set<
67 _Value, _Hash, _Pred, _Alloc>
_Base;
71 typedef typename _Base::const_iterator _Base_const_iterator;
72 typedef typename _Base::iterator _Base_iterator;
73 typedef typename _Base::const_local_iterator _Base_const_local_iterator;
74 typedef typename _Base::local_iterator _Base_local_iterator;
76 template<
typename _ItT,
typename _SeqT,
typename _CatT>
77 friend class ::__gnu_debug::_Safe_iterator;
78 template<
typename _ItT,
typename _SeqT>
79 friend class ::__gnu_debug::_Safe_local_iterator;
84 _Base_ref(
const _Base& __r) : _M_ref(__r) { }
90 typedef typename _Base::size_type size_type;
91 typedef typename _Base::hasher hasher;
92 typedef typename _Base::key_equal key_equal;
93 typedef typename _Base::allocator_type allocator_type;
95 typedef typename _Base::key_type key_type;
96 typedef typename _Base::value_type value_type;
111 const hasher& __hf = hasher(),
112 const key_equal& __eql = key_equal(),
113 const allocator_type& __a = allocator_type())
114 :
_Base(__n, __hf, __eql, __a) { }
116 template<
typename _InputIterator>
119 const hasher& __hf = hasher(),
120 const key_equal& __eql = key_equal(),
121 const allocator_type& __a = allocator_type())
123 __glibcxx_check_valid_constructor_range(__first, __last)),
125 __hf, __eql, __a) { }
130 :
_Base(__x._M_ref) { }
139 const allocator_type& __a)
140 :
_Base(__uset, __a) { }
143 const allocator_type& __a)
150 const hasher& __hf = hasher(),
151 const key_equal& __eql = key_equal(),
152 const allocator_type& __a = allocator_type())
153 :
_Base(__l, __n, __hf, __eql, __a) { }
160 const allocator_type& __a)
164 template<
typename _InputIterator>
167 const allocator_type& __a)
168 :
unordered_set(__first, __last, __n, hasher(), key_equal(), __a)
171 template<
typename _InputIterator>
173 size_type __n,
const hasher& __hf,
174 const allocator_type& __a)
175 :
unordered_set(__first, __last, __n, __hf, key_equal(), __a)
180 const allocator_type& __a)
185 size_type __n,
const hasher& __hf,
186 const allocator_type& __a)
202 this->_M_invalidate_all();
208 noexcept( noexcept(declval<_Base&>().swap(__x)) )
218 this->_M_invalidate_all();
223 {
return { _Base::begin(),
this }; }
226 begin()
const noexcept
227 {
return { _Base::begin(),
this }; }
231 {
return { _Base::end(),
this }; }
235 {
return { _Base::end(),
this }; }
238 cbegin()
const noexcept
239 {
return { _Base::cbegin(),
this }; }
242 cend()
const noexcept
243 {
return { _Base::cend(),
this }; }
249 __glibcxx_check_bucket_index(__b);
250 return { _Base::begin(__b),
this };
256 __glibcxx_check_bucket_index(__b);
257 return { _Base::end(__b),
this };
261 begin(size_type __b)
const
263 __glibcxx_check_bucket_index(__b);
264 return { _Base::begin(__b),
this };
268 end(size_type __b)
const
270 __glibcxx_check_bucket_index(__b);
271 return { _Base::end(__b),
this };
275 cbegin(size_type __b)
const
277 __glibcxx_check_bucket_index(__b);
278 return { _Base::cbegin(__b),
this };
282 cend(size_type __b)
const
284 __glibcxx_check_bucket_index(__b);
285 return { _Base::cend(__b),
this };
289 bucket_size(size_type __b)
const
291 __glibcxx_check_bucket_index(__b);
292 return _Base::bucket_size(__b);
296 max_load_factor()
const noexcept
297 {
return _Base::max_load_factor(); }
300 max_load_factor(
float __f)
302 __glibcxx_check_max_load_factor(__f);
303 _Base::max_load_factor(__f);
306 template<
typename... _Args>
308 emplace(_Args&&... __args)
310 size_type __bucket_count = this->bucket_count();
311 auto __res = _Base::emplace(std::forward<_Args>(__args)...);
312 _M_check_rehashed(__bucket_count);
313 return { { __res.first,
this }, __res.second };
316 template<
typename... _Args>
321 size_type __bucket_count = this->bucket_count();
322 auto __it = _Base::emplace_hint(__hint.
base(),
323 std::forward<_Args>(__args)...);
324 _M_check_rehashed(__bucket_count);
325 return { __it,
this };
329 insert(
const value_type& __obj)
331 size_type __bucket_count = this->bucket_count();
332 auto __res = _Base::insert(__obj);
333 _M_check_rehashed(__bucket_count);
334 return { { __res.first,
this }, __res.second };
341 size_type __bucket_count = this->bucket_count();
342 auto __it = _Base::insert(__hint.
base(), __obj);
343 _M_check_rehashed(__bucket_count);
344 return { __it,
this };
348 insert(value_type&& __obj)
350 size_type __bucket_count = this->bucket_count();
351 auto __res = _Base::insert(
std::move(__obj));
352 _M_check_rehashed(__bucket_count);
353 return { { __res.first,
this }, __res.second };
360 size_type __bucket_count = this->bucket_count();
362 _M_check_rehashed(__bucket_count);
363 return { __it,
this };
369 size_type __bucket_count = this->bucket_count();
371 _M_check_rehashed(__bucket_count);
374 template<
typename _InputIterator>
376 insert(_InputIterator __first, _InputIterator __last)
379 __glibcxx_check_valid_range2(__first, __last, __dist);
380 size_type __bucket_count = this->bucket_count();
382 if (__dist.
second >= __gnu_debug::__dp_sign)
383 _Base::insert(__gnu_debug::__unsafe(__first),
384 __gnu_debug::__unsafe(__last));
386 _Base::insert(__first, __last);
388 _M_check_rehashed(__bucket_count);
391 #if __cplusplus > 201402L
392 using node_type =
typename _Base::node_type;
399 return _M_extract(__position.
base());
403 extract(
const key_type& __key)
405 const auto __position = _Base::find(__key);
406 if (__position != _Base::end())
407 return _M_extract(__position);
412 insert(node_type&& __nh)
414 auto __ret = _Base::insert(
std::move(__nh));
416 { { __ret.position,
this }, __ret.inserted,
std::move(__ret.node) };
423 return { _Base::insert(__hint.
base(),
std::move(__nh)),
this };
430 find(
const key_type& __key)
431 {
return { _Base::find(__key),
this }; }
434 find(
const key_type& __key)
const
435 {
return { _Base::find(__key),
this }; }
438 equal_range(
const key_type& __key)
440 auto __res = _Base::equal_range(__key);
441 return { { __res.first,
this }, { __res.second,
this } };
445 equal_range(
const key_type& __key)
const
447 auto __res = _Base::equal_range(__key);
448 return { { __res.first,
this }, { __res.second,
this } };
452 erase(
const key_type& __key)
455 auto __victim = _Base::find(__key);
456 if (__victim != _Base::end())
468 return { _M_erase(__it.
base()),
this };
475 return { _M_erase(__it.
base()),
this };
482 for (
auto __tmp = __first.base(); __tmp != __last.
base(); ++__tmp)
484 _GLIBCXX_DEBUG_VERIFY(__tmp != _Base::cend(),
485 _M_message(__gnu_debug::__msg_valid_range)
486 ._M_iterator(__first,
"first")
487 ._M_iterator(__last,
"last"));
488 _M_invalidate(__tmp);
491 size_type __bucket_count = this->bucket_count();
492 auto __next = _Base::erase(__first.base(), __last.
base());
493 _M_check_rehashed(__bucket_count);
494 return { __next,
this };
498 _M_base() noexcept {
return *
this; }
501 _M_base()
const noexcept {
return *
this; }
505 _M_check_rehashed(size_type __prev_count)
507 if (__prev_count != this->bucket_count())
508 this->_M_invalidate_all();
512 _M_invalidate(_Base_const_iterator __victim)
515 [__victim](_Base_const_iterator __it) {
return __it == __victim; });
517 [__victim](_Base_const_local_iterator __it)
518 {
return __it == __victim; });
522 _M_erase(_Base_const_iterator __victim)
524 _M_invalidate(__victim);
525 size_type __bucket_count = this->bucket_count();
526 _Base_iterator __next = _Base::erase(__victim);
527 _M_check_rehashed(__bucket_count);
531 #if __cplusplus > 201402L
533 _M_extract(_Base_const_iterator __victim)
535 _M_invalidate(__victim);
536 return _Base::extract(__victim);
541 #if __cpp_deduction_guides >= 201606
543 template<
typename _InputIterator,
548 typename _Allocator =
550 typename = _RequireInputIter<_InputIterator>,
551 typename = _RequireNotAllocatorOrIntegral<_Hash>,
552 typename = _RequireNotAllocator<_Pred>,
553 typename = _RequireAllocator<_Allocator>>
555 unordered_set<int>::size_type = {},
556 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
558 _Hash, _Pred, _Allocator>;
560 template<
typename _Tp,
typename _Hash = hash<_Tp>,
561 typename _Pred = equal_to<_Tp>,
562 typename _Allocator = allocator<_Tp>,
563 typename = _RequireNotAllocatorOrIntegral<_Hash>,
564 typename = _RequireNotAllocator<_Pred>,
565 typename = _RequireAllocator<_Allocator>>
567 unordered_set<int>::size_type = {},
568 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
569 -> unordered_set<_Tp, _Hash, _Pred, _Allocator>;
571 template<
typename _InputIterator,
typename _Allocator,
572 typename = _RequireInputIter<_InputIterator>,
573 typename = _RequireAllocator<_Allocator>>
574 unordered_set(_InputIterator, _InputIterator,
575 unordered_set<int>::size_type, _Allocator)
576 -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
578 typename iterator_traits<_InputIterator>::value_type>,
580 typename iterator_traits<_InputIterator>::value_type>,
583 template<
typename _InputIterator,
typename _Hash,
typename _Allocator,
584 typename = _RequireInputIter<_InputIterator>,
585 typename = _RequireNotAllocatorOrIntegral<_Hash>,
586 typename = _RequireAllocator<_Allocator>>
587 unordered_set(_InputIterator, _InputIterator,
588 unordered_set<int>::size_type,
590 -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
593 typename iterator_traits<_InputIterator>::value_type>,
596 template<
typename _Tp,
typename _Allocator,
597 typename = _RequireAllocator<_Allocator>>
598 unordered_set(initializer_list<_Tp>,
599 unordered_set<int>::size_type, _Allocator)
600 -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
602 template<
typename _Tp,
typename _Hash,
typename _Allocator,
603 typename = _RequireNotAllocatorOrIntegral<_Hash>,
604 typename = _RequireAllocator<_Allocator>>
605 unordered_set(initializer_list<_Tp>,
606 unordered_set<int>::size_type, _Hash, _Allocator)
607 -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
611 template<
typename _Value,
typename _Hash,
typename _Pred,
typename _Alloc>
613 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
614 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
615 noexcept(noexcept(__x.swap(__y)))
618 template<
typename _Value,
typename _Hash,
typename _Pred,
typename _Alloc>
620 operator==(
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
621 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
622 {
return __x._M_base() == __y._M_base(); }
624 #if __cpp_impl_three_way_comparison < 201907L
625 template<
typename _Value,
typename _Hash,
typename _Pred,
typename _Alloc>
627 operator!=(
const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
628 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
629 {
return !(__x == __y); }
633 template<
typename _Value,
639 unordered_multiset<_Value, _Hash, _Pred, _Alloc>, _Alloc,
640 __gnu_debug::_Safe_unordered_container>,
641 public _GLIBCXX_STD_C::unordered_multiset<_Value, _Hash, _Pred, _Alloc>
643 typedef _GLIBCXX_STD_C::unordered_multiset<
644 _Value, _Hash, _Pred, _Alloc>
_Base;
647 typedef typename _Base::const_iterator _Base_const_iterator;
648 typedef typename _Base::iterator _Base_iterator;
649 typedef typename _Base::const_local_iterator
650 _Base_const_local_iterator;
651 typedef typename _Base::local_iterator _Base_local_iterator;
653 template<
typename _ItT,
typename _SeqT,
typename _CatT>
654 friend class ::__gnu_debug::_Safe_iterator;
655 template<
typename _ItT,
typename _SeqT>
656 friend class ::__gnu_debug::_Safe_local_iterator;
661 _Base_ref(
const _Base& __r) : _M_ref(__r) { }
667 typedef typename _Base::size_type size_type;
668 typedef typename _Base::hasher hasher;
669 typedef typename _Base::key_equal key_equal;
670 typedef typename _Base::allocator_type allocator_type;
672 typedef typename _Base::key_type key_type;
673 typedef typename _Base::value_type value_type;
688 const hasher& __hf = hasher(),
689 const key_equal& __eql = key_equal(),
690 const allocator_type& __a = allocator_type())
691 :
_Base(__n, __hf, __eql, __a) { }
693 template<
typename _InputIterator>
696 const hasher& __hf = hasher(),
697 const key_equal& __eql = key_equal(),
698 const allocator_type& __a = allocator_type())
700 __glibcxx_check_valid_constructor_range(__first, __last)),
702 __hf, __eql, __a) { }
707 :
_Base(__x._M_ref) { }
716 const allocator_type& __a)
717 :
_Base(__uset, __a) { }
720 const allocator_type& __a)
727 const hasher& __hf = hasher(),
728 const key_equal& __eql = key_equal(),
729 const allocator_type& __a = allocator_type())
730 :
_Base(__l, __n, __hf, __eql, __a) { }
737 const allocator_type& __a)
741 template<
typename _InputIterator>
744 const allocator_type& __a)
748 template<
typename _InputIterator>
750 size_type __n,
const hasher& __hf,
751 const allocator_type& __a)
757 const allocator_type& __a)
762 size_type __n,
const hasher& __hf,
763 const allocator_type& __a)
778 this->_M_base() = __l;
779 this->_M_invalidate_all();
785 noexcept( noexcept(declval<_Base&>().swap(__x)) )
795 this->_M_invalidate_all();
800 {
return { _Base::begin(),
this }; }
803 begin()
const noexcept
804 {
return { _Base::begin(),
this }; }
808 {
return { _Base::end(),
this }; }
812 {
return { _Base::end(),
this }; }
815 cbegin()
const noexcept
816 {
return { _Base::cbegin(),
this }; }
819 cend()
const noexcept
820 {
return { _Base::cend(),
this }; }
826 __glibcxx_check_bucket_index(__b);
827 return { _Base::begin(__b),
this };
833 __glibcxx_check_bucket_index(__b);
834 return { _Base::end(__b),
this };
838 begin(size_type __b)
const
840 __glibcxx_check_bucket_index(__b);
841 return { _Base::begin(__b),
this };
845 end(size_type __b)
const
847 __glibcxx_check_bucket_index(__b);
848 return { _Base::end(__b),
this };
852 cbegin(size_type __b)
const
854 __glibcxx_check_bucket_index(__b);
855 return { _Base::cbegin(__b),
this };
859 cend(size_type __b)
const
861 __glibcxx_check_bucket_index(__b);
862 return { _Base::cend(__b),
this };
866 bucket_size(size_type __b)
const
868 __glibcxx_check_bucket_index(__b);
869 return _Base::bucket_size(__b);
873 max_load_factor()
const noexcept
874 {
return _Base::max_load_factor(); }
877 max_load_factor(
float __f)
879 __glibcxx_check_max_load_factor(__f);
880 _Base::max_load_factor(__f);
883 template<
typename... _Args>
885 emplace(_Args&&... __args)
887 size_type __bucket_count = this->bucket_count();
888 auto __it = _Base::emplace(std::forward<_Args>(__args)...);
889 _M_check_rehashed(__bucket_count);
890 return { __it,
this };
893 template<
typename... _Args>
898 size_type __bucket_count = this->bucket_count();
899 auto __it = _Base::emplace_hint(__hint.
base(),
900 std::forward<_Args>(__args)...);
901 _M_check_rehashed(__bucket_count);
902 return { __it,
this };
906 insert(
const value_type& __obj)
908 size_type __bucket_count = this->bucket_count();
909 auto __it = _Base::insert(__obj);
910 _M_check_rehashed(__bucket_count);
911 return { __it,
this };
918 size_type __bucket_count = this->bucket_count();
919 auto __it = _Base::insert(__hint.
base(), __obj);
920 _M_check_rehashed(__bucket_count);
921 return { __it,
this };
925 insert(value_type&& __obj)
927 size_type __bucket_count = this->bucket_count();
928 auto __it = _Base::insert(
std::move(__obj));
929 _M_check_rehashed(__bucket_count);
930 return { __it,
this };
937 size_type __bucket_count = this->bucket_count();
939 _M_check_rehashed(__bucket_count);
940 return { __it,
this };
946 size_type __bucket_count = this->bucket_count();
948 _M_check_rehashed(__bucket_count);
951 template<
typename _InputIterator>
953 insert(_InputIterator __first, _InputIterator __last)
956 __glibcxx_check_valid_range2(__first, __last, __dist);
957 size_type __bucket_count = this->bucket_count();
959 if (__dist.
second >= __gnu_debug::__dp_sign)
960 _Base::insert(__gnu_debug::__unsafe(__first),
961 __gnu_debug::__unsafe(__last));
963 _Base::insert(__first, __last);
965 _M_check_rehashed(__bucket_count);
968 #if __cplusplus > 201402L
969 using node_type =
typename _Base::node_type;
975 return _M_extract(__position.
base());
979 extract(
const key_type& __key)
981 const auto __position = _Base::find(__key);
982 if (__position != _Base::end())
983 return _M_extract(__position);
988 insert(node_type&& __nh)
989 {
return { _Base::insert(
std::move(__nh)),
this }; }
995 return { _Base::insert(__hint.
base(),
std::move(__nh)),
this };
1002 find(
const key_type& __key)
1003 {
return { _Base::find(__key),
this }; }
1006 find(
const key_type& __key)
const
1007 {
return { _Base::find(__key),
this }; }
1010 equal_range(
const key_type& __key)
1012 auto __res = _Base::equal_range(__key);
1013 return { { __res.first,
this }, { __res.second,
this } };
1017 equal_range(
const key_type& __key)
const
1019 auto __res = _Base::equal_range(__key);
1020 return { { __res.first,
this }, { __res.second,
this } };
1024 erase(
const key_type& __key)
1027 auto __pair = _Base::equal_range(__key);
1028 for (
auto __victim = __pair.first; __victim != __pair.second;)
1030 _M_invalidate(__victim);
1031 __victim = _Base::erase(__victim);
1042 return { _M_erase(__it.
base()),
this };
1049 return { _M_erase(__it.
base()),
this };
1056 for (
auto __tmp = __first.base(); __tmp != __last.
base(); ++__tmp)
1058 _GLIBCXX_DEBUG_VERIFY(__tmp != _Base::cend(),
1059 _M_message(__gnu_debug::__msg_valid_range)
1060 ._M_iterator(__first,
"first")
1061 ._M_iterator(__last,
"last"));
1062 _M_invalidate(__tmp);
1064 return { _Base::erase(__first.base(), __last.
base()),
this };
1068 _M_base() noexcept {
return *
this; }
1071 _M_base()
const noexcept {
return *
this; }
1075 _M_check_rehashed(size_type __prev_count)
1077 if (__prev_count != this->bucket_count())
1078 this->_M_invalidate_all();
1082 _M_invalidate(_Base_const_iterator __victim)
1085 [__victim](_Base_const_iterator __it) {
return __it == __victim; });
1087 [__victim](_Base_const_local_iterator __it)
1088 {
return __it == __victim; });
1092 _M_erase(_Base_const_iterator __victim)
1094 _M_invalidate(__victim);
1095 size_type __bucket_count = this->bucket_count();
1096 _Base_iterator __next = _Base::erase(__victim);
1097 _M_check_rehashed(__bucket_count);
1101 #if __cplusplus > 201402L
1103 _M_extract(_Base_const_iterator __victim)
1105 _M_invalidate(__victim);
1106 return _Base::extract(__victim);
1111 #if __cpp_deduction_guides >= 201606
1113 template<
typename _InputIterator,
1118 typename _Allocator =
1120 typename = _RequireInputIter<_InputIterator>,
1121 typename = _RequireNotAllocatorOrIntegral<_Hash>,
1122 typename = _RequireNotAllocator<_Pred>,
1123 typename = _RequireAllocator<_Allocator>>
1125 unordered_multiset<int>::size_type = {},
1126 _Hash = _Hash(), _Pred = _Pred(),
1127 _Allocator = _Allocator())
1129 _Hash, _Pred, _Allocator>;
1131 template<
typename _Tp,
typename _Hash = hash<_Tp>,
1132 typename _Pred = equal_to<_Tp>,
1133 typename _Allocator = allocator<_Tp>,
1134 typename = _RequireNotAllocatorOrIntegral<_Hash>,
1135 typename = _RequireNotAllocator<_Pred>,
1136 typename = _RequireAllocator<_Allocator>>
1138 unordered_multiset<int>::size_type = {},
1139 _Hash = _Hash(), _Pred = _Pred(),
1140 _Allocator = _Allocator())
1141 -> unordered_multiset<_Tp, _Hash, _Pred, _Allocator>;
1143 template<
typename _InputIterator,
typename _Allocator,
1144 typename = _RequireInputIter<_InputIterator>,
1145 typename = _RequireAllocator<_Allocator>>
1146 unordered_multiset(_InputIterator, _InputIterator,
1147 unordered_multiset<int>::size_type, _Allocator)
1148 -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type,
1150 iterator_traits<_InputIterator>::value_type>,
1152 iterator_traits<_InputIterator>::value_type>,
1155 template<
typename _InputIterator,
typename _Hash,
typename _Allocator,
1156 typename = _RequireInputIter<_InputIterator>,
1157 typename = _RequireNotAllocatorOrIntegral<_Hash>,
1158 typename = _RequireAllocator<_Allocator>>
1159 unordered_multiset(_InputIterator, _InputIterator,
1160 unordered_multiset<int>::size_type,
1162 -> unordered_multiset<
typename
1163 iterator_traits<_InputIterator>::value_type,
1167 iterator_traits<_InputIterator>::value_type>,
1170 template<
typename _Tp,
typename _Allocator,
1171 typename = _RequireAllocator<_Allocator>>
1172 unordered_multiset(initializer_list<_Tp>,
1173 unordered_multiset<int>::size_type, _Allocator)
1174 -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
1176 template<
typename _Tp,
typename _Hash,
typename _Allocator,
1177 typename = _RequireNotAllocatorOrIntegral<_Hash>,
1178 typename = _RequireAllocator<_Allocator>>
1179 unordered_multiset(initializer_list<_Tp>,
1180 unordered_multiset<int>::size_type, _Hash, _Allocator)
1181 -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
1185 template<
typename _Value,
typename _Hash,
typename _Pred,
typename _Alloc>
1187 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1188 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1189 noexcept(noexcept(__x.swap(__y)))
1192 template<
typename _Value,
typename _Hash,
typename _Pred,
typename _Alloc>
1194 operator==(
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1195 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1196 {
return __x._M_base() == __y._M_base(); }
1198 #if __cpp_impl_three_way_comparison < 201907L
1199 template<
typename _Value,
typename _Hash,
typename _Pred,
typename _Alloc>
1201 operator!=(
const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
1202 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
1203 {
return !(__x == __y); }
#define __glibcxx_check_insert(_Position)
#define __glibcxx_check_erase_range(_First, _Last)
#define __glibcxx_check_erase(_Position)
_T2 second
The second member.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
ISO C++ entities toplevel namespace is std.
constexpr _Iterator __base(_Iterator __it)
Primary class template hash.
The standard allocator, as per [20.4].
Traits class for iterators.
Return type of insert(node_handle&&) on unique maps/sets.
One of the comparison functors.
Struct holding two objects of arbitrary type.
A standard container composed of equivalent keys (possibly containing multiple of each key value) in ...
A standard container composed of unique keys (containing at most one of each key value) in which the ...
_Iterator & base() noexcept
Return the underlying iterator.
Base class that supports tracking of iterators that reference a sequence.
Safe class dealing with some allocator dependent operations.
Base class for constructing a safe unordered container type that tracks iterators that reference it.
void _M_invalidate_local_if(_Predicate __pred)
void _M_invalidate_if(_Predicate __pred)
Class std::unordered_set with safety/checking/debug instrumentation.
Class std::unordered_multiset with safety/checking/debug instrumentation.