STD::__PROFILE::FORWARD_LIST(3cxx)

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

πŸ’– 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 β€” literally typedef _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 _Base so 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 with std::_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. marked noexcept. ✨
  • 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()) β€” __n default-constructed elements, allocator optional. 🌸
  • forward_list (size_type __n, const _Tp &__value, const _Alloc &__al=_Alloc()) β€” __n copies 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 rvalue forward_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 lvalue forward_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 __fl in 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, __before is exclusive, that's the _after of it all. πŸ’…
  • void splice_after (const_iterator __pos, forward_list &&__list, const_iterator __i) β€” splice the single element after __i from 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 the noexcept spec is literally noexcept(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 file profile/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 file profile/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 file profile/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 file profile/forward_list. 🫢
  • std::__profile::forward_list< _Tp, _Alloc >::forward_list (forward_list< _Tp, _Alloc > && __list, const _Alloc & __al) β€” [inline]. Definition at line 65 of file profile/forward_list. πŸ’–
  • std::__profile::forward_list< _Tp, _Alloc >::forward_list (size_type __n, const _Alloc & __al = _Alloc()) β€” [inline], [explicit]. Definition at line 70 of file profile/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 file profile/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 file profile/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 file profile/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 two merge entries with _Comp also carry their own extra template<typename _Comp > on top. πŸŽ€
  • const _Base & std::__profile::forward_list< _Tp, _Alloc >::_M_base () const β€” [inline], [noexcept]. Definition at line 164 of file profile/forward_list. πŸ’œ
  • _Base & std::__profile::forward_list< _Tp, _Alloc >::_M_base () β€” [inline], [noexcept]. Definition at line 161 of file profile/forward_list. πŸ’…
  • void std::__profile::forward_list< _Tp, _Alloc >::merge (forward_list< _Tp, _Alloc > && __list) β€” [inline]. Definition at line 143 of file profile/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 file profile/forward_list. 🧚
  • void std::__profile::forward_list< _Tp, _Alloc >::merge (forward_list< _Tp, _Alloc > & __list) β€” [inline]. Definition at line 147 of file profile/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 file profile/forward_list. 🫢
  • forward_list & std::__profile::forward_list< _Tp, _Alloc >::operator= (std::initializer_list< _Tp > __il) β€” [inline]. Definition at line 103 of file profile/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 file profile/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 file profile/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 file profile/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 file profile/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 file profile/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 file profile/forward_list. 🧚
  • void std::__profile::forward_list< _Tp, _Alloc >::swap (forward_list< _Tp, _Alloc > & __fl) β€” [inline], [noexcept]. Definition at line 110 of file profile/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