__GNU_PBDS::DETAIL::PAT_TRIE_BASE__CITER(3cxx)

πŸ’… __gnu_pbds::detail::pat_trie_base::_CIter< Node, Leaf, Head, Inode, Is_Forward_Iterator > β€” the const iterator, bestie

okay so this page is from the __gnu_pbds corner of libstdc++ (that's the GNU C++ standard library, iykyk), and today's main character is __gnu_pbds::detail::pat_trie_base::_CIter< Node, Leaf, Head, Inode, Is_Forward_Iterator >. She's a const iterator, periodt. The man page itself is filed under the (3cxx) manual, and the header at the top of the original literally just repeats her very long name twice β€” we're folding that in right here instead of copying it, you're welcome πŸŽ€


✨ NAME ✨

__gnu_pbds::detail::pat_trie_base::_CIter< Node, Leaf, Head, Inode, Is_Forward_Iterator > β€” Const iterator.

That's it. That's the whole name. She's a const iterator, she's templated on Node, Leaf, Head, Inode, and a bool Is_Forward_Iterator, and she's lowkey iconic for it πŸ¦‹


🌸 SYNOPSIS 🌸

#include <pat_trie_base.hpp>

Inherited by __gnu_pbds::detail::pat_trie_base::_Iter< Node, Leaf, Head, Inode, Is_Forward_Iterator >.

(So the non-const _Iter is her daughter. Family business. πŸ‘‘)

πŸ’œ Public Types

  • typedef allocator_type _Alloc β€” the allocator, wearing a little _Alloc nickname ✨
  • typedef Node::allocator_type allocator_type β€” the allocator type, borrowed straight from Node
  • typedef type_traits::const_pointer const_pointer β€” a pointer that doesn't want you touching the thing it points at
  • typedef type_traits::const_reference const_reference β€” same vibe but a reference
  • typedef allocator_type::difference_type difference_type β€” the type you get when you subtract two of these, from the allocator
  • typedef rebind_traits< _Alloc, Head >::pointer head_pointer β€” a pointer to a Head, rebind-style 🫢
  • typedef Inode::iterator inode_iterator β€” the iterator type that lives inside Inode
  • typedef rebind_traits< _Alloc, Inode >::pointer inode_pointer β€” pointer to an Inode
  • typedef std::bidirectional_iterator_tag iterator_category β€” she goes both ways, literally, so std::bidirectional_iterator_tag is her whole identity
  • typedef rebind_traits< _Alloc, Leaf >::const_pointer leaf_const_pointer β€” const pointer to a Leaf πŸ“
  • typedef rebind_traits< _Alloc, Leaf >::pointer leaf_pointer β€” non-const pointer to a Leaf
  • typedef rebind_traits< _Alloc, Node >::pointer node_pointer β€” pointer to a Node, the main character of pointers here
  • typedef type_traits::pointer pointer β€” the plain pointer type
  • typedef type_traits::reference reference β€” the plain reference type
  • typedef Node::type_traits type_traits β€” all the traits, straight from Node
  • typedef type_traits::value_type value_type β€” the value type, courtesy of type_traits

🧚 Public Member Functions

  • _CIter(const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) β€” converting constructor from the opposite direction iterator; note the !Is_Forward_Iterator, she's flipping the bool, no cap
  • _CIter(node_pointer p_nd = 0) β€” constructor that takes a node_pointer p_nd, defaulting to 0
  • bool operator!=(const _CIter &other) const β€” the "are these two not the same" check, same-type version
  • bool operator!=(const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) const β€” the not-equal check against the flipped-direction iterator
  • const_reference operator*() const β€” dereference, and you get a const_reference because she is const and she respects boundaries πŸ’…
  • _CIter & operator++() β€” prefix increment, moves forward, returns herself
  • _CIter operator++(int) β€” postfix increment, returns a copy of the old her
  • _CIter & operator--() β€” prefix decrement, back it up
  • _CIter operator--(int) β€” postfix decrement, returns the old copy
  • const_pointer operator->() const β€” arrow operator, hands you a const_pointer
  • _CIter & operator=(const _CIter &other) β€” assignment from another same-type _CIter
  • _CIter & operator=(const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) β€” assignment from the flipped-direction iterator
  • bool operator==(const _CIter &other) const β€” equality, same-type version
  • bool operator==(const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) const β€” equality against the flipped-direction iterator

πŸ“ Public Attributes

  • node_pointer m_p_nd β€” the node she's currently perched on. That's the whole public attribute. She's minimal, she's chic ✨

🌈 Protected Member Functions

  • void dec(false_type) β€” decrement, false_type flavour
  • void dec(true_type) β€” decrement, true_type flavour
  • void inc(false_type) β€” increment, false_type flavour
  • void inc(true_type) β€” increment, true_type flavour

(two flavours of each because tag dispatch is a whole lifestyle, fr fr 🧚)

⭐ Static Protected Member Functions

  • static node_pointer get_larger_sibling(node_pointer p_nd) β€” grabs the larger sibling of p_nd
  • static node_pointer get_smaller_sibling(node_pointer p_nd) β€” grabs the smaller sibling of p_nd
  • static leaf_pointer leftmost_descendant(node_pointer p_nd) β€” dives all the way down to the leftmost descendant and hands you a leaf_pointer
  • static leaf_pointer rightmost_descendant(node_pointer p_nd) β€” same but rightmost, also a leaf_pointer

🫢 Detailed Description 🫢

template<typename Node, typename Leaf, typename Head, typename Inode, bool Is_Forward_Iterator>
class __gnu_pbds::detail::pat_trie_base::_CIter< Node, Leaf, Head, Inode, Is_Forward_Iterator >

Const iterator.

(yes, the original page has a stray closing quote sitting after "Const iterator. in this spot β€” a little Doxygen typo moment, we love her anyway 😭 β€” and the description is literally just those two words: Const iterator. No elaboration. She said "I'm a const iterator" and logged off.)


πŸ‘‘ Author πŸ‘‘

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

So nobody hand-wrote this one, bestie β€” the robot did it. πŸ€–


Heads up: everything above is straight from the page. No extra tips, no invented behaviour, no guessing at what any of these actually do at runtime. If you need the why, go read pat_trie_base.hpp β€” I'm just the messenger πŸ’–

and that's the whole page!! This beauty is part of libstdc++, the doc was spat out by Doxygen for the __gnu_pbds docs, and the footer on the original is just the same giant iterator name + (3cxx) again on both sides β€” consider it signed, sealed, and slayed. mwah πŸ’‹βœ¨πŸŽ€