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_pointer
  • const_reference β€” typedef _Base::const_reference const_reference
  • const_reverse_iterator β€” typedef std::reverse_iterator< const_iterator > const_reverse_iterator
  • difference_type β€” typedef _Base::difference_type difference_type
  • iterator β€” typedef __gnu_debug::_Safe_iterator< _Base_iterator, multimap > iterator, the safe iterator bestie 🫢
  • key_compare β€” typedef _Compare key_compare
  • key_type β€” typedef _Key key_type
  • mapped_type β€” typedef _Tp mapped_type
  • pointer β€” typedef _Base::pointer pointer
  • reference β€” typedef _Base::reference reference
  • reverse_iterator β€” typedef std::reverse_iterator< iterator > reverse_iterator
  • size_type β€” typedef _Base::size_type size_type
  • value_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 __first to __last, with optional comparator __comp and 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 __comp and 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 __m but rebuild it with allocator __a.
  • multimap (initializer_list< value_type > __l, const _Compare &__c=_Compare(), const allocator_type &__a=allocator_type()) β€” from an initializer_list __l, optional comparator __c and allocator __a.
  • multimap (initializer_list< value_type > __l, const allocator_type &__a) β€” initializer list __l plus 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 __m into 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 __pos about 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 __first to __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 __first to __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 _Pair is actually constructible into a value_type, tyvm SFINAE πŸ’…
  • iterator insert (const value_type &__x) β€” inserts __x by 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 __x at __position, same enable_if gate.
  • iterator insert (const_iterator __position, const value_type &__x) β€” hinted insert of __x at __position.
  • iterator insert (const_iterator __position, value_type &&__x) β€” hinted insert, but __x gets 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 from initializer_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_iterator is 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