STD::__PROFILE::UNORDERED_SET(3cxx)
π 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_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::reference referencetypedef _Base::size_type size_typetypedef _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 fileprofile/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 fileprofile/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 fileprofile/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 fileprofile/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 fileprofile/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 fileprofile/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 fileprofile/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 fileprofile/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 fileprofile/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 fileprofile/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 fileprofile/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
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 fileprofile/unordered_set.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 fileprofile/unordered_set.unordered_set(const _Base& __x)β [inline]. Definition at line 99 of fileprofile/unordered_set.unordered_set(const allocator_type& __a)β [inline], [explicit]. Definition at line 106 of fileprofile/unordered_set.unordered_set(const unordered_set<_Key, _Hash, _Pred, _Alloc>& __uset, const allocator_type& __a)β [inline]. Definition at line 110 of fileprofile/unordered_set.unordered_set(unordered_set<_Key, _Hash, _Pred, _Alloc>&& __uset, const allocator_type& __a)β [inline]. Definition at line 115 of fileprofile/unordered_set. (yes bestie, that's the move-y one π)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 fileprofile/unordered_set.unordered_set(size_type __n, const allocator_type& __a)β [inline]. Definition at line 128 of fileprofile/unordered_set.unordered_set(size_type __n, const hasher& __hf, const allocator_type& __a)β [inline]. Definition at line 132 of fileprofile/unordered_set.template<typename _InputIterator> unordered_set(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a)β [inline]. Definition at line 138 of fileprofile/unordered_set.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 fileprofile/unordered_set.unordered_set(initializer_list<value_type> __l, size_type __n, const allocator_type& __a)β [inline]. Definition at line 151 of fileprofile/unordered_set.unordered_set(initializer_list<value_type> __l, size_type __n, const hasher& __hf, const allocator_type& __a)β [inline]. Definition at line 157 of fileprofile/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 fileunordered_base.h.void _M_profile_destruct()β also [noexcept]. Definition at line 198 of fileunordered_base.h.void _M_profile_resize(std::size_t __old_size)β Definition at line 220 of fileunordered_base.h.void _M_swap(_Unordered_profile<_UnorderedCont, _Unique_keys>& __other)β also [noexcept]. Definition at line 213 of fileunordered_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 fileprofile/unordered_set.template<typename... _Args> std::pair<iterator, bool> emplace(_Args&&... __args)β [inline]. Definition at line 196 of fileprofile/unordered_set.template<typename... _Args> iterator emplace_hint(const_iterator __it, _Args&&... __args)β [inline]. Definition at line 207 of fileprofile/unordered_set.template<typename _InputIter> void insert(_InputIter __first, _InputIter __last)β [inline]. Definition at line 262 of fileprofile/unordered_set.std::pair<iterator, bool> insert(const value_type& __obj)β [inline]. Definition at line 225 of fileprofile/unordered_set.iterator insert(const_iterator __iter, const value_type& __v)β [inline]. Definition at line 234 of fileprofile/unordered_set.iterator insert(const_iterator __iter, value_type&& __v)β [inline]. Definition at line 252 of fileprofile/unordered_set.void insert(std::initializer_list<value_type> __l)β [inline]. Definition at line 217 of fileprofile/unordered_set.std::pair<iterator, bool> insert(value_type&& __obj)β [inline]. Definition at line 243 of fileprofile/unordered_set.unordered_set& operator=(initializer_list<value_type> __l)β [inline]. Definition at line 170 of fileprofile/unordered_set.void rehash(size_type __n)β [inline]. Definition at line 270 of fileprofile/unordered_set.void swap(unordered_set<_Key, _Hash, _Pred, _Alloc>& __x)β [inline], [noexcept]. Definition at line 179 of fileprofile/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 fileunordered_base.h.__gnu_profile::__container_size_info* _M_size_infoβ [protected], [inherited]. Definition at line 227 of fileunordered_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
- 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