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 name allocator_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, _Base said 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 __first to __last, with __comp defaulting to _Compare() and __a defaulting to _Allocator().
  • template<typename _InputIterator> multiset (_InputIterator __first, _InputIterator __last, const allocator_type &__a) β€” same range energy, but you hand over the allocator __a yourself.
  • multiset (const _Compare &__comp, const _Allocator &__a=_Allocator()) β€” takes __comp and an allocator __a that 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 __m but with allocator __a.
  • multiset (initializer_list< value_type > __l, const _Compare &__comp=_Compare(), const allocator_type &__a=allocator_type()) β€” from an initializer_list __l, with __comp and __a both 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 __m with allocator __a, and its noexcept is exactly noexcept(_Base(std::move(__m), __a)). very demure, very conditional.
  • const _Base & _M_base () const noexcept β€” hands you back a const _Base &. it's noexcept. it's giving internals.
  • _Base & _M_base () noexcept β€” same thing but non-const _Base &, also noexcept.
  • const_iterator begin () const noexcept β€” const begin(), returns a const_iterator, noexcept.
  • iterator begin () noexcept β€” begin(), returns an iterator, 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 β€” returns void, 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 an iterator.
  • template<typename... _Args> iterator emplace_hint (const_iterator __pos, _Args &&... __args) β€” same but you pass a hint __pos first. returns iterator.
  • const_iterator end () const noexcept β€” const end(), const_iterator, noexcept.
  • iterator end () noexcept β€” end(), iterator, noexcept.
  • std::pair< iterator, iterator > equal_range (const key_type &__x) β€” takes __x, returns a std::pair< iterator, iterator >.
  • std::pair< const_iterator, const_iterator > equal_range (const key_type &__x) const β€” the const version, returns a std::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 _Kt where _Kt satisfies __heterogeneous_tree_key< multiset >, takes __x, returns size_type.
  • size_type erase (const key_type &__x) β€” takes __x, returns size_type.
  • iterator erase (const_iterator __first, const_iterator __last) β€” range erase from __first to __last, returns iterator.
  • iterator erase (const_iterator __position) β€” erase at __position, returns iterator.
  • iterator find (const key_type &__x) β€” find __x, get an iterator.
  • const_iterator find (const key_type &__x) const β€” const find __x, get a const_iterator.
  • template<typename _InputIterator> void insert (_InputIterator __first, _InputIterator __last) β€” range insert from __first to __last, returns void.
  • iterator insert (const value_type &__x) β€” insert __x, returns iterator.
  • iterator insert (const_iterator __position, const value_type &__x) β€” insert __x at __position, returns iterator.
  • iterator insert (const_iterator __position, value_type &&__x) β€” insert the rvalue __x at __position, returns iterator.
  • void insert (initializer_list< value_type > __l) β€” insert everything in __l, returns void.
  • iterator insert (value_type &&__x) β€” insert the rvalue __x, returns iterator.
  • iterator lower_bound (const key_type &__x) β€” lower bound of __x, returns iterator.
  • const_iterator lower_bound (const key_type &__x) const β€” const lower bound of __x, returns const_iterator.
  • multiset & operator= (const multiset &)=default β€” copy assignment, =default, returns multiset &.
  • multiset & operator= (initializer_list< value_type > __l) β€” assign from __l, returns multiset &.
  • multiset & operator= (multiset &&)=default β€” move assignment, =default, returns multiset &.
  • 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 the noexcept spec is literally written as noexcept(/*conditional */). so… conditional. ok bestie we move.
  • iterator upper_bound (const key_type &__x) β€” upper bound of __x, returns iterator.
  • const_iterator upper_bound (const key_type &__x) const β€” const upper bound of __x, returns const_iterator.

πŸ”’ Protected Member Functions πŸ”’

  • constexpr void _M_swap (const _Safe_container &__x) const noexcept β€” it's constexpr, it takes a const _Safe_container &__x, it's const, and it's noexcept. returns void. we love a protected little helper. 🫢

πŸ«‚ Friends πŸ«‚

  • template<typename _ItT, typename _SeqT, typename _CatT> class ::__gnu_debug::_Safe_iterator β€” yeah, ::__gnu_debug::_Safe_iterator is 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