STD::__DEBUG::UNORDERED_MAP(3)
π std::__debug::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > π
okay bestie, welcome to the Library Functions Manual page for this absolute icon β std::__debug::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >, no cap. It's the section 3 library-functions vibe, and yes, we are reading it together. π«Ά
β¨ NAME β¨
std::__debug::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > β it's a Class that is literally std::unordered_map but with safety/checking/debug instrumentation. she's the same girl but with a security detail π
π SYNOPSIS π
#include <unordered_map>
Inherits __gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware >. family tree moment β¨
π Public Types π
allocator_typeβtypedef _Base::allocator_type allocator_typeconst_iteratorβtypedef __gnu_debug::_Safe_iterator< _Base_const_iterator, unordered_map > const_iteratorconst_local_iteratorβtypedef __gnu_debug::_Safe_local_iterator< _Base_const_local_iterator, unordered_map > const_local_iteratorconst_pointerβtypedef _Base::const_pointer const_pointerconst_referenceβtypedef _Base::const_reference const_referencedifference_typeβtypedef _Base::difference_type difference_typehasherβtypedef _Base::hasher hasheriteratorβtypedef __gnu_debug::_Safe_iterator< _Base_iterator, unordered_map > iteratorkey_equalβtypedef _Base::key_equal key_equalkey_typeβtypedef _Base::key_type key_typelocal_iteratorβtypedef __gnu_debug::_Safe_local_iterator< _Base_local_iterator, unordered_map > local_iteratormapped_typeβtypedef _Base::mapped_type mapped_typepointerβtypedef _Base::pointer pointerreferenceβtypedef _Base::reference referencesize_typeβtypedef _Base::size_type size_typevalue_typeβtypedef _Base::value_type value_type
sixteen types, all accounted for, we do not skip a single one in this house π
π Public Member Functions π
π¦ Constructors, the whole roster π¦
unordered_map (_Base_ref __x)β builds one from a_Base_ref __x.template<typename _InputIterator> unordered_map (_InputIterator __first, _InputIterator __last, const allocator_type &__a)β from the range__firstto__last, plus allocator__a.template<typename _InputIterator> unordered_map (_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type &__a)β same range, plus bucket count__nand allocator__a.template<typename _InputIterator> unordered_map (_InputIterator __first, _InputIterator __last, size_type __n, const hasher &__hf, const allocator_type &__a)β range, plus__n, hasher__hfand allocator__a.template<typename _InputIterator> unordered_map (_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())β the full range glow-up, with defaultssize_type __n=0,const hasher &__hf=hasher(),const key_equal &__eql=key_equal(),const allocator_type &__a=allocator_type().unordered_map (const allocator_type &__a)β just the allocator__a, minimal queen behavior.unordered_map (const unordered_map &)=defaultβ copy constructor, and it's=defaultso it's free.unordered_map (const unordered_map &__umap, const allocator_type &__a)β copy__umap, but with allocator__a.unordered_map (initializer_list< value_type > __l, const allocator_type &__a)β from initializer list__land allocator__a.unordered_map (initializer_list< value_type > __l, size_type __n, const allocator_type &__a)β__l, bucket count__n, allocator__a.unordered_map (initializer_list< value_type > __l, size_type __n, const hasher &__hf, const allocator_type &__a)β__l,__n, hasher__hf, allocator__a.unordered_map (initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())β initializer list with the whole default squad:size_type __n=0,const hasher &__hf=hasher(),const key_equal &__eql=key_equal(),const allocator_type &__a=allocator_type().unordered_map (size_type __n, const allocator_type &__a)β bucket count__nand allocator__a.unordered_map (size_type __n, const hasher &__hf, const allocator_type &__a)β__n, hasher__hf, allocator__a.unordered_map (size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())β__nwith defaultsconst hasher &__hf=hasher(),const key_equal &__eql=key_equal(),const allocator_type &__a=allocator_type().unordered_map (unordered_map &&)=defaultβ move constructor,=default, she moves fast πunordered_map (unordered_map &&__umap, const allocator_type &__a) noexcept(noexcept(_Base(std::move(__umap), __a)))β move from__umapwith allocator__a, and note the exception spec is exactlynoexcept(noexcept(_Base(std::move(__umap), __a))).
πΈ The rest of the member function serving π
const _Base & _M_base () const noexceptβ hands you theconst _Base &,noexcept._Base & _M_base () noexceptβ same energy, non-const,noexcept.const_iterator begin () const noexceptβ constbegin,noexcept.iterator begin () noexceptβbegin,noexcept.local_iterator begin (size_type __b)βbeginfor bucket__b.const_local_iterator begin (size_type __b) constβ const version, bucket__b.size_type bucket_size (size_type __b) constβ how big bucket__bis, as asize_type.const_iterator cbegin () const noexceptβcbegin,noexcept.const_local_iterator cbegin (size_type __b) constβcbeginfor bucket__b.const_iterator cend () const noexceptβcend,noexcept.const_local_iterator cend (size_type __b) constβcendfor bucket__b.void clear () noexceptβ wipes it,noexcept.template<typename... _Args> std::pair< iterator, bool > emplace (_Args &&... __args)β perfect-forwardingemplaceover_Args &&... __args, returnsstd::pair< iterator, bool >.template<typename... _Args> iterator emplace_hint (const_iterator __hint, _Args &&... __args)βemplacewith a hint__hint, returnsiterator.const_iterator end () const noexceptβ constend,noexcept.iterator end () noexceptβend,noexcept.local_iterator end (size_type __b)βendfor bucket__b.const_local_iterator end (size_type __b) constβ const version, bucket__b.std::pair< iterator, iterator > equal_range (const key_type &__key)βequal_rangefor__key, returnsstd::pair< iterator, iterator >.std::pair< const_iterator, const_iterator > equal_range (const key_type &__key) constβ const one, returnsstd::pair< const_iterator, const_iterator >._Base_iterator erase (_Base_const_iterator __it)β erase by_Base_const_iterator __it, returns_Base_iterator.template<__heterogeneous_hash_key< unordered_map > _Kt> size_type erase (_Kt &&__key)β the fancy heterogeneous one, keyed on_Kt, returnssize_type.size_type erase (const key_type &__key)β erase by__key, returnssize_type.iterator erase (const_iterator __first, const_iterator __last)β erase the range__firstto__last, returnsiterator.iterator erase (const_iterator __it)β erase oneconst_iterator __it, returnsiterator.iterator erase (iterator __it)β erase oneiterator __it, returnsiterator.iterator find (const key_type &__key)βfindby__key, returnsiterator.const_iterator find (const key_type &__key) constβ constfindby__key.template<typename _InputIterator> void insert (_InputIterator __first, _InputIterator __last)β insert the range__firstto__last, returnsvoid.template<typename _Pair, typename = typename std::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type> std::pair< iterator, bool > insert (_Pair &&__obj)β the SFINAE-gated one,_Pair &&__obj, returnsstd::pair< iterator, bool >.std::pair< iterator, bool > insert (const value_type &__obj)β insertconst value_type &__obj, returnsstd::pair< iterator, bool >.template<typename _Pair, typename = typename std::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type> iterator insert (const_iterator __hint, _Pair &&__obj)β hinted, SFINAE-gated, returnsiterator.iterator insert (const_iterator __hint, const value_type &__obj)β hinted insert, returnsiterator.iterator insert (const_iterator __hint, value_type &&__x)β hinted move-y insert withvalue_type &&__x, returnsiterator.void insert (std::initializer_list< value_type > __l)β insert the whole initializer list__l, returnsvoid.std::pair< iterator, bool > insert (value_type &&__x)β insertvalue_type &&__x, returnsstd::pair< iterator, bool >.float max_load_factor () const noexceptβ getter for the max load factor, returnsfloat,noexcept.void max_load_factor (float __f)β setter, takesfloat __f.unordered_map & operator= (const unordered_map &)=defaultβ copy assign,=default.unordered_map & operator= (initializer_list< value_type > __l)β assign from__l, returnsunordered_map &.unordered_map & operator= (unordered_map &&)=defaultβ move assign,=default.void swap (unordered_map &__x) noexcept(noexcept(declval< _Base & >().swap(__x)))β swaps with__x, with that very specificnoexcept(noexcept(declval< _Base & >().swap(__x))).
π§ Protected Member Functions π§
constexpr void _M_swap (const _Safe_container &__x) const noexceptβconstexpr, takesconst _Safe_container &__x, returnsvoid,noexcept. protected, so it's giving inner-circle β¨
π Friends π
template<typename _ItT, typename _SeqT, typename _CatT> class ::__gnu_debug::_Safe_iteratortemplate<typename _ItT, typename _SeqT> class ::__gnu_debug::_Safe_local_iterator
the friend list is short but she's picky and that's her right π
π¦ Detailed Description π¦
template<typename _Key, typename _Tp, typename _Hash = std::hash<_Key>,
typename _Pred = std::equal_to<_Key>, typename _Alloc =
std::allocator<std::pair<const _Key, _Tp> >>
class std::__debug::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>"Class std::unordered_map with safety/checking/debug instrumentation.
so yeah β Class std::unordered_map with safety/checking/debug instrumentation. That's the whole point of her. Same map, extra watching. π
βοΈ Author βοΈ
Generated automatically by Doxygen for libstdc++ from the source code. not a human author, just a robot doing its little thing π€π
ok and that's the whole page bestie, nothing skipped, every single signature stayed exactly where it was π
and for the sign-off: this whole thing is libstdc++, for the page std::__deb..., _Alloc >(3) β that's the version/source stamp down at the bottom, and it's literally the last line of the page. bye pookie, go write some debug-instrumented unordered maps π¦πβ¨
π¦ 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