STD::_LIST_CONST_ITERATOR(3cxx)

πŸ¦‹ std::_List_const_iterator< _Tp > (3cxx) β€” the const_iterator for list, bestie ✨

okay so real talk, this is the std::_List_const_iterator< _Tp > manpage from the libstdc++ docs β€” it lives in the 3cxx manual section, and we're about to get so educated πŸ’…


🌸 NAME 🌸

std::_List_const_iterator< _Tp > β€” literally a list::const_iterator. that's it, that's the vibe πŸŽ€


✨ SYNOPSIS ✨

#include <list>

🌈 Public Types 🌈

  • _Node β€” typedef const _List_node< _Tp > β€” the node type, but make it const πŸ‘‘
  • _Self β€” typedef _List_const_iterator< _Tp > β€” bestie referring to herself, main character energy fr
  • difference_type β€” typedef ptrdiff_t β€” the type you get when you subtract iterators
  • iterator β€” typedef _List_iterator< _Tp > β€” the non-const sibling 🫢
  • iterator_category β€” typedef std::bidirectional_iterator_tag β€” she walks both ways, no cap πŸšΆβ€β™€οΈ
  • pointer β€” typedef const _Tp * β€” pointer to const _Tp
  • reference β€” typedef const _Tp & β€” reference to const _Tp
  • value_type β€” typedef _Tp β€” the actual element type, iconic

πŸ’– Public Member Functions πŸ’–

  • _List_const_iterator (const __detail::_List_node_base *__x) noexcept β€” build one from a node base pointer
  • _List_const_iterator (const iterator &__x) noexcept β€” build one from a regular iterator, glow-up conversion ✨
  • iterator _M_const_cast () const noexcept β€” const-casts back to a plain iterator
  • reference operator* () const noexcept β€” dereference, aka get the actual element
  • _Self & operator++ () noexcept β€” pre-increment, move forward one πŸ¦‹
  • _Self operator++ (int) noexcept β€” post-increment, moves forward but hands you the old one
  • _Self & operator-- () noexcept β€” pre-decrement, back it up
  • _Self operator-- (int) noexcept β€” post-decrement, backwards but returns the pre-move copy
  • pointer operator-> () const noexcept β€” member access through the iterator, lowkey essential

πŸ“ Public Attributes πŸ“

  • const __detail::_List_node_base * _M_node β€” the raw node pointer she's holding onto, the whole personality tbh

🧚 Friends 🧚

  • bool operator== (const _Self &__x, const _Self &__y) noexcept β€” the equality check, because comparing iterators is a love language πŸ’œ

πŸ”₯ Detailed Description πŸ”₯

template<typename _Tp>
    struct std::_List_const_iterator< _Tp >
"A list::const_iterator." β€” direct quote, she said it herself πŸ’…

and the tea: all the functions are op overloads β€” like, every single one. operator this, operator that. operator overloads ate and left no crumbs πŸ‘‘


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ straight from the source code. no human wrote this, she spawned fully formed 😭


okay that's the whole page bestie, go forth and iterate πŸ’–

sign-off szn: this lil beauty comes from libstdc++ (libstdc++ is the source/version tag on the footer, fr fr), and the footer line reads libstdstd::_List_const_iterator< _Tp >(3cxx) β€” yes the man page footer is a little cursed, we don't talk about it πŸ™ˆ πŸŽ€
πŸ“¦ where this page comes from