STD::__DEBUG::UNORDERED_MULTISET(3)
π std::__debug::unordered_multiset< _Value, _Hash, _Pred, _Alloc > π
okay bestie, you've landed in the Library Functions Manual section, and this page is specifically about the debug version of std::unordered_multiset β like, the same container you already know and love, but wearing a little safety vest. π¦Ίβ¨
πΈ NAME πΈ
std::__debug::unordered_multiset< _Value, _Hash, _Pred, _Alloc > β a Class, and it's literally std::unordered_multiset with safety/checking/debug instrumentation on top. no cap, that's the whole vibe. π
β¨ SYNOPSIS β¨
#include <unordered_set>
Inherits from: __gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware > β so like, all that safe-container energy is inherited, periodt.
π Public Types π
not me listing every single one, but bestie they all matter:
typedef _Base::allocator_type allocator_typeβ the allocator type, straight from_Base. π«Άtypedef __gnu_debug::_Safe_iterator< _Base_const_iterator, unordered_multiset > const_iteratorβ const iterator, but the safe/debug kind. β¨typedef __gnu_debug::_Safe_local_iterator< _Base_const_local_iterator, unordered_multiset > const_local_iteratorβ the const local iterator, also safety-instrumented.typedef _Base::const_pointer const_pointerβ const pointer, inherited from_Base.typedef _Base::const_reference const_referenceβ const reference, also from_Base.typedef _Base::difference_type difference_typeβ difference type,_Base's own.typedef _Base::hasher hasherβ the hasher type. yes queen, hashing.typedef __gnu_debug::_Safe_iterator< _Base_iterator, unordered_multiset > iteratorβ the main-character iterator, safe flavour. πtypedef _Base::key_equal key_equalβ key equality predicate type.typedef _Base::key_type key_typeβ the key type.typedef __gnu_debug::_Safe_local_iterator< _Base_local_iterator, unordered_multiset > local_iteratorβ local iterator with the debug instrumentation. π₯typedef _Base::pointer pointerβ pointer, from_Base.typedef _Base::reference referenceβ reference, from_Base.typedef _Base::size_type size_typeβ size type, from_Base.typedef _Base::value_type value_typeβ value type, from_Base.
π Public Member Functions π
bestie there are SO many constructors. buckle up, we're going through every single one, fr fr:
unordered_multiset (_Base_ref __x)β takes a_Base_ref __x.template<typename _InputIterator> unordered_multiset (_InputIterator __first, _InputIterator __last, const allocator_type &__a)β range-y constructor, first to last, plus an allocator.template<typename _InputIterator> unordered_multiset (_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type &__a)β same range energy, now withsize_type __nin the mix too.template<typename _InputIterator> unordered_multiset (_InputIterator __first, _InputIterator __last, size_type __n, const hasher &__hf, const allocator_type &__a)β range,__n, a hasher__hf, and an allocator. the whole squad. πtemplate<typename _InputIterator> unordered_multiset (_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())β the fully-loaded range constructor, with defaults on literally everything after the iterators.unordered_multiset (const allocator_type &__a)β allocator-only constructor.unordered_multiset (const unordered_multiset &)=defaultβ copy constructor,=default. iconic.unordered_multiset (const unordered_multiset &__uset, const allocator_type &__a)β copy from__uset, but with your own allocator.unordered_multiset (initializer_list< value_type > __l, const allocator_type &__a)β from aninitializer_list< value_type > __lplus an allocator.unordered_multiset (initializer_list< value_type > __l, size_type __n, const allocator_type &__a)β the initializer list,__n, and an allocator.unordered_multiset (initializer_list< value_type > __l, size_type __n, const hasher &__hf, const allocator_type &__a)β init list,__n, hasher, allocator. all four, slay.unordered_multiset (initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())β the deluxe init-list constructor, defaults everywhere.unordered_multiset (size_type __n, const allocator_type &__a)β sized, with an allocator.unordered_multiset (size_type __n, const hasher &__hf, const allocator_type &__a)β sized, hasher, allocator.unordered_multiset (size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())β sized, with all the defaults doing their thing.unordered_multiset (unordered_multiset &&)=defaultβ move constructor,=default. π¦unordered_multiset (unordered_multiset &&__uset, const allocator_type &__a) noexcept(noexcept(_Base(std::move(__uset), __a)))β move with an allocator, and yes thatnoexceptspec is exactly what it says.
and now the actual member functions, no skips, we don't do that here:
const _Base & _M_base () const noexceptβ hands you the_Baseback, const andnoexcept._Base & _M_base () noexceptβ the non-const one.const_iterator begin () const noexceptβ constbegin,noexcept.iterator begin () noexceptβbegin,noexcept.local_iterator begin (size_type __b)β localbeginfor bucket__b.const_local_iterator begin (size_type __b) constβ const localbeginfor bucket__b.size_type bucket_size (size_type __b) constβ bucket size for bucket__b.const_iterator cbegin () const noexceptβcbegin, const,noexcept.const_local_iterator cbegin (size_type __b) constβ const localcbeginfor bucket__b.const_iterator cend () const noexceptβcend, const,noexcept.const_local_iterator cend (size_type __b) constβ const localcendfor bucket__b.void clear () noexceptβclear, and it'snoexcept. π§template<typename... _Args> iterator emplace (_Args &&... __args)β variadicemplace, forwards__args.template<typename... _Args> iterator emplace_hint (const_iterator __hint, _Args &&... __args)βemplacewith a__hintup front.const_iterator end () const noexceptβ constend,noexcept.iterator end () noexceptβend,noexcept.local_iterator end (size_type __b)β localendfor bucket__b.const_local_iterator end (size_type __b) constβ const localendfor bucket__b.std::pair< iterator, iterator > equal_range (const key_type &__key)βequal_rangeon__key, gives you a pair of iterators.std::pair< const_iterator, const_iterator > equal_range (const key_type &__key) constβ the const version, pair of const iterators._Base_iterator erase (_Base_const_iterator __it)β erase at__it, returns a_Base_iterator.template<__heterogeneous_hash_key< unordered_multiset > _Kt> size_type erase (_Kt &&__key)β the templated heterogeneous-key erase, returns asize_type.size_type erase (const key_type &__key)β erase by__key, returns asize_type.iterator erase (const_iterator __first, const_iterator __last)β erase the range__firstto__last.iterator erase (const_iterator __it)β erase at aconst_iterator.iterator erase (iterator __it)β erase at a plainiterator.iterator find (const key_type &__key)βfindyour__key.const_iterator find (const key_type &__key) constβ constfindyour__key.template<typename _InputIterator> void insert (_InputIterator __first, _InputIterator __last)β range insert,__firstto__last.iterator insert (const value_type &__obj)β insert__obj, get aniteratorback.iterator insert (const_iterator __hint, const value_type &__obj)β insert__objwith a__hint.iterator insert (const_iterator __hint, value_type &&__obj)β same but__objis an rvalue ref. π₯void insert (std::initializer_list< value_type > __l)β insert a wholeinitializer_list< value_type > __l.iterator insert (value_type &&__obj)β rvalue__obj, iterator back.float max_load_factor () const noexceptβ get the max load factor,noexcept.void max_load_factor (float __f)β set the max load factor to__f.unordered_multiset & operator= (const unordered_multiset &)=defaultβ copy assignment,=default.unordered_multiset & operator= (initializer_list< value_type > __l)β assign from aninitializer_list< value_type > __l.unordered_multiset & operator= (unordered_multiset &&)=defaultβ move assignment,=default.void swap (unordered_multiset &__x) noexcept(noexcept(declval< _Base & >().swap(__x)))β swap with__x, with that very specificnoexceptclause. π
π‘οΈ Protected Member Functions π‘οΈ
constexpr void _M_swap (const _Safe_container &__x) const noexceptβ protected,constexpr,const,noexcept. the whole rΓ©sumΓ©. β¨
π«Ά Friends π«Ά
template<typename _ItT, typename _SeqT, typename _CatT> class ::__gnu_debug::_Safe_iteratortemplate<typename _ItT, typename _SeqT> class ::__gnu_debug::_Safe_local_iterator
π₯ Detailed Description π₯
template<typename _Value, typename _Hash = std::hash<_Value>, typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>>
class std::__debug::unordered_multiset< _Value, _Hash, _Pred, _Alloc >
"Class std::unordered_multiset with safety/checking/debug instrumentation."
like, that's the whole point of this thing bestie β same container, but with the safety, checking and debug instrumentation turned all the way up. π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. so not a human, just a lil robot doing its thing. π€
okay that's the whole page!! π this was brought to you by libstdc++, and it's the std::__deb..., _Alloc >(3) page β mwah, go forth and debug safely bestie πβ¨π¦
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms