STD::__DEBUG::MULTISET(3)
π NAME π
std::__debug::multiset< _Key, _Compare, _Allocator > β it's a class, bestie. Specifically it's std::multiset with safety/checking/debug instrumentation on top. That's the entire vibe check. π¦
β¨ SYNOPSIS β¨
okay so first you gotta actually pull it in:
#include <set>
and it inherits from:
__gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware >
π Public Types π
typedef _Allocator allocator_typeβ the allocator type, just vibing under the nameallocator_type.typedef __gnu_debug::_Safe_iterator< _Base_const_iterator, multiset > const_iteratorβ the const iterator, and it's a safe one, because we're debug mode, obviously.typedef _Base::const_pointer const_pointerβ const pointer, straight from_Base.typedef _Base::const_reference const_referenceβ const reference, also from_Base.typedef std::reverse_iterator< const_iterator > const_reverse_iteratorβ a const iterator that walks backwards. main character behaviour, honestly.typedef _Base::difference_type difference_typeβ the difference type, courtesy of_Base.typedef __gnu_debug::_Safe_iterator< _Base_iterator, multiset > iteratorβ the (safe!) iterator.typedef _Compare key_compareβ how your keys get compared.typedef _Key key_typeβ your key type, iconic as always.typedef _Base::pointer pointerβ pointer. from_Base. periodt.typedef _Base::reference referenceβ reference. from_Base.typedef std::reverse_iterator< iterator > reverse_iteratorβ iterator but backwards πtypedef _Base::size_type size_typeβ size type,_Basesaid so.typedef _Compare value_compareβ the comparator, this time for values.typedef _Key value_typeβ the value type. it's literally_Key. yes really.
π Public Member Functions π
multiset (_Base_ref __x)β constructor that takes a_Base_ref __x. say less.template<typename _InputIterator> multiset (_InputIterator __first, _InputIterator __last, const _Compare &__comp=_Compare(), const _Allocator &__a=_Allocator())β build one from the range__firstto__last, with__compdefaulting to_Compare()and__adefaulting to_Allocator().template<typename _InputIterator> multiset (_InputIterator __first, _InputIterator __last, const allocator_type &__a)β same range energy, but you hand over the allocator__ayourself.multiset (const _Compare &__comp, const _Allocator &__a=_Allocator())β takes__compand an allocator__athat defaults to_Allocator().multiset (const allocator_type &__a)β just an allocator, that's it.multiset (const multiset &)=defaultβ the copy constructor, and it's=default. no notes.multiset (const multiset &__m, const __type_identity_t< allocator_type > &__a)β copy from__mbut with allocator__a.multiset (initializer_list< value_type > __l, const _Compare &__comp=_Compare(), const allocator_type &__a=allocator_type())β from aninitializer_list__l, with__compand__aboth defaulted.multiset (initializer_list< value_type > __l, const allocator_type &__a)β from__l, with your allocator__a.multiset (multiset &&)=defaultβ move constructor, also=default. slay.multiset (multiset &&__m, const __type_identity_t< allocator_type > &__a) noexcept(noexcept(_Base(std::move(__m), __a)))β move from__mwith allocator__a, and itsnoexceptis exactlynoexcept(_Base(std::move(__m), __a)). very demure, very conditional.const _Base & _M_base () const noexceptβ hands you back aconst _Base &. it'snoexcept. it's giving internals._Base & _M_base () noexceptβ same thing but non-const_Base &, alsonoexcept.const_iterator begin () const noexceptβ constbegin(), returns aconst_iterator,noexcept.iterator begin () noexceptβbegin(), returns aniterator,noexcept.const_iterator cbegin () const noexceptβcbegin(),const_iterator,noexcept. the c is for const, the vibe is for me.const_iterator cend () const noexceptβcend(),const_iterator,noexcept.void clear () noexceptβ returnsvoid,noexcept. that's all it says.const_reverse_iterator crbegin () const noexceptβ const reverse begin. backwards but const.noexcept.const_reverse_iterator crend () const noexceptβ const reverse end.noexcept.template<typename... _Args> iterator emplace (_Args &&... __args)β variadic_Args &&... __args, gives you back aniterator.template<typename... _Args> iterator emplace_hint (const_iterator __pos, _Args &&... __args)β same but you pass a hint__posfirst. returnsiterator.const_iterator end () const noexceptβ constend(),const_iterator,noexcept.iterator end () noexceptβend(),iterator,noexcept.std::pair< iterator, iterator > equal_range (const key_type &__x)β takes__x, returns astd::pair< iterator, iterator >.std::pair< const_iterator, const_iterator > equal_range (const key_type &__x) constβ the const version, returns astd::pair< const_iterator, const_iterator >._Base_iterator erase (_Base_const_iterator __position)β takes a_Base_const_iterator __position, returns a_Base_iterator.template<__heterogeneous_tree_key< multiset > _Kt> size_type erase (_Kt &&__x)β templated on_Ktwhere_Ktsatisfies__heterogeneous_tree_key< multiset >, takes__x, returnssize_type.size_type erase (const key_type &__x)β takes__x, returnssize_type.iterator erase (const_iterator __first, const_iterator __last)β range erase from__firstto__last, returnsiterator.iterator erase (const_iterator __position)β erase at__position, returnsiterator.iterator find (const key_type &__x)β find__x, get aniterator.const_iterator find (const key_type &__x) constβ const find__x, get aconst_iterator.template<typename _InputIterator> void insert (_InputIterator __first, _InputIterator __last)β range insert from__firstto__last, returnsvoid.iterator insert (const value_type &__x)β insert__x, returnsiterator.iterator insert (const_iterator __position, const value_type &__x)β insert__xat__position, returnsiterator.iterator insert (const_iterator __position, value_type &&__x)β insert the rvalue__xat__position, returnsiterator.void insert (initializer_list< value_type > __l)β insert everything in__l, returnsvoid.iterator insert (value_type &&__x)β insert the rvalue__x, returnsiterator.iterator lower_bound (const key_type &__x)β lower bound of__x, returnsiterator.const_iterator lower_bound (const key_type &__x) constβ const lower bound of__x, returnsconst_iterator.multiset & operator= (const multiset &)=defaultβ copy assignment,=default, returnsmultiset &.multiset & operator= (initializer_list< value_type > __l)β assign from__l, returnsmultiset &.multiset & operator= (multiset &&)=defaultβ move assignment,=default, returnsmultiset &.const_reverse_iterator rbegin () const noexceptβ const reverse begin,noexcept.reverse_iterator rbegin () noexceptβ reverse begin,noexcept.const_reverse_iterator rend () const noexceptβ const reverse end,noexcept.reverse_iterator rend () noexceptβ reverse end,noexcept.void swap (multiset &__x) noexcept(/*conditional */)β swaps with__x, and thenoexceptspec is literally written asnoexcept(/*conditional */). soβ¦ conditional. ok bestie we move.iterator upper_bound (const key_type &__x)β upper bound of__x, returnsiterator.const_iterator upper_bound (const key_type &__x) constβ const upper bound of__x, returnsconst_iterator.
π Protected Member Functions π
constexpr void _M_swap (const _Safe_container &__x) const noexceptβ it'sconstexpr, it takes aconst _Safe_container &__x, it'sconst, and it'snoexcept. returnsvoid. we love a protected little helper. π«Ά
π« Friends π«
template<typename _ItT, typename _SeqT, typename _CatT> class ::__gnu_debug::_Safe_iteratorβ yeah,::__gnu_debug::_Safe_iteratoris a friend. nepotism but make it templates. π
π Detailed Description π
here's the whole thing, exactly as it's declared:
template<typename _Key, typename _Compare = std::less<_Key>, typename
_Allocator = std::allocator<_Key>>
class std::__debug::multiset< _Key, _Compare, _Allocator >
and what is it, in one sentence? "Class std::multiset with safety/checking/debug instrumentation."
that's it. that's the class. _Compare defaults to std::less<_Key>, _Allocator defaults to std::allocator<_Key>, and the whole point is that it's the debug/safety-checked flavour of std::multiset. π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. not a human, not a bestie, just doxygen doing its little thing. π§
π okay that's the whole page, no cap. this one came from libstdc++, and it's a Library Functions Manual entry, so if you see it in your terminal, you know exactly where it lives. go forth and debug safely, bestie β the instrumentation is literally the point. β¨ππlibstdc++Β·std::__debug::multiset< _Key, _Compare, _Allocator >(3)Β· that's a wrap πΈ
π¦ 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