__GNU_CXX::HASH_MULTIMAP(3)

πŸ’– __gnu_cxx::hash_multimap πŸ’–

okay bestie, welcome to the Library Functions Manual page for __gnu_cxx:...y, _Alloc >(3) β€” yes the title is literally truncated with an ellipsis, that's not me being lazy, that's just how it got rendered, and honestly? iconic. slay. let's get into it 🫢


✨ NAME ✨

__gnu_cxx::hash_multimap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >

that's the whole name. no notes. it's giving "template parameters went to a party and invited everyone" πŸ’…


🌈 SYNOPSIS 🌈

#include <hash_map>

that's your include. it lives in <hash_map>, not <unordered_map>, don't @ me, we'll get there. πŸ¦‹

πŸŽ€ Public Types πŸŽ€

the glow-up glossary, lowkey:

  • typedef _Ht::allocator_type allocator_type
  • typedef _Ht::const_iterator const_iterator
  • typedef _Ht::const_pointer const_pointer
  • typedef _Ht::const_reference const_reference
  • typedef _Tp data_type
  • typedef _Ht::difference_type difference_type
  • typedef _Ht::hasher hasher
  • typedef _Ht::iterator iterator
  • typedef _Ht::key_equal key_equal
  • typedef _Ht::key_type key_type
  • typedef _Tp mapped_type mapped_type β€” wait no, it's just typedef _Tp mapped_type, my bad, no cap 😭
  • typedef _Ht::pointer pointer
  • typedef _Ht::reference reference
  • typedef _Ht::size_type size_type
  • typedef _Ht::value_type value_type

πŸ¦‹ Public Member Functions πŸ¦‹

the full roster, every single one, we do not skip, skipping is not the vibe:

  • template<class _InputIterator> hash_multimap (_InputIterator __f, _InputIterator __l)
  • template<class _InputIterator> hash_multimap (_InputIterator __f, _InputIterator __l, size_type __n)
  • template<class _InputIterator> hash_multimap (_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf)
  • template<class _InputIterator> hash_multimap (_InputIterator __f, _InputIterator __l, size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
  • hash_multimap (size_type __n)
  • hash_multimap (size_type __n, const hasher &__hf)
  • hash_multimap (size_type __n, const hasher &__hf, const key_equal &__eql, const allocator_type &__a=allocator_type())
  • iterator begin ()
  • const_iterator begin () const
  • size_type bucket_count () const
  • void clear ()
  • size_type count (const key_type &__key) const
  • size_type elems_in_bucket (size_type __n) const
  • bool empty () const
  • iterator end ()
  • const_iterator end () const
  • pair< iterator, iterator > equal_range (const key_type &__key)
  • pair< const_iterator, const_iterator > equal_range (const key_type &__key) const
  • size_type erase (const key_type &__key)
  • void erase (iterator __f, iterator __l)
  • void erase (iterator __it)
  • iterator find (const key_type &__key)
  • const_iterator find (const key_type &__key) const
  • allocator_type get_allocator () const
  • hasher hash_funct () const
  • template<class _InputIterator> void insert (_InputIterator __f, _InputIterator __l)
  • iterator insert (const value_type &__obj)
  • iterator insert_noresize (const value_type &__obj)
  • key_equal key_eq () const
  • size_type max_bucket_count () const
  • size_type max_size () const
  • void resize (size_type __hint)
  • size_type size () const
  • void swap (hash_multimap &__hs)

okay so like, three different erase overloads, two begin, two end, two find, two equal_range, a whole const situation β€” the duality of woman πŸ’…βœ¨

πŸ‘‘ Friends πŸ‘‘

  • template<class _K1, class _T1, class _HF, class _EqK, class _Al> bool operator== (const hash_multimap< _K1, _T1, _HF, _EqK, _Al > &, const hash_multimap< _K1, _T1, _HF, _EqK, _Al > &)

yes it's a friend. it's the friend that compares two whole hash_multimaps. bestie behavior fr fr. 🫢


πŸ”₯ Detailed Description πŸ”₯

template<class _Key, class _Tp, class _HashFn = hash<_Key>, class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp>>
class __gnu_cxx::hash_multimap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >

so the template signature is right there, with _HashFn defaulting to hash<_Key>, _EqualKey defaulting to equal_to<_Key>, and _Alloc defaulting to allocator<_Tp>. defaults everywhere, we love a low-effort setup πŸ’œ

"This is an SGI extension."

that's a direct quote and it is VERY MUCH THE VIBE CHECK β€” this is an SGI extension, it is not standard C++, so don't be out here acting like it's plain portable code, iykyk. 🌸

😭 Todo 😭

literally the most relatable section of any manpage:

Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html

the page itself is telling on itself. it's giving "assignment not started, due tomorrow, main character energy". we respect the honesty though. πŸ’€


🌟 Author 🌟

Generated automatically by Doxygen for libstdc++ from the source code.

not a human, not a poet, just Doxygen doing its little thing. no cap.


aaaand that's the page bestie!! πŸŽ€ this was libstdc++'s page for __gnu_cxx:...y, _Alloc >(3), straight out of the Library Functions Manual, generated automatically by Doxygen for libstdc++ from the source code. go forth, use <hash_map>, remember it's an SGI extension, and hydrate. periodt. πŸ’–βœ¨πŸ¦‹πŸŒΈπŸ‘‘πŸŒˆβ­πŸ’œ

πŸ“¦ 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.0.1-0.10.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
  • 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