STD::__PROFILE::UNORDERED_MAP(3cxx)
π NAME π
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > β Class std::unordered_map wrapper with performance instrumentation.
okay so bestie, quick vibe check: this is a section 3cxx manual page (that's the C++ standard library section, iykyk) and it's about a β¨specialβ¨ unordered_map that keeps track of how your code is performing. It's giving "your map, but it's taking notes". π
β¨ SYNOPSIS β¨
#include <unordered_map>
So here's the lineage, and ngl it's a whole family tree:
Inherits unordered_map< _Key, _Tp, std::hash< _Key >, std::equal_to<
_Key >, std::allocator< std::pair< const _Key, _Tp > > >, and
std::__profile::_Unordered_profile< _UnorderedCont, _Unique_keys >.
Like, it is an unordered_map, and it also carries the profile stuff around with it. Both. At once. Iconic behaviour, honestly. π¦
π«Ά Public Types π«Ά
typedef _Base::allocator_type allocator_typetypedef _Base::const_iterator const_iteratortypedef _Base::const_reference const_referencetypedef _Base::difference_type difference_typetypedef _Base::hasher hashertypedef _Base::iterator iteratortypedef _Base::key_equal key_equaltypedef _Base::key_type key_typetypedef _Base::mapped_type mapped_typetypedef _Base::reference referencetypedef _Base::size_type size_typetypedef _Base::value_type value_type
every single one of them borrowed straight off _Base, no cap, they didn't even pretend otherwise π
πΈ Public Member Functions πΈ
The constructor lineup (yes there's like a million of them, it's a whole roster):
template<typename _InputIterator > unordered_map (_InputIterator __f, _InputIterator __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())template<typename _InputIterator > unordered_map (_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type &__a)template<typename _InputIterator > unordered_map (_InputIterator __first, _InputIterator __last, size_type __n, const hasher &__hf, const allocator_type &__a)unordered_map (const _Base &__x)unordered_map (const allocator_type &__a)unordered_map (const unordered_map &)=defaultunordered_map (const unordered_map &__umap, const allocator_type &__a)unordered_map (initializer_list< value_type > __l, size_type __n, const allocator_type &__a)unordered_map (initializer_list< value_type > __l, size_type __n, const hasher &__hf, const allocator_type &__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())unordered_map (size_type __n, const allocator_type &__a)unordered_map (size_type __n, const hasher &__hf, const allocator_type &__a)unordered_map (size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())unordered_map (unordered_map &&)=defaultunordered_map (unordered_map &&__umap, const allocator_type &__a)
notice how some of them have =default just sitting there doing absolutely nothing but looking cute π
The rest of the member functions:
void clear () noexceptβ wipes it, and it'snoexcept, so it's not about to surprise you πtemplate<typename... _Args> std::pair< iterator, bool > emplace (_Args &&... __args)β builds something in place, hands you back aniteratorand aboolall wrapped up in astd::pairtemplate<typename... _Args> iterator emplace_hint (const_iterator __it, _Args &&... __args)β same emplace energy but you're sliding it a hint__itand getting just aniteratorbacktemplate<typename _InputIter > void insert (_InputIter __first, _InputIter __last)β inserts a whole range, returns nothingtemplate<typename _Pair , typename = typename std::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type> std::pair< iterator, bool > insert (_Pair &&__obj)β the SFINAE one, it only exists ifvalue_typeis constructible from_Pair&&std::pair< iterator, bool > insert (const value_type &__obj)β plain insert, gives youstd::pair< iterator, bool >template<typename _Pair , typename = typename std::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type> iterator insert (const_iterator __iter, _Pair &&__v)β hinted + SFINAE'd, returns aniteratoriterator insert (const_iterator __iter, const value_type &__v)β hinted, returns aniteratorvoid insert (std::initializer_list< value_type > __l)β drop a whole initializer list in, returns nothingunordered_map & operator= (const unordered_map &)=defaultunordered_map & operator= (initializer_list< value_type > __l)unordered_map & operator= (unordered_map &&)=defaultmapped_type & operator[] (_Key &&__k)β hands back amapped_type &for the keymapped_type & operator[] (const _Key &__k)β same deal, const key flavourvoid rehash (size_type __n)void swap (unordered_map &__x) noexcept(noexcept(__x._M_base().swap(__x)))β swaps with__x, and look at thatnoexceptclause, it's conditional, so fancy π
π¦ Protected Member Functions π¦
void _M_profile_construct () noexceptvoid _M_profile_destruct () noexceptvoid _M_profile_resize (std::size_t __old_size)void _M_swap (_Unordered_profile &__other) noexcept
protected, so it's giving for the internals only, stay in your lane bestie π
π Protected Attributes π
__gnu_profile::__hashfunc_info * _M_hashfunc_info__gnu_profile::__container_size_info * _M_size_info
two raw pointers, just hanging out, tracking things π
π₯ Detailed Description π₯
okay so here's the actual class declaration, and listen, it's a template:
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::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>"Class std::unordered_map wrapper with performance instrumentation.
(yes the >"Class thing is really in there, I'm not editing that, it's part of the lore π)
Definition at line 51 of file profile/unordered_map.
π Member Typedef Documentation π
fr fr, every single one of these is just _Base::something re-exported, but they each get their own little spotlight, so here we go:
allocator_type
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> >> typedef
_Base::allocator_type std::__profile::unordered_map< _Key, _Tp, _Hash,
_Pred, _Alloc >::allocator_type
Definition at line 68 of file profile/unordered_map.
const_iterator
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> >> typedef
_Base::const_iterator std::__profile::unordered_map< _Key, _Tp, _Hash,
_Pred, _Alloc >::const_iterator
Definition at line 77 of file profile/unordered_map.
const_reference
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> >> typedef
_Base::const_reference std::__profile::unordered_map< _Key, _Tp, _Hash,
_Pred, _Alloc >::const_reference
Definition at line 73 of file profile/unordered_map.
difference_type
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> >> typedef
_Base::difference_type std::__profile::unordered_map< _Key, _Tp, _Hash,
_Pred, _Alloc >::difference_type
Definition at line 71 of file profile/unordered_map.
hasher
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> >> typedef _Base::hasher
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::hasher
Definition at line 66 of file profile/unordered_map.
iterator
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> >> typedef _Base::iterator
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::iterator
Definition at line 76 of file profile/unordered_map.
key_equal
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> >> typedef _Base::key_equal
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::key_equal
Definition at line 67 of file profile/unordered_map.
key_type
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> >> typedef _Base::key_type
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::key_type
Definition at line 69 of file profile/unordered_map.
mapped_type
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> >> typedef _Base::mapped_type
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::mapped_type
Definition at line 74 of file profile/unordered_map.
reference
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> >> typedef _Base::reference
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::reference
Definition at line 72 of file profile/unordered_map.
size_type
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> >> typedef _Base::size_type
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::size_type
Definition at line 65 of file profile/unordered_map.
value_type
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> >> typedef _Base::value_type
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::value_type
Definition at line 70 of file profile/unordered_map.
and that's just part one bestie, we are SO not done yet, hold on π
β¨ the shared glow-up (template header) β¨
okay bestie, before we get into the thirteen (yes THIRTEEN π) constructors, here's the template header they ALL rock, so I don't have to type it thirteen times and you don't have to read it thirteen times. it's giving efficiency π«Ά
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> >>
every single one below is std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::unordered_map(...) and lives in the file profile/unordered_map. two of them are also member templates with an extra template<typename _InputIterator > β I'll flag those when we get there. periodt π
1. the bucket-count buffet
unordered_map(size_type __n, const hasher & __hf = hasher(),
const key_equal & __eql = key_equal(),
const allocator_type & __a = allocator_type())
the OGs: [inline], [explicit]. it takes a size_type __n, and then the hasher __hf, key-equal __eql and allocator __a all come with defaults (hasher(), key_equal(), allocator_type()). lowkey the whole squad is invited but nobody has to show up.
Definition at line 82 of file profile/unordered_map.
2. the iterator-range one (member template, first edition)
this one brings its own extra template line, note it:
template<typename _InputIterator >
unordered_map(_InputIterator __f, _InputIterator __l, size_type __n = 0,
const hasher & __hf = hasher(), const key_equal & __eql = key_equal(),
const allocator_type & __a = allocator_type())
[inline]. heads up bestie: the iterators here are named __f and __l β not __first/__last like the later ones, so don't go renaming them, iykyk. __n defaults to 0, and __hf, __eql, __a keep their usual defaults.
Definition at line 89 of file profile/unordered_map.
3. the one that just wants a _Base
unordered_map(const _Base & __x)
[inline]. that's it. one const _Base & __x. no defaults, no drama, main character minimalism β¨
Definition at line 98 of file profile/unordered_map.
4. the allocator-only era
unordered_map(const allocator_type & __a)
[inline], [explicit]. just hands you the allocator __a and nothing else. it's giving "I only need one thing and I'm not sorry" π
Definition at line 104 of file profile/unordered_map.
5. the copy-with-allocator
unordered_map(const unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > & __umap,
const allocator_type & __a)
[inline]. takes a const reference to another unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > called __umap, plus an allocator __a. so it's the same map but with your allocator. iconic.
Definition at line 107 of file profile/unordered_map.
6. the move-with-allocator
unordered_map(unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > && __umap,
const allocator_type & __a)
[inline]. same as above but __umap is an rvalue reference (&&) this time, plus the allocator __a. it's the glowy anime version of #5 π₯
Definition at line 111 of file profile/unordered_map.
7. the initializer_list deluxe
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())
[inline]. initializer_list< value_type > __l up front, then __n = 0, then __hf = hasher(), __eql = key_equal(), __a = allocator_type(). the full send π
Definition at line 115 of file profile/unordered_map.
8. the n-and-allocator duo
unordered_map(size_type __n, const allocator_type & __a)
[inline]. size_type __n and the allocator __a. no defaults in sight, no hasher, no key-equal. clean. minimal. obsessed.
Definition at line 122 of file profile/unordered_map.
9. the n-hasher-allocator trio
unordered_map(size_type __n, const hasher & __hf, const allocator_type & __a)
[inline]. __n, __hf, __a β the hasher slid into the group chat this time. still no key-equal, we keep it β¨exclusiveβ¨.
Definition at line 126 of file profile/unordered_map.
10. the iterator-range one (member template, second edition)
extra template line again, don't skip it:
template<typename _InputIterator >
unordered_map(_InputIterator __first, _InputIterator __last, size_type __n,
const allocator_type & __a)
[inline]. and NOW the iterators are named __first and __last (told you they'd switch up on you π), plus __n and the allocator __a. no defaults here, everything must be handed over explicitly.
Definition at line 132 of file profile/unordered_map.
11. the iterator-range one (member template, third edition)
template<typename _InputIterator >
unordered_map(_InputIterator __first, _InputIterator __last, size_type __n,
const hasher & __hf, const allocator_type & __a)
[inline]. same as #10 but the hasher __hf joins the party between __n and __a. glow up unlocked π¦
Definition at line 139 of file profile/unordered_map.
12. the initializer_list plus n plus allocator
unordered_map(initializer_list< value_type > __l, size_type __n,
const allocator_type & __a)
[inline]. __l, __n, __a β that's the whole roster, no default values, no hasher, no key-equal.
Definition at line 145 of file profile/unordered_map.
13. the final boss π
unordered_map(initializer_list< value_type > __l, size_type __n,
const hasher & __hf, const allocator_type & __a)
[inline]. __l, __n, __hf, __a. the four-piece combo meal, no defaults because we're grown and we make choices. and that's a wrap on all thirteen, bestie π
Definition at line 151 of file profile/unordered_map.
π Member Function Documentation π
okay bestie, deep breath, this is the big one. every member function of std::__profile::unordered_map and its inherited profile base _Unordered_profile lives down here, in alphabetical-ish order, with the exact signature, the exact flags, and the exact file + line it was born in. no skipping, we're reading all of them. periodt. π
π§ the inherited _Unordered_profile hooks π§
these four are the profile machinery itself, inherited by the map, all marked [inline], [protected], and β where the original says so β [noexcept]. they all come from unordered_base.h.
_M_profile_construct()β the profile-side "we exist now" hook.
template<typename _UnorderedCont , bool _Unique_keys> void
std::__profile::_Unordered_profile< _UnorderedCont, _Unique_keys >::_M_profile_construct () [inline], [protected], [noexcept], [inherited]
Definition at line 190 of file unordered_base.h.
_M_profile_destruct()β the matching "we're gone now" hook, also[inline],[protected],[noexcept],[inherited].
template<typename _UnorderedCont , bool _Unique_keys> void
std::__profile::_Unordered_profile< _UnorderedCont, _Unique_keys >::_M_profile_destruct () [inline], [protected], [noexcept], [inherited]
Definition at line 198 of file unordered_base.h.
_M_profile_resize(std::size_t __old_size)β the resize hook, and it takesstd::size_t __old_size. this one is[inline],[protected],[inherited]β notice, no[noexcept]on this one, bestie. eyes open.
template<typename _UnorderedCont , bool _Unique_keys> void
std::__profile::_Unordered_profile< _UnorderedCont, _Unique_keys >::_M_profile_resize (std::size_t __old_size) [inline], [protected], [inherited]
Definition at line 220 of file unordered_base.h.
_M_swap(_Unordered_profile< _UnorderedCont, _Unique_keys > & __other)β swap hook,[inline],[protected],[noexcept],[inherited], takes a reference to another profile of the same shape.
template<typename _UnorderedCont , bool _Unique_keys> void
std::__profile::_Unordered_profile< _UnorderedCont, _Unique_keys >::_M_swap (_Unordered_profile< _UnorderedCont, _Unique_keys > & __other) [inline], [protected], [noexcept], [inherited]
Definition at line 213 of file unordered_base.h.
πΈ the unordered_map overrides themselves πΈ
okay so every single one of these is templated on _Key, _Tp, _Hash = std::hash<_Key>, _Pred = std::equal_to<_Key>, and _Alloc = std::allocator<std::pair<const _Key, _Tp> > β that's the exact default list, don't let anyone tell you otherwise β and they all live in the file profile/unordered_map. they're all [inline]. let's go. π
clear()β wipes the whole thing, and it's[noexcept]so it promises not to throw drama at you.
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> >> void
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::clear () [inline], [noexcept]
Definition at line 173 of file profile/unordered_map.
emplace(_Args &&... __args)β perfect-forwarding variadic emplace, hands you back astd::pair< iterator, bool >.
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> >> template<typename... _Args>
std::pair< iterator, bool > std::__profile::unordered_map< _Key, _Tp,
_Hash, _Pred, _Alloc >::emplace (_Args &&... __args) [inline]
Definition at line 182 of file profile/unordered_map.
emplace_hint(const_iterator __it, _Args &&... __args)β emplace but with a hint iterator__itto nudge it, returns aniterator.
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> >> template<typename... _Args>
iterator std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::emplace_hint (const_iterator __it, _Args &&... __args) [inline]
Definition at line 193 of file profile/unordered_map.
the insert family (yes, there are six of them π)
insert(_InputIter __first, _InputIter __last)β range insert, returnsvoid.
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> >> template<typename
_InputIter > void std::__profile::unordered_map< _Key , _Tp , _Hash ,
_Pred , _Alloc >::insert (_InputIter __first, _InputIter __last) [inline]
Definition at line 255 of file profile/unordered_map.
insert(_Pair && __obj)β the rvalue-ish_Pairoverload, gated behindstd::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type, returnsstd::pair< iterator, bool >.
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> >> template<typename _Pair ,
typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type> std::pair< iterator, bool >
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert
(_Pair && __obj) [inline]
Definition at line 232 of file profile/unordered_map.
insert(const value_type & __obj)β the plain const-ref one, returnsstd::pair< iterator, bool >.
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> >> std::pair< iterator, bool >
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert
(const value_type & __obj) [inline]
Definition at line 211 of file profile/unordered_map.
insert(const_iterator __iter, _Pair && __v)β hinted, with the same_Pairenable_if gate, returns aniterator.
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> >> template<typename _Pair ,
typename = typename
std::enable_if<std::is_constructible<value_type,
_Pair&&>::value>::type> iterator std::__profile::unordered_map< _Key,
_Tp, _Hash, _Pred, _Alloc >::insert (const_iterator __iter, _Pair &&
__v) [inline]
Definition at line 245 of file profile/unordered_map.
insert(const_iterator __iter, const value_type & __v)β hinted const-ref version, returns aniterator.
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> >> iterator
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert
(const_iterator __iter, const value_type & __v) [inline]
Definition at line 220 of file profile/unordered_map.
insert(std::initializer_list< value_type > __l)β the braced-list one, returnsvoid.
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> >> void
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::insert
(std::initializer_list< value_type > __l) [inline]
Definition at line 203 of file profile/unordered_map.
operators π
operator=(initializer_list< value_type > __l)β assign from a braced list, hands backunordered_map &.
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> >> unordered_map &
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::operator= (initializer_list< value_type > __l) [inline]
Definition at line 164 of file profile/unordered_map.
operator[](_Key && __k)β rvalue key, gives youmapped_type &.
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> >> mapped_type &
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::operator[] (_Key && __k) [inline]
Definition at line 273 of file profile/unordered_map.
operator[](const _Key & __k)β const-ref key, also gives youmapped_type &.
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> >> mapped_type &
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc
>::operator[] (const _Key & __k) [inline]
Definition at line 264 of file profile/unordered_map.
the bucket-shuffling ones π¦
rehash(size_type __n)β takes asize_type __nand rebuilds the buckets, returnsvoid.
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> >> void
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::rehash
(size_type __n) [inline]
Definition at line 289 of file profile/unordered_map.
swap(unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > & __x)β swaps with__x, and it's[noexcept]so it's chill about it.
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> >> void
std::__profile::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >::swap
(unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > & __x) [inline],
[noexcept]
Definition at line 282 of file profile/unordered_map.
π Member Data Documentation π
two protected data members, both inherited from the base, both defined in unordered_base.h, and they are the whole reason this profiling thing works at all:
_M_hashfunc_infoβ type__gnu_profile::__hashfunc_info*,[protected],[inherited].
template<typename _UnorderedCont , bool _Unique_keys>
__gnu_profile::__hashfunc_info* std::__profile::_Unordered_profile<
_UnorderedCont, _Unique_keys >::_M_hashfunc_info [protected],
[inherited]
Definition at line 228 of file unordered_base.h.
_M_size_infoβ type__gnu_profile::__container_size_info*,[protected],[inherited].
template<typename _UnorderedCont , bool _Unique_keys>
__gnu_profile::__container_size_info*
std::__profile::_Unordered_profile< _UnorderedCont, _Unique_keys
>::_M_size_info [protected], [inherited]
Definition at line 227 of file unordered_base.h.
π«Ά Author π«Ά
Generated automatically by Doxygen for libstdc++ from the source code.
and that's a wrap on the whole page, bestie π the source of all this is libstdc++, the generator is Doxygen (auto-generated straight from the source code, no human hand-wrote a single line of it), and the version/date tag is whatever that little footer at the very bottom of the page is whispering at you β the one that reads libststd::__profile:..._Pred, _Alloc >(3cxx) in that classic mangled-manpage way. we read every single line, every single flag, and we did not skip a one. iconic behaviour. slay. π
β¨
π¦ where this page comes from
- ubuntu noble: libstdc++-9-doc 9.5.0-6ubuntu2
- ubuntu noble: libstdc++-9-doc 9.5.0-6ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms