__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_typetypedef _Ht::const_iterator const_iteratortypedef _Ht::const_pointer const_pointertypedef _Ht::const_reference const_referencetypedef _Tp data_typetypedef _Ht::difference_type difference_typetypedef _Ht::hasher hashertypedef _Ht::iterator iteratortypedef _Ht::key_equal key_equaltypedef _Ht::key_type key_typetypedef _Tp mapped_type mapped_typeβ wait no, it's justtypedef _Tp mapped_type, my bad, no cap πtypedef _Ht::pointer pointertypedef _Ht::reference referencetypedef _Ht::size_type size_typetypedef _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 () constsize_type bucket_count () constvoid clear ()size_type count (const key_type &__key) constsize_type elems_in_bucket (size_type __n) constbool empty () constiterator end ()const_iterator end () constpair< iterator, iterator > equal_range (const key_type &__key)pair< const_iterator, const_iterator > equal_range (const key_type &__key) constsize_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) constallocator_type get_allocator () consthasher hash_funct () consttemplate<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 () constsize_type max_bucket_count () constsize_type max_size () constvoid resize (size_type __hint)size_type size () constvoid 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