STD::_FWD_LIST_BASE(3cxx)

πŸ’… std::_Fwd_list_base< _Tp, _Alloc > β€” the 3cxx manual page, bestie ✨

okay so this is the std::_Fwd_list_base< _Tp, _Alloc > page from the 3cxx manual, and it's literally the base-class lore for forward_list. Buckle up, it's giving internals πŸ’–


πŸŽ€ NAME πŸŽ€

std::_Fwd_list_base< _Tp, _Alloc > - Base class for forward_list.

That's the whole NAME line, no cap. It's the base class for forward_list, periodt.


✨ SYNOPSIS ✨

#include <forward_list>

Inherited by std::forward_list< _Tp, _Alloc > [private].

Yes bestie, [private] β€” keep that in mind πŸ‘€

🌸 Public Types 🌸

typedef _Fwd_list_node< _Tp > _Node
typedef _Fwd_list_const_iterator< _Tp > const_iterator
typedef _Fwd_list_iterator< _Tp > iterator

Three public typedefs, all iconic in their own way: _Node, const_iterator, and iterator ✨

πŸ’– Public Member Functions πŸ’–

_Fwd_list_base (_Fwd_list_base &&)=default
_Fwd_list_base (_Fwd_list_base &&__lst, _Node_alloc_type &&__a)
_Fwd_list_base (_Fwd_list_base &&__lst, _Node_alloc_type &&__a,
    std::true_type)
_Fwd_list_base (_Node_alloc_type &&__a)
const _Node_alloc_type & _M_get_Node_allocator () const noexcept
_Node_alloc_type & _M_get_Node_allocator () noexcept

So we've got move constructors, a move constructor with an allocator, one with that plus std::true_type, one that just takes _Node_alloc_type &&__a, and two _M_get_Node_allocator() flavors β€” one const noexcept, one non-const noexcept. All exact, all here, no skipping 🫢

πŸ¦‹ Protected Types πŸ¦‹

typedef __gnu_cxx::__alloc_traits< _Node_alloc_type > _Node_alloc_traits
typedef __alloc_rebind< _Alloc, _Fwd_list_node< _Tp > > _Node_alloc_type

Protected typedefs, lowkey the plumbing behind the plumbing πŸ’œ

🧚 Protected Member Functions 🧚

template<typename... _Args> _Node * _M_create_node (_Args &&... __args)
_Fwd_list_node_base * _M_erase_after (_Fwd_list_node_base *__pos)
_Fwd_list_node_base * _M_erase_after (_Fwd_list_node_base *__pos,
    _Fwd_list_node_base *__last)
_Node * _M_get_node ()
template<typename... _Args> _Fwd_list_node_base * _M_insert_after
    (const_iterator __pos, _Args &&... __args)
void _M_put_node (_Node *__p)

This is the under-the-hood protected crew: create a node, erase after one position, erase after a range, get a node, insert after with variadic args, and put a node back. Very β€œdon't touch unless you're the implementation” energy πŸ’…

πŸ“ Protected Attributes πŸ“

_Fwd_list_impl _M_impl

One protected attribute: _M_impl, doing main-character implementation things 🌈


πŸ”₯ Detailed Description πŸ”₯

template<typename _Tp, typename _Alloc>
    struct std::_Fwd_list_base< _Tp, _Alloc >"Base class for forward_list.

That's the template struct and the description the source gives: Base class for forward_list. The stray quote right there is absolutely in the source vibes β€” not me inventing anything, bestie 😭


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code.

So yeah, no human author to tag β€” Doxygen generated this for libstdc++ straight from the source code. Iconic automation behavior πŸ€–βœ¨


Sign-off: this page is from the 3cxx manual, source/version vibes are libstdc++, and the footer line read libststd::_Fwd_list_...< _Tp, _Alloc >(3cxx). No date was listed on the page, so I'm not making one up, bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from