__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_Allocnickname β¨typedef Node::allocator_type allocator_typeβ the allocator type, borrowed straight fromNodetypedef type_traits::const_pointer const_pointerβ a pointer that doesn't want you touching the thing it points attypedef type_traits::const_reference const_referenceβ same vibe but a referencetypedef allocator_type::difference_type difference_typeβ the type you get when you subtract two of these, from the allocatortypedef rebind_traits< _Alloc, Head >::pointer head_pointerβ a pointer to aHead, rebind-style π«Άtypedef Inode::iterator inode_iteratorβ the iterator type that lives insideInodetypedef rebind_traits< _Alloc, Inode >::pointer inode_pointerβ pointer to anInodetypedef std::bidirectional_iterator_tag iterator_categoryβ she goes both ways, literally, sostd::bidirectional_iterator_tagis her whole identitytypedef rebind_traits< _Alloc, Leaf >::const_pointer leaf_const_pointerβ const pointer to aLeafπtypedef rebind_traits< _Alloc, Leaf >::pointer leaf_pointerβ non-const pointer to aLeaftypedef rebind_traits< _Alloc, Node >::pointer node_pointerβ pointer to aNode, the main character of pointers heretypedef type_traits::pointer pointerβ the plain pointer typetypedef type_traits::reference referenceβ the plain reference typetypedef Node::type_traits type_traitsβ all the traits, straight fromNodetypedef type_traits::value_type value_typeβ the value type, courtesy oftype_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 anode_pointer p_nd, defaulting to0bool operator!=(const _CIter &other) constβ the "are these two not the same" check, same-type versionbool operator!=(const _CIter< Node, Leaf, Head, Inode, !Is_Forward_Iterator > &other) constβ the not-equal check against the flipped-direction iteratorconst_reference operator*() constβ dereference, and you get aconst_referencebecause 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 copyconst_pointer operator->() constβ arrow operator, hands you aconst_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 iteratorbool operator==(const _CIter &other) constβ equality, same-type versionbool 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_typeflavourvoid dec(true_type)β decrement,true_typeflavourvoid inc(false_type)β increment,false_typeflavourvoid inc(true_type)β increment,true_typeflavour
(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 ofp_ndstatic node_pointer get_smaller_sibling(node_pointer p_nd)β grabs the smaller sibling ofp_ndstatic leaf_pointer leftmost_descendant(node_pointer p_nd)β dives all the way down to the leftmost descendant and hands you aleaf_pointerstatic leaf_pointer rightmost_descendant(node_pointer p_nd)β same but rightmost, also aleaf_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 πβ¨π
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2.1
- ubuntu noble: libstdc++-11-doc 11.4.0-9ubuntu1
- ubuntu noble: libstdc++-11-doc 11.5.0-1ubuntu1~24.04.1
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1.1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- ubuntu questing: libstdc++-15-doc 15.2.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms