STD::__PROFILE::UNORDERED_SET(3cxx)

πŸ“¦
version 9.5.0 Β· 3 versions
, in ubuntu noble

πŸ’– NAME πŸ’–

okay so bestie, meet std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >(3cxx) β€” the manual page for the std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc > class. It's literally an Unordered_set wrapper with performance instrumentation. No cap. iykyk ✨


🌸 SYNOPSIS 🌸

First things first, you gotta bring in the header:

#include <unordered_set>

Then it inherits unordered_set< _Key, std::hash< _Key >, std::equal_to< _Key >, std::allocator< _Key > >, and std::__profile::_Unordered_profile< _UnorderedCont, _Unique_keys >. periodt πŸ’…

πŸŽ€ Public Types πŸŽ€

the whole type roster, slay:

  • typedef _Base::allocator_type allocator_type
  • typedef _Base::const_iterator const_iterator
  • typedef _Base::const_reference const_reference
  • typedef _Base::difference_type difference_type
  • typedef _Base::hasher hasher
  • typedef _Base::iterator iterator
  • typedef _Base::key_equal key_equal
  • typedef _Base::key_type key_type
  • typedef _Base::reference reference
  • typedef _Base::size_type size_type
  • typedef _Base::value_type value_type

πŸ’… Public Member Functions πŸ’…

here's the whole function lineup, exactly as written, no edits bestie:

template<typename _InputIterator > unordered_set (_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_set (_InputIterator
    __first, _InputIterator __last, size_type __n, const allocator_type
    &__a)
template<typename _InputIterator > unordered_set (_InputIterator
    __first, _InputIterator __last, size_type __n, const hasher &__hf,
    const allocator_type &__a)
unordered_set (const _Base &__x)
unordered_set (const allocator_type &__a)
unordered_set (const unordered_set &)=default
unordered_set (const unordered_set &__uset, const allocator_type &__a)
unordered_set (initializer_list< value_type > __l, size_type __n, const
    allocator_type &__a)
unordered_set (initializer_list< value_type > __l, size_type __n, const
    hasher &__hf, const allocator_type &__a)
unordered_set (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_set (size_type __n, const allocator_type &__a)
unordered_set (size_type __n, const hasher &__hf, const allocator_type
    &__a)
unordered_set (size_type __n, const hasher &__hf=hasher(), const
    key_equal &__eql=key_equal(), const allocator_type
    &__a=allocator_type())
unordered_set (unordered_set &&)=default
unordered_set (unordered_set &&__uset, const allocator_type &__a)
void clear () noexcept
template<typename... _Args> std::pair< iterator, bool > emplace (_Args
    &&... __args)
template<typename... _Args> iterator emplace_hint (const_iterator __it,
    _Args &&... __args)
template<typename _InputIter > void insert (_InputIter __first,
    _InputIter __last)
std::pair< iterator, bool > insert (const value_type &__obj)
iterator insert (const_iterator __iter, const value_type &__v)
iterator insert (const_iterator __iter, value_type &&__v)
void insert (std::initializer_list< value_type > __l)
std::pair< iterator, bool > insert (value_type &&__obj)
unordered_set & operator= (const unordered_set &)=default
unordered_set & operator= (initializer_list< value_type > __l)
unordered_set & operator= (unordered_set &&)=default
void rehash (size_type __n)
void swap (unordered_set &__x)
    noexcept(noexcept(__x._M_base().swap(__x)))

🫢 Protected Member Functions 🫢

protected but not shy:

void _M_profile_construct () noexcept
void _M_profile_destruct () noexcept
void _M_profile_resize (std::size_t __old_size)
void _M_swap (_Unordered_profile &__other) noexcept

πŸ“ Protected Attributes πŸ“

the hidden little data besties:

__gnu_profile::__hashfunc_info * _M_hashfunc_info
__gnu_profile::__container_size_info * _M_size_info

🌈 Detailed Description 🌈

the full glow-up:

template<typename _Key, typename _Hash = std::hash<_Key>, typename _Pred =
    std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>>
class std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >"Unordered_set wrapper with performance instrumentation.
Definition at line 51 of file profile/unordered_set.

πŸ‘‘ Member Typedef Documentation πŸ‘‘

okay so every single one of these has the same template intro, and I'm not skipping a crumb: the way that repetition ate, fr fr.

  • allocator_type β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::allocator_type std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::allocator_type β€” Definition at line 68 of file profile/unordered_set.
  • const_iterator β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::const_iterator std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::const_iterator β€” Definition at line 76 of file profile/unordered_set.
  • const_reference β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::const_reference std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::const_reference β€” Definition at line 73 of file profile/unordered_set.
  • difference_type β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::difference_type std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::difference_type β€” Definition at line 71 of file profile/unordered_set.
  • hasher β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::hasher std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::hasher β€” Definition at line 66 of file profile/unordered_set.
  • iterator β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::iterator std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::iterator β€” Definition at line 75 of file profile/unordered_set.
  • key_equal β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::key_equal std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::key_equal β€” Definition at line 67 of file profile/unordered_set.
  • key_type β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::key_type std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::key_type β€” Definition at line 69 of file profile/unordered_set.
  • reference β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::reference std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::reference β€” Definition at line 72 of file profile/unordered_set.
  • size_type β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::size_type std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::size_type β€” Definition at line 65 of file profile/unordered_set.
  • value_type β€” template: template<typename _Key , typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<_Key>> typedef: typedef _Base::value_type std::__profile::unordered_set< _Key, _Hash, _Pred, _Alloc >::value_type β€” Definition at line 70 of file profile/unordered_set.

πŸ› οΈ Constructor & Destructor Documentation πŸ› οΈ

okay bestie, deep breath, because this is the ✨main character✨ section. Every single one of these constructors lives in the same template, so let's just say it once and get it out of the way:

template<typename _Key, typename _Hash = std::hash<_Key>,
         typename _Pred = std::equal_to<_Key>,
         typename _Alloc = std::allocator<_Key>>

that header? it's on every single one of the constructors below, no cap. same for all of them, i promise.


πŸ’… the constructors, in order

  1. unordered_set(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) β€” [inline], [explicit]. Definition at line 81 of file profile/unordered_set.
  2. template<typename _InputIterator> unordered_set(_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]. Definition at line 89 of file profile/unordered_set.
  3. unordered_set(const _Base& __x) β€” [inline]. Definition at line 99 of file profile/unordered_set.
  4. unordered_set(const allocator_type& __a) β€” [inline], [explicit]. Definition at line 106 of file profile/unordered_set.
  5. unordered_set(const unordered_set<_Key, _Hash, _Pred, _Alloc>& __uset, const allocator_type& __a) β€” [inline]. Definition at line 110 of file profile/unordered_set.
  6. unordered_set(unordered_set<_Key, _Hash, _Pred, _Alloc>&& __uset, const allocator_type& __a) β€” [inline]. Definition at line 115 of file profile/unordered_set. (yes bestie, that's the move-y one 🚚)
  7. unordered_set(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]. Definition at line 120 of file profile/unordered_set.
  8. unordered_set(size_type __n, const allocator_type& __a) β€” [inline]. Definition at line 128 of file profile/unordered_set.
  9. unordered_set(size_type __n, const hasher& __hf, const allocator_type& __a) β€” [inline]. Definition at line 132 of file profile/unordered_set.
  10. template<typename _InputIterator> unordered_set(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) β€” [inline]. Definition at line 138 of file profile/unordered_set.
  11. template<typename _InputIterator> unordered_set(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, const allocator_type& __a) β€” [inline]. Definition at line 145 of file profile/unordered_set.
  12. unordered_set(initializer_list<value_type> __l, size_type __n, const allocator_type& __a) β€” [inline]. Definition at line 151 of file profile/unordered_set.
  13. unordered_set(initializer_list<value_type> __l, size_type __n, const hasher& __hf, const allocator_type& __a) β€” [inline]. Definition at line 157 of file profile/unordered_set.
🫢 thirteen ways to build a set. thirteen. she contains multitudes, fr fr.

🌸 Member Function Documentation 🌸

first up, the four lil inherited helpers that live in _Unordered_profile, and they all share this template header:

template<typename _UnorderedCont, bool _Unique_keys>

class is std::__profile::_Unordered_profile<_UnorderedCont, _Unique_keys>, and every one of these is [inline], [protected], and [inherited] πŸ’œ

  • void _M_profile_construct() β€” also [noexcept]. Definition at line 190 of file unordered_base.h.
  • void _M_profile_destruct() β€” also [noexcept]. Definition at line 198 of file unordered_base.h.
  • void _M_profile_resize(std::size_t __old_size) β€” Definition at line 220 of file unordered_base.h.
  • void _M_swap(_Unordered_profile<_UnorderedCont, _Unique_keys>& __other) β€” also [noexcept]. Definition at line 213 of file unordered_base.h.

now the actual unordered_set members. all of these carry the same template header from the top of this page:

template<typename _Key, typename _Hash = std::hash<_Key>,
         typename _Pred = std::equal_to<_Key>,
         typename _Alloc = std::allocator<_Key>>
  • void clear() β€” [inline], [noexcept]. Definition at line 187 of file profile/unordered_set.
  • template<typename... _Args> std::pair<iterator, bool> emplace(_Args&&... __args) β€” [inline]. Definition at line 196 of file profile/unordered_set.
  • template<typename... _Args> iterator emplace_hint(const_iterator __it, _Args&&... __args) β€” [inline]. Definition at line 207 of file profile/unordered_set.
  • template<typename _InputIter> void insert(_InputIter __first, _InputIter __last) β€” [inline]. Definition at line 262 of file profile/unordered_set.
  • std::pair<iterator, bool> insert(const value_type& __obj) β€” [inline]. Definition at line 225 of file profile/unordered_set.
  • iterator insert(const_iterator __iter, const value_type& __v) β€” [inline]. Definition at line 234 of file profile/unordered_set.
  • iterator insert(const_iterator __iter, value_type&& __v) β€” [inline]. Definition at line 252 of file profile/unordered_set.
  • void insert(std::initializer_list<value_type> __l) β€” [inline]. Definition at line 217 of file profile/unordered_set.
  • std::pair<iterator, bool> insert(value_type&& __obj) β€” [inline]. Definition at line 243 of file profile/unordered_set.
  • unordered_set& operator=(initializer_list<value_type> __l) β€” [inline]. Definition at line 170 of file profile/unordered_set.
  • void rehash(size_type __n) β€” [inline]. Definition at line 270 of file profile/unordered_set.
  • void swap(unordered_set<_Key, _Hash, _Pred, _Alloc>& __x) β€” [inline], [noexcept]. Definition at line 179 of file profile/unordered_set.
πŸ’€ six whole insert overloads. she said "i will take your values in every conceivable form" and honestly? iconic.

πŸŽ€ Member Data Documentation πŸŽ€

two protected, inherited lil data members, both in _Unordered_profile, both with the header:

template<typename _UnorderedCont, bool _Unique_keys>
  • __gnu_profile::__hashfunc_info* _M_hashfunc_info β€” [protected], [inherited]. Definition at line 228 of file unordered_base.h.
  • __gnu_profile::__container_size_info* _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. (not a human, just a very diligent little robot πŸ€–βœ¨)


and that's the whole page bestie!! πŸ¦‹ this one's a std::__profile::unordered_set<...> page, shipped as (3cxx), coming at you from libstdc++ and generated by Doxygen β€” source, version and date all live on that lil footer line at the bottom, so go peek there for the receipts. you read the whole thing. i'm so proud of you. periodt. πŸ’…πŸ‘‘

πŸ“¦ where this page comes from