STD::__DEBUG::MULTIMAP(3)
πΈ std::__debug::multimap< _Key, _Tp, _Compare, _Allocator > πΈ
okay bestie, welcome to the debug version of std::multimap π this is a 3 manual page, straight out of the libstdc++ Library Functions Manual, so grab a boba and let's get into it β¨
β¨ NAME β¨
std::__debug::multimap< _Key, _Tp, _Compare, _Allocator > β it's a Class, and it's literally std::multimap but with safety/checking/debug instrumentation. like, the same multimap but it's wearing a little reflective vest and checking everything π¦
π SYNOPSIS π
#include <map>
Inherits __gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware >. yep, it's giving "I inherited my whole personality from my safe container parent" π
π Public Types π
allocator_typeβtypedef _Allocator allocator_type, the allocator, periodt.const_iteratorβtypedef __gnu_debug::_Safe_iterator< _Base_const_iterator, multimap > const_iterator, a safe const iterator, no cap.const_pointerβtypedef _Base::const_pointer const_pointerconst_referenceβtypedef _Base::const_reference const_referenceconst_reverse_iteratorβtypedef std::reverse_iterator< const_iterator > const_reverse_iteratordifference_typeβtypedef _Base::difference_type difference_typeiteratorβtypedef __gnu_debug::_Safe_iterator< _Base_iterator, multimap > iterator, the safe iterator bestie π«Άkey_compareβtypedef _Compare key_comparekey_typeβtypedef _Key key_typemapped_typeβtypedef _Tp mapped_typepointerβtypedef _Base::pointer pointerreferenceβtypedef _Base::reference referencereverse_iteratorβtypedef std::reverse_iterator< iterator > reverse_iteratorsize_typeβtypedef _Base::size_type size_typevalue_typeβtypedef std::pair< const _Key, _Tp > value_type
π Public Member Functions π
the way there are SO many of these and every single one is iconic, let's go π
multimap (_Base_ref __x)β constructs from a base reference.template<typename _InputIterator> multimap (_InputIterator __first, _InputIterator __last, const _Compare &__comp=_Compare(), const _Allocator &__a=_Allocator())β builds from the range__firstto__last, with optional comparator__compand allocator__a.template<typename _InputIterator> multimap (_InputIterator __first, _InputIterator __last, const allocator_type &__a)β range constructor, but with just the allocator__a.multimap (const _Compare &__comp, const _Allocator &__a=_Allocator())β takes a comparator__compand optionally an allocator__a.multimap (const allocator_type &__a)β just an allocator, that's it, slay.multimap (const multimap &)=defaultβ copy constructor, defaulted, lowkey perfect.multimap (const multimap &__m, const __type_identity_t< allocator_type > &__a)β copy__mbut rebuild it with allocator__a.multimap (initializer_list< value_type > __l, const _Compare &__c=_Compare(), const allocator_type &__a=allocator_type())β from aninitializer_list__l, optional comparator__cand allocator__a.multimap (initializer_list< value_type > __l, const allocator_type &__a)β initializer list__lplus allocator__a.multimap (multimap &&)=defaultβ move constructor, defaulted.multimap (multimap &&__m, const __type_identity_t< allocator_type > &__a) noexcept(noexcept(_Base(std::move(__m), __a)))β move__minto a new allocator__a, with that whole conditional noexcept situation.const _Base & _M_base () const noexceptβ hands you the underlying base, const edition._Base & _M_base () noexceptβ same but non-const, get in.const_iterator begin () const noexceptβ start of the const range.iterator begin () noexceptβ start of the range.const_iterator cbegin () const noexceptβ const begin, the c stands for cute πconst_iterator cend () const noexceptβ const end.void clear () noexceptβ yeets everything out of the container.const_reverse_iterator crbegin () const noexceptβ const reverse begin.const_reverse_iterator crend () const noexceptβ const reverse end.template<typename... _Args> iterator emplace (_Args &&... __args)β constructs in place from__args, no copies.template<typename... _Args> iterator emplace_hint (const_iterator __pos, _Args &&... __args)β same but with a hint__posabout where it should go.const_iterator end () const noexceptβ end of the const range.iterator end () noexceptβ end of the range.std::pair< iterator, iterator > equal_range (const key_type &__x)β the pair of iterators covering every element with key__x.std::pair< const_iterator, const_iterator > equal_range (const key_type &__x) constβ same but const, same key__x._Base_iterator erase (_Base_const_iterator __position)β erases at__position, gives back a_Base_iterator.template<__heterogeneous_tree_key< multimap > _Kt> size_type erase (_Kt &&__x)β heterogeneous erase by key__x, returns how many went bye-bye.size_type erase (const key_type &__x)β erase by key__x, returns the count removed.iterator erase (const_iterator __first, const_iterator __last)β erases the whole range from__firstto__last.iterator erase (const_iterator __position)β erases the const iterator at__position.iterator erase (iterator __position)β erases the iterator at__position.iterator find (const key_type &__x)β finds key__x.const_iterator find (const key_type &__x) constβ const find for key__x.template<typename _InputIterator> void insert (_InputIterator __first, _InputIterator __last)β inserts the range__firstto__last.template<typename _Pair, typename = typename std::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type> iterator insert (_Pair &&__x)β inserts__x, but only if_Pairis actually constructible into avalue_type, tyvm SFINAE πiterator insert (const value_type &__x)β inserts__xby const reference.template<typename _Pair, typename = typename std::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type> iterator insert (const_iterator __position, _Pair &&__x)β hinted insert of__xat__position, same enable_if gate.iterator insert (const_iterator __position, const value_type &__x)β hinted insert of__xat__position.iterator insert (const_iterator __position, value_type &&__x)β hinted insert, but__xgets moved.void insert (std::initializer_list< value_type > __list)β inserts everything in__list.iterator insert (value_type &&__x)β move-inserts__x.iterator lower_bound (const key_type &__x)β first element not less than__x.const_iterator lower_bound (const key_type &__x) constβ const lower bound for__x.multimap & operator= (const multimap &)=defaultβ copy assignment, defaulted.multimap & operator= (initializer_list< value_type > __l)β assigns frominitializer_list__l.multimap & operator= (multimap &&)=defaultβ move assignment, defaulted.const_reverse_iterator rbegin () const noexceptβ reverse begin, const.reverse_iterator rbegin () noexceptβ reverse begin.const_reverse_iterator rend () const noexceptβ reverse end, const.reverse_iterator rend () noexceptβ reverse end.void swap (multimap &__x) noexcept(/*conditional */)β swaps with__x, and the noexcept is, and I quote,/*conditional */πiterator upper_bound (const key_type &__x)β first element greater than__x.const_iterator upper_bound (const key_type &__x) constβ const upper bound for__x.
π§ Protected Member Functions π§
constexpr void _M_swap (const _Safe_container &__x) const noexceptβ protected, constexpr, noexcept, swaps with the_Safe_container__x. it's giving "for my eyes only" π
π¦ Friends π¦
template<typename _ItT, typename _SeqT, typename _CatT> class ::__gnu_debug::_Safe_iteratorβ yes,_Safe_iteratoris a friend, iykyk π€
β Detailed Description β
template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
typename _Allocator = std::allocator<std::pair<const _Key, _Tp> >>
class std::__debug::multimap< _Key, _Tp, _Compare, _Allocator >"Class
std::multimap with safety/checking/debug instrumentation.
that's the whole template signature, exactly as it is β four template params, _Compare defaults to std::less<_Key>, _Allocator defaults to std::allocator<std::pair<const _Key, _Tp> >. and the description is literally "Class std::multimap with safety/checking/debug instrumentation." short, sweet, did not need to do all that but it did π
ngl there's a stray quote mark in that description in the original and I am simply preserving it, bestie. character for character. we do not "fix" things here β¨
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. not a human author, just Doxygen doing its little thing π€
and that's the whole page, bestie π«Ά this was std::__debug::multimap< _Key, _Tp, _Compare, _Allocator >(3), from the libstdc++ Library Functions Manual. go forth and debug safely, mwah π
β¨
π¦ 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