STD::__PROFILE::FORWARD_LIST(3cxx)
π std::__profile::forward_list< _Tp, _Alloc > π
okay so bestie, welcome to the 3cxx corner of the manual π
this is the page for std::__profile::forward_list< _Tp, _Alloc > β the profiled glow-up of everybody's favourite singly-linked list. buckle up, we're going through everything, no skips, no skimming. β¨
π NAME π
std::__profile::forward_list< _Tp, _Alloc > β it's Class std::forward_list wrapper with performance instrumentation. yeah that's the whole job description, she wraps and she measures. π
β¨ SYNOPSIS β¨
#include <forward_list>
Inherits forward_list< _Tp, std::allocator< _Tp > >. so like, she is a forward_list, she just also takes notes. π
π¦ Public Types π¦
const_iteratorβ literallytypedef _Base::const_iterator const_iterator. it's the base class's const iterator, re-exported, no new invention, no drama. π«Άsize_typeβtypedef _Base::size_type size_type. same story, borrowed straight from_Baseso you never have to go hunting. π
πΈ Public Member Functions πΈ
okay this is the long part bestie, stay with me, every single one is here:
template<typename _InputIterator , typename = std::_RequireInputIter<_InputIterator>> forward_list (_InputIterator __first, _InputIterator __last, const _Alloc &__al=_Alloc())β build from a range of iterators, allocator optional. and yeah it's SFINAE-guarded withstd::_RequireInputIter<_InputIterator>so only real input iterators get in. πforward_list (const _Alloc &__al) noexceptβ hand it an allocator, that's it, that's the whole plot. markednoexcept. β¨forward_list (const forward_list &)=defaultβ copy ctor, defaulted, the compiler handles it. πforward_list (const forward_list &__list, const _Alloc &__al)β copy with a specific allocator. yes, they're different, don't @ me. π¦forward_list (forward_list &&)=defaultβ move ctor, defaulted. π«Άforward_list (forward_list &&__list, const _Alloc &__al)β move, but with your allocator of choice. πforward_list (size_type __n, const _Alloc &__al=_Alloc())β__ndefault-constructed elements, allocator optional. πΈforward_list (size_type __n, const _Tp &__value, const _Alloc &__al=_Alloc())β__ncopies of__value, allocator optional. πforward_list (std::initializer_list< _Tp > __il, const _Alloc &__al=_Alloc())β from a braced init list, allocator optional. iconic behaviour tbh. βconst _Base & _M_base () const noexceptβ const access to the underlying base object,noexcept. π_Base & _M_base () noexceptβ non-const access to the underlying base object,noexcept. the way she just hands you the base. π₯void merge (forward_list &&__list)β merge in an rvalueforward_list. πtemplate<typename _Comp > void merge (forward_list &&__list, _Comp __comp)β same, but you bring your own comparator__comp. π§void merge (forward_list &__list)β merge in an lvalueforward_list. πtemplate<typename _Comp > void merge (forward_list &__list, _Comp __comp)β lvalue merge, custom comparator, chef's kiss. πforward_list & operator= (const forward_list &)=defaultβ copy assignment, defaulted. β¨forward_list & operator= (forward_list &&)=defaultβ move assignment, defaulted. π«Άforward_list & operator= (std::initializer_list< _Tp > __il)β assign from a braced init list. πΈvoid splice_after (const_iterator __pos, forward_list &&__fl)β splice everything from the rvalue__flin after__pos. π¦void splice_after (const_iterator __pos, forward_list &&__list, const_iterator __before, const_iterator __last)β splice the range(__before, __last)from the rvalue__list, after__pos. yes,__beforeis exclusive, that's the_afterof it all. πvoid splice_after (const_iterator __pos, forward_list &&__list, const_iterator __i)β splice the single element after__ifrom the rvalue__list, after__pos. πvoid splice_after (const_iterator __pos, forward_list &__list)β lvalue flavour, whole list, after__pos. βvoid splice_after (const_iterator __pos, forward_list &__list, const_iterator __before, const_iterator __last)β lvalue flavour, range(__before, __last), after__pos. πvoid splice_after (const_iterator __pos, forward_list &__list, const_iterator __i)β lvalue flavour, single element after__i, after__pos. π§void swap (forward_list &__fl) noexcept(noexcept(declval< _Base & >().swap(__fl)))β swap with__fl, and thenoexceptspec is literallynoexcept(noexcept(declval< _Base & >().swap(__fl))). she said "my exception guarantee is my base's exception guarantee". periodt. π
π Detailed Description π
the class template declaration is:
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
class std::__profile::forward_list< _Tp, _Alloc >
and the description is "Class std::forward_list wrapper with performance instrumentation." π
Definition at line 44 of file profile/forward_list.
π Member Typedef Documentation π
template<typename _Tp , typename _Alloc = std::allocator<_Tp>> typedef _Base::const_iterator std::__profile::forward_list< _Tp, _Alloc >::const_iteratorβ Definition at line 51 of fileprofile/forward_list. πtemplate<typename _Tp , typename _Alloc = std::allocator<_Tp>> typedef _Base::size_type std::__profile::forward_list< _Tp, _Alloc >::size_typeβ Definition at line 50 of fileprofile/forward_list. π¦
πΈ Constructor & Destructor Documentation πΈ
quick psa bestie: every single entry in this section is a member of the class template, so each one is prefixed with exactly this: cpp template<typename _Tp , typename _Alloc = std::allocator<_Tp>> keep it in mind for all seven of them, i'm not typing it seven times and neither should you. π
std::__profile::forward_list< _Tp, _Alloc >::forward_list (const _Alloc & __al)β [inline], [explicit], [noexcept]. Definition at line 58 of fileprofile/forward_list. β¨std::__profile::forward_list< _Tp, _Alloc >::forward_list (const forward_list< _Tp, _Alloc > & __list, const _Alloc & __al)β [inline]. Definition at line 61 of fileprofile/forward_list. π«Άstd::__profile::forward_list< _Tp, _Alloc >::forward_list (forward_list< _Tp, _Alloc > && __list, const _Alloc & __al)β [inline]. Definition at line 65 of fileprofile/forward_list. πstd::__profile::forward_list< _Tp, _Alloc >::forward_list (size_type __n, const _Alloc & __al = _Alloc())β [inline], [explicit]. Definition at line 70 of fileprofile/forward_list. πΈstd::__profile::forward_list< _Tp, _Alloc >::forward_list (size_type __n, const _Tp & __value, const _Alloc & __al = _Alloc())β [inline]. Definition at line 74 of fileprofile/forward_list. π¦template<typename _InputIterator , typename = std::_RequireInputIter<_InputIterator>> std::__profile::forward_list< _Tp, _Alloc >::forward_list (_InputIterator __first, _InputIterator __last, const _Alloc & __al = _Alloc())β [inline]. Definition at line 81 of fileprofile/forward_list. πstd::__profile::forward_list< _Tp, _Alloc >::forward_list (std::initializer_list< _Tp > __il, const _Alloc & __al = _Alloc())β [inline]. Definition at line 89 of fileprofile/forward_list. β
π₯ Member Function Documentation π₯
same deal as before bestie: each one of these is a class-template member, so picture this in front of all of them:cpp template<typename _Tp , typename _Alloc = std::allocator<_Tp>>and the twomergeentries with_Compalso carry their own extratemplate<typename _Comp >on top. π
const _Base & std::__profile::forward_list< _Tp, _Alloc >::_M_base () constβ [inline], [noexcept]. Definition at line 164 of fileprofile/forward_list. π_Base & std::__profile::forward_list< _Tp, _Alloc >::_M_base ()β [inline], [noexcept]. Definition at line 161 of fileprofile/forward_list. πvoid std::__profile::forward_list< _Tp, _Alloc >::merge (forward_list< _Tp, _Alloc > && __list)β [inline]. Definition at line 143 of fileprofile/forward_list. πtemplate<typename _Comp > void std::__profile::forward_list< _Tp, _Alloc >::merge (forward_list< _Tp, _Alloc > && __list, _Comp __comp)β [inline]. Definition at line 152 of fileprofile/forward_list. π§void std::__profile::forward_list< _Tp, _Alloc >::merge (forward_list< _Tp, _Alloc > & __list)β [inline]. Definition at line 147 of fileprofile/forward_list. πtemplate<typename _Comp > void std::__profile::forward_list< _Tp, _Alloc >::merge (forward_list< _Tp, _Alloc > & __list, _Comp __comp)β [inline]. Definition at line 157 of fileprofile/forward_list. π«Άforward_list & std::__profile::forward_list< _Tp, _Alloc >::operator= (std::initializer_list< _Tp > __il)β [inline]. Definition at line 103 of fileprofile/forward_list. β¨void std::__profile::forward_list< _Tp, _Alloc >::splice_after (const_iterator __pos, forward_list< _Tp, _Alloc > && __fl)β [inline]. Definition at line 115 of fileprofile/forward_list. πΈvoid std::__profile::forward_list< _Tp, _Alloc >::splice_after (const_iterator __pos, forward_list< _Tp, _Alloc > && __list, const_iterator __before, const_iterator __last)β [inline]. Definition at line 133 of fileprofile/forward_list. π¦void std::__profile::forward_list< _Tp, _Alloc >::splice_after (const_iterator __pos, forward_list< _Tp, _Alloc > && __list, const_iterator __i)β [inline]. Definition at line 123 of fileprofile/forward_list. πvoid std::__profile::forward_list< _Tp, _Alloc >::splice_after (const_iterator __pos, forward_list< _Tp, _Alloc > & __list)β [inline]. Definition at line 119 of fileprofile/forward_list. βvoid std::__profile::forward_list< _Tp, _Alloc >::splice_after (const_iterator __pos, forward_list< _Tp, _Alloc > & __list, const_iterator __before, const_iterator __last)β [inline]. Definition at line 138 of fileprofile/forward_list. πvoid std::__profile::forward_list< _Tp, _Alloc >::splice_after (const_iterator __pos, forward_list< _Tp, _Alloc > & __list, const_iterator __i)β [inline]. Definition at line 128 of fileprofile/forward_list. π§void std::__profile::forward_list< _Tp, _Alloc >::swap (forward_list< _Tp, _Alloc > & __fl)β [inline], [noexcept]. Definition at line 110 of fileprofile/forward_list. π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. yeah, a robot wrote it, and honestly? she ate. π€π
and that's the whole page bestie!! this one lives in the libstdc++ docs, manual section 3cxx β that's the manual name folded in right here instead of sitting on some boring header line, you're welcome β and there's no date stamped on it, so consider it timeless. go forth and profile your forward lists. mwah. ππβ¨
π¦ 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