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_type
  • const_iterator β€” typedef __gnu_debug::_Safe_iterator< _Base_const_iterator, unordered_map > const_iterator
  • const_local_iterator β€” typedef __gnu_debug::_Safe_local_iterator< _Base_const_local_iterator, unordered_map > const_local_iterator
  • const_pointer β€” typedef _Base::const_pointer const_pointer
  • const_reference β€” typedef _Base::const_reference const_reference
  • difference_type β€” typedef _Base::difference_type difference_type
  • hasher β€” typedef _Base::hasher hasher
  • iterator β€” typedef __gnu_debug::_Safe_iterator< _Base_iterator, unordered_map > iterator
  • key_equal β€” typedef _Base::key_equal key_equal
  • key_type β€” typedef _Base::key_type key_type
  • local_iterator β€” typedef __gnu_debug::_Safe_local_iterator< _Base_local_iterator, unordered_map > local_iterator
  • mapped_type β€” typedef _Base::mapped_type mapped_type
  • pointer β€” typedef _Base::pointer pointer
  • reference β€” typedef _Base::reference reference
  • size_type β€” typedef _Base::size_type size_type
  • value_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 __first to __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 __n and 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 __hf and 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 defaults size_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 =default so 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 __l and 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 __n and 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()) β€” __n with defaults const 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 __umap with allocator __a, and note the exception spec is exactly noexcept(noexcept(_Base(std::move(__umap), __a))).

🌸 The rest of the member function serving πŸ“

  • const _Base & _M_base () const noexcept β€” hands you the const _Base &, noexcept.
  • _Base & _M_base () noexcept β€” same energy, non-const, noexcept.
  • const_iterator begin () const noexcept β€” const begin, noexcept.
  • iterator begin () noexcept β€” begin, noexcept.
  • local_iterator begin (size_type __b) β€” begin for 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 __b is, as a size_type.
  • const_iterator cbegin () const noexcept β€” cbegin, noexcept.
  • const_local_iterator cbegin (size_type __b) const β€” cbegin for bucket __b.
  • const_iterator cend () const noexcept β€” cend, noexcept.
  • const_local_iterator cend (size_type __b) const β€” cend for bucket __b.
  • void clear () noexcept β€” wipes it, noexcept.
  • template<typename... _Args> std::pair< iterator, bool > emplace (_Args &&... __args) β€” perfect-forwarding emplace over _Args &&... __args, returns std::pair< iterator, bool >.
  • template<typename... _Args> iterator emplace_hint (const_iterator __hint, _Args &&... __args) β€” emplace with a hint __hint, returns iterator.
  • const_iterator end () const noexcept β€” const end, noexcept.
  • iterator end () noexcept β€” end, noexcept.
  • local_iterator end (size_type __b) β€” end for 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_range for __key, returns std::pair< iterator, iterator >.
  • std::pair< const_iterator, const_iterator > equal_range (const key_type &__key) const β€” const one, returns std::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, returns size_type.
  • size_type erase (const key_type &__key) β€” erase by __key, returns size_type.
  • iterator erase (const_iterator __first, const_iterator __last) β€” erase the range __first to __last, returns iterator.
  • iterator erase (const_iterator __it) β€” erase one const_iterator __it, returns iterator.
  • iterator erase (iterator __it) β€” erase one iterator __it, returns iterator.
  • iterator find (const key_type &__key) β€” find by __key, returns iterator.
  • const_iterator find (const key_type &__key) const β€” const find by __key.
  • template<typename _InputIterator> void insert (_InputIterator __first, _InputIterator __last) β€” insert the range __first to __last, returns void.
  • 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, returns std::pair< iterator, bool >.
  • std::pair< iterator, bool > insert (const value_type &__obj) β€” insert const value_type &__obj, returns std::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, returns iterator.
  • iterator insert (const_iterator __hint, const value_type &__obj) β€” hinted insert, returns iterator.
  • iterator insert (const_iterator __hint, value_type &&__x) β€” hinted move-y insert with value_type &&__x, returns iterator.
  • void insert (std::initializer_list< value_type > __l) β€” insert the whole initializer list __l, returns void.
  • std::pair< iterator, bool > insert (value_type &&__x) β€” insert value_type &&__x, returns std::pair< iterator, bool >.
  • float max_load_factor () const noexcept β€” getter for the max load factor, returns float, noexcept.
  • void max_load_factor (float __f) β€” setter, takes float __f.
  • unordered_map & operator= (const unordered_map &)=default β€” copy assign, =default.
  • unordered_map & operator= (initializer_list< value_type > __l) β€” assign from __l, returns unordered_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 specific noexcept(noexcept(declval< _Base & >().swap(__x))).

🧚 Protected Member Functions 🧚

  • constexpr void _M_swap (const _Safe_container &__x) const noexcept β€” constexpr, takes const _Safe_container &__x, returns void, noexcept. protected, so it's giving inner-circle ✨

πŸ‘‘ Friends πŸ‘‘

  • template<typename _ItT, typename _SeqT, typename _CatT> class ::__gnu_debug::_Safe_iterator
  • template<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