STD::__DEBUG::FORWARD_LIST(3)

πŸ’– std::__debug::forward_list< _Tp, _Alloc > πŸ’–

okay bestie, welcome to the Library Functions Manual, section 3, and no we are NOT skipping anything, this page is a whole meal. πŸ’…

This is the manual page for std::__debug::forward_list< _Tp, _Alloc > β€” that's the debug-flavoured glow-up of a class, and the header line up top is honestly giving truncated-girlboss energy: std::__deb...p, _Alloc >(3). She's mysterious. She contains multitudes. πŸ¦‹


✨ NAME ✨

std::__debug::forward_list< _Tp, _Alloc > β€” Class std::forward_list with safety/checking/debug instrumentation. πŸ›‘οΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

#include <forward_list>

Inherits __gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware >.

Inherited by std::__debug::forward_list< _Tp, _Alloc >, and std::__debug::iterator< _Tp, _Alloc >.

yes it inherits from the safe container and yes it's also listed as being inherited by itself, the family tree is a little bit of a circle, we don't ask questions, we just vibe 🌈

πŸ’œ Public Types

  • typedef _Base::allocator_type allocator_type β€” the allocator type, straight from _Base, iconic.
  • typedef __gnu_debug::_Safe_iterator< _Base_const_iterator, forward_list > const_iterator β€” the const iterator, but make it safe ✨
  • typedef _Base::const_pointer const_pointer β€” const pointer, courtesy of _Base.
  • typedef _Base::const_reference const_reference β€” const reference, also from _Base.
  • typedef _Base::difference_type difference_type β€” the difference type, _Base said "here you go".
  • typedef __gnu_debug::_Safe_iterator< _Base_iterator, forward_list > iterator β€” the regular iterator, safety-instrumented and everything 🫢
  • typedef _Base::pointer pointer β€” pointer, _Base flavoured.
  • typedef _Base::reference reference β€” reference, _Base flavoured.
  • typedef _Base::size_type size_type β€” size type, from _Base.
  • typedef _Tp value_type β€” literally just _Tp. no notes. πŸ’…

🌸 Public Member Functions

okay this list is LONG, hydrate first, we're going through all of it.

  • forward_list (_Base_ref __x) β€” constructor from a _Base_ref.
  • template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> forward_list (_InputIterator __first, _InputIterator __last, const allocator_type &__al=allocator_type()) β€” constructor from an iterator range, with the allocator defaulting to allocator_type().
  • forward_list (const allocator_type &__al) noexcept β€” constructor from just an allocator, noexcept and unbothered. πŸ‘‘
  • forward_list (const forward_list &)=default β€” copy constructor, defaulted.
  • forward_list (const forward_list &__list, const allocator_type &__al) β€” copy constructor that also takes an allocator.
  • forward_list (forward_list &&)=default β€” move constructor, defaulted.
  • forward_list (forward_list &&__list, const allocator_type &__al) noexcept(std::is_nothrow_constructible< _Base, _Base, const allocator_type & >::value) β€” move constructor with an allocator, and that noexcept spec is verbatim, don't touch her.
  • forward_list (size_type __n, const __type_identity_t< _Tp > &__value, const allocator_type &__al=allocator_type()) β€” constructor from a count and a value, allocator defaults to allocator_type().
  • forward_list (size_type __n, const allocator_type &__al=allocator_type()) β€” constructor from just a count, allocator defaults to allocator_type().
  • forward_list (std::initializer_list< _Tp > __il, const allocator_type &__al=allocator_type()) β€” constructor from an initializer_list, allocator defaults to allocator_type().
  • const _Base & _M_base () const noexcept β€” const access to the _Base, noexcept.
  • _Base & _M_base () noexcept β€” non-const access to the _Base, noexcept.
  • template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign (_InputIterator __first, _InputIterator __last) β€” assign from an iterator range.
  • void assign (size_type __n, const _Tp &__val) β€” assign __n copies of __val.
  • void assign (std::initializer_list< _Tp > __il) β€” assign from an initializer_list.
  • const_iterator before_begin () const noexcept β€” const iterator to before-the-beginning, noexcept.
  • iterator before_begin () noexcept β€” iterator to before-the-beginning, noexcept.
  • const_iterator begin () const noexcept β€” const iterator to the beginning, noexcept.
  • iterator begin () noexcept β€” iterator to the beginning, noexcept.
  • const_iterator cbefore_begin () const noexcept β€” const iterator to before-the-beginning, noexcept, the c stands for cute (it also stands for const, both true πŸ’œ).
  • const_iterator cbegin () const noexcept β€” const begin, noexcept.
  • const_iterator cend () const noexcept β€” const end, noexcept.
  • void clear () noexcept β€” wipes it, noexcept.
  • template<typename... _Args> iterator emplace_after (const_iterator __pos, _Args &&... __args) β€” constructs in place after __pos, variadic and everything.
  • const_iterator end () const noexcept β€” const iterator to the end, noexcept.
  • iterator end () noexcept β€” iterator to the end, noexcept.
  • iterator erase_after (const_iterator __pos) β€” erases the element after __pos.
  • iterator erase_after (const_iterator __pos, const_iterator __last) β€” erases the range after __pos up to __last.
  • reference front () β€” reference to the front element.
  • const_reference front () const β€” const reference to the front element.
  • template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert_after (const_iterator __pos, _InputIterator __first, _InputIterator __last) β€” insert_after from an iterator range.
  • iterator insert_after (const_iterator __pos, _Tp &&__val) β€” insert_after a moved value.
  • iterator insert_after (const_iterator __pos, const _Tp &__val) β€” insert_after a const value.
  • iterator insert_after (const_iterator __pos, size_type __n, const _Tp &__val) β€” insert_after __n copies of __val.
  • iterator insert_after (const_iterator __pos, std::initializer_list< _Tp > __il) β€” insert_after from an initializer_list.
  • void merge (forward_list &&__list) β€” merges an rvalue forward_list.
  • template<typename _Comp> void merge (forward_list &&__list, _Comp __comp) β€” merges an rvalue forward_list using __comp.
  • void merge (forward_list &__list) β€” merges an lvalue forward_list.
  • template<typename _Comp> void merge (forward_list &__list, _Comp __comp) β€” merges an lvalue forward_list using __comp.
  • 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) β€” assignment from an initializer_list.
  • void pop_front () β€” yeets the front element.
  • __remove_return_type remove (const _Tp &__val) β€” removes matching __val, returns __remove_return_type.
  • template<typename _Pred> __remove_return_type remove_if (_Pred __pred) β€” removes whatever __pred says yes to, returns __remove_return_type.
  • void resize (size_type __sz) β€” resizes to __sz.
  • void resize (size_type __sz, const value_type &__val) β€” resizes to __sz, filling with __val.
  • void splice_after (const_iterator __pos, forward_list &&__list) β€” splices an rvalue forward_list after __pos.
  • void splice_after (const_iterator __pos, forward_list &&__list, const_iterator __before, const_iterator __last) β€” splices the range __before to __last from an rvalue forward_list after __pos.
  • void splice_after (const_iterator __pos, forward_list &&__list, const_iterator __i) β€” splices the single element at __i from an rvalue forward_list after __pos.
  • void splice_after (const_iterator __pos, forward_list &__list) β€” splices an lvalue forward_list after __pos.
  • void splice_after (const_iterator __pos, forward_list &__list, const_iterator __before, const_iterator __last) β€” splices the range __before to __last from an lvalue forward_list after __pos.
  • void splice_after (const_iterator __pos, forward_list &__list, const_iterator __i) β€” splices the single element at __i from an lvalue forward_list after __pos.
  • void swap (forward_list &__list) noexcept(noexcept(declval< _Base & >().swap(__list))) β€” swaps with __list, and that noexcept clause is exact, don't you dare paraphrase her. πŸ”₯
  • __remove_return_type unique () β€” removes consecutive duplicates, returns __remove_return_type.
  • template<typename _BinPred> __remove_return_type unique (_BinPred __binary_pred) β€” removes consecutive elements according to __binary_pred, returns __remove_return_type.

🧚 Protected Member Functions

  • constexpr void _M_swap (const _Safe_container &__x) const noexcept β€” protected, constexpr, noexcept, takes a const _Safe_container &__x. she's private-ish but make it constexpr. ✨

🌟 Friends

  • template<typename _ItT, typename _SeqT, typename _CatT> class ::__gnu_debug::_Safe_iterator β€” yes, that whole templated class is a friend. mutuals only. 🫢

🌈 Detailed Description 🌈

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
class std::__debug::forward_list< _Tp, _Alloc >

and the vibe of the whole thing, quoted directly: "Class std::forward_list with safety/checking/debug instrumentation." πŸ›‘οΈπŸ’–


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. so technically the author is a robot and honestly? she ate. πŸ€–πŸ’…


and that's the whole page bestie, no crumbs left β€” every typedef, every constructor, every overload, every noexcept, every protected member and that one friend class, all accounted for. the footer is just libstdc++ and a truncated std::__deb...p, _Alloc >(3) with no date in sight, so consider this your cute sign-off: generated with love, checked with safety instrumentation, libstdc++, that's the whole vibe πŸŽ€πŸ’œβœ¨

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms