__GNU_PBDS::DETAIL::BIN_SEARCH_TREE_CONST_IT_(3)
π NAME π
__gnu_pbds::detail::bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > β Const iterator. π¦
okay bestie so this little icon lives in the Library Functions Manual section of the libstdc++ docs, and it is literally the const iterator of a binary search tree. eight template parameters. she's a lot but she's worth it π
β¨ SYNOPSIS β¨
#include <point_iterators.hpp>
π«Ά Inherited by
Like, three whole classes are out here claiming her as their mother:
__gnu_pbds::detail::bin_search_tree_it_< typename node_alloc_traits::pointer, typename type_traits::value_type, typename type_traits::pointer, typename type_traits::const_pointer, typename type_traits::reference, typename type_traits::const_reference, true, _Alloc >__gnu_pbds::detail::bin_search_tree_it_< typename node_alloc_traits::pointer, typename type_traits::value_type, typename type_traits::pointer, typename type_traits::const_pointer, typename type_traits::reference, typename type_traits::const_reference, false, _Alloc >__gnu_pbds::detail::bin_search_tree_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc >
π Public Types
the glow-up glossary, no cap:
typedef Const_Pointer const_pointerβ the pointer-but-make-it-const type β¨typedef Const_Reference const_referenceβ the reference-but-make-it-const type β¨typedef _Alloc::difference_type difference_typeβ how far apart two of these are, type-wise πtypedef std::bidirectional_iterator_tag iterator_categoryβ hi yes she's a bidirectional iterator, so she walks both ways πΆβοΈπΆβοΈtypedef Pointer pointerβ the pointer typetypedef Reference referenceβ the reference typetypedef Value_Type value_typeβ the actual value type, the moment π
π Public Member Functions
every single one, because we do NOT skip:
bin_search_tree_const_it_ (const bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, !Is_Forward_Iterator, _Alloc > &other)β constructor that takes the opposite-flavor iterator, note the!Is_Forward_Iterator, it's giving flip πbin_search_tree_const_it_ (const Node_Pointer p_nd=0)β constructor from a node pointer, and yes the default is0bool operator!= (const bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, !Is_Forward_Iterator, _Alloc > &other) constβ "not equal" against the opposite-flavor iteratorbool operator!= (const bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > &other) constβ "not equal" against the same-flavor iteratorconst_reference operator* () constβ dereference, but const, respect her boundaries π«Άbin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > & operator++ ()β pre-increment, returns a reference to herself (main character energy) πbin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > operator++ (int)β post-increment, returns a copy, the classicbin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > & operator-- ()β pre-decrement, also returns herselfbin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > operator-- (int)β post-decrement, returns a copyconst_pointer operator-> () constβ the arrow, const edition πΉbin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > & operator= (const bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, !Is_Forward_Iterator, _Alloc > &other)β assign from the opposite-flavor iteratorbin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > & operator= (const bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > &other)β assign from the same-flavor iteratorbool operator== (const bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, !Is_Forward_Iterator, _Alloc > &other) constβ equality against the opposite-flavor iteratorbool operator== (const bin_search_tree_const_it_< Node_Pointer, Value_Type, Pointer, Const_Pointer, Reference, Const_Reference, Is_Forward_Iterator, _Alloc > &other) constβ equality against the same-flavor iterator
πΈ Public Attributes
Node_Pointer m_p_ndβ the node pointer, just sitting there, public, unbothered, moisturized πΏ
π§ Protected Member Functions
protected = family only, bestie:
void dec (false_type)β decrement,false_typeflavorvoid dec (true_type)β decrement,true_typeflavorvoid inc (false_type)β increment,false_typeflavorvoid inc (true_type)β increment,true_typeflavor
π₯ Detailed Description π₯
the full declaration, verbatim, because we respect the source:
template<typename Node_Pointer, typename Value_Type, typename Pointer,
typename Const_Pointer, typename Reference, typename Const_Reference,
bool Is_Forward_Iterator, typename _Alloc>
class __gnu_pbds::detail::bin_search_tree_const_it_< Node_Pointer,
Value_Type, Pointer, Const_Pointer, Reference, Const_Reference,
Is_Forward_Iterator, _Alloc >"Const iterator.
not me spotting that stray"right beforeConst iterator.in the original π it's literally in the docs, so it stays in my version too, no cap
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
and that's the whole page, bestie β every type, every operator, every !Is_Forward_Iterator, every protected inc/dec, all of it, nothing skipped π this one shipped as part of libstdc++ under the __gnu_pbds..., _Alloc >(3) header in the Library Functions Manual, and yes she was auto-generated by Doxygen straight from the source, so go thank a build script π«Άπ
π¦ 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