STD::_LIST_BASE(3)
π std::_List_base< _Tp, _Alloc > π
okay bestie, welcome to the Library Functions Manual, section 3 β this is the page for std::_List_base< _Tp, _Alloc >, and yes it's a real one, and yes it's basically the secret scaffolding behind your fave std::list. π let's get into it β¨
πΈ NAME πΈ
std::_List_base< _Tp, _Alloc > β literally, for the actual explanation, go read bits/stl_deque.h's _Deque_base. that's it. that's the name section. iykyk π
β¨ SYNOPSIS β¨
#include <list>
and the plot twist: it's inherited (as [protected], so lowkey private-ish vibes) by:
std::list< _Tp, polymorphic_allocator< _Tp > >[protected]std::list< __inp, __rebind_inp >[protected]std::list< _Tp, _Alloc >[protected]
π Public Types
typedef _Alloc allocator_typeβ the allocator type, the moment.
π Public Member Functions
_List_base (_List_base &&)=defaultβ the move constructor, defaulted, iconic._List_base (_List_base &&__x, _Node_alloc_type &&__a)β move + an allocator, bestie edition._List_base (_Node_alloc_type &&__a)β just an allocator, no notes._List_base (_Node_alloc_type &&__a, _List_base &&__x)β allocator first, moved-from base second. order matters, don't be chaotic._List_base (const _Node_alloc_type &__a) noexceptβ a const allocator ref, and yes it'snoexcept, we love a promise. π«Άvoid _M_clear () noexceptβ clear it all out,noexcept, no drama.size_t _M_distance (const __detail::_List_node_base *__first, const __detail::_List_node_base *__last) constβ distance between two__detail::_List_node_basepointers, const-correct and proud.const _Node_alloc_type & _M_get_Node_allocator () const noexceptβ hand over the node allocator (const flavor),noexcept._Node_alloc_type & _M_get_Node_allocator () noexceptβ same but non-const, alsonoexcept.void _M_init () noexceptβ set it up,noexcept.void _M_move_nodes (_List_base &&__x)β steal those nodes, respectfully.size_t _M_node_count () constβ how many nodes we got, const.
β Static Public Member Functions
static size_t _S_distance (const __detail::_List_node_base *__first, const __detail::_List_node_base *__last)β the static version of distance. same pointers, nothis, main character energy.
π§ Protected Types
typedef __gnu_cxx::__alloc_traits< _Node_alloc_type > _Node_alloc_traitstypedef _Tp_alloc_traits::template rebind< typename_Node_traits::_Node >::other _Node_alloc_typeusing _Node_ptrtypedef __list::_Node_traits< _Tp, typename _Tp_alloc_traits::pointer > _Node_traitstypedef __gnu_cxx::__alloc_traits< _Tp_alloc_type > _Tp_alloc_traitstypedef __gnu_cxx::__alloc_traits< _Alloc >::template rebind< _Tp >::other _Tp_alloc_type
that's the whole rebind-and-traits web, periodt. πΈοΈβ¨
π Protected Member Functions
void _M_dec_size (size_t __n)β decrement the size by__n.void _M_destroy_node (_Node_ptr __p)β destroy that node,__p._Node_alloc_traits::pointer _M_get_node ()β grab a node, returns a_Node_alloc_traits::pointer.size_t _M_get_size () constβ read the size, const.void _M_inc_size (size_t __n)β increment the size by__n.void _M_put_node (_Node_ptr __p) noexceptβ put that node back,noexcept.void _M_set_size (size_t __n)β hard-set the size to__n.
π¦ Protected Attributes
_List_impl _M_implβ the one and only impl member. she's protected, she's holding everything together. π
π Detailed Description π
template<typename _Tp, typename _Alloc>
class std::_List_base< _Tp, _Alloc >"See bits/stl_deque.h's _Deque_base for an explanation.
okay so β and i need you to stay calm β that stray " right before See is genuinely in there. not me fixing it. it's giving "the source generator had one job" π we simply report the facts, fr fr. and the fact is: go read bits/stl_deque.h's _Deque_base for an explanation. that's the whole detailed description. she said read the other file. iconic, honestly.
β οΈ heads up bestie: this page does not explain the class itself β it explicitly points you atbits/stl_deque.h's_Deque_basefor that. don't come for me, i'm just the messenger. π«Ά
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. so no human to thank, just vibes and a generator. π
and that's the whole page, babe! this lil writeup came straight out of the libstdc++ docs β footer says libstdc++, std::_List..., _Alloc >(3), manual section 3, Library Functions Manual. no cap, that's all she wrote. go read _Deque_base and slay. πβ¨ππ¦
π¦ 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.0.1-0.10.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
- 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