__GNU_PBDS::DETAIL::BIN_SEARCH_TREE_TRAITS(3)
π NAME π
__gnu_pbds::detail::bin_search_tree_traits< Key, Mapped, Cmp_Fn, Node_Update, Node, _Alloc > β Binary search tree traits, primary template. π
okay so real talk, bestie: this is a page from the Library Functions Manual (that's section 3, the library-call girlies), and it's the primary template of the binary search tree traits. it's giving behind-the-scenes machinery, and we're obsessed. π¦
β¨ SYNOPSIS β¨
#include <traits.hpp>
π Public Types π
const_reverse_iteratorβ the const reverse iterator flavour, lowkey the backwards-and-read-only one:
typedef bin_search_tree_const_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 > const_reverse_iterator
nodeβ literally just an alias forNode. the way it keeps it simple, iconic πnode_const_iteratorβbin_search_tree_const_node_it_< Node, point_const_iterator, point_iterator, _Alloc >
This is an iterator to an iterator: it iterates over nodes, and de-referencing it returns one of the tree's iterators. π yes bestie, iterator-ception, we love her
node_iteratorβbin_search_tree_node_it_< Node, point_const_iterator, point_iterator, _Alloc >node_updateβNode_Update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc >null_node_update_pointerβ__gnu_pbds::null_node_update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc > *point_const_iteratorβ const point iterator energy, fr fr:
typedef bin_search_tree_const_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 > point_const_iterator
point_iteratorβ the non-const point iterator, main character:
typedef 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 > point_iterator
reverse_iteratorβ backwards but make it non-const:
typedef 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 > reverse_iterator
πΈ Detailed Description πΈ
okay so here's the actual shape of her, the whole template vibe check:
template<typename Key, typename Mapped, class Cmp_Fn, template< typename
Node_CItr, class Node_Itr, class _Cmp_Fn, typename _Alloc > class
Node_Update, class Node, typename _Alloc>
struct __gnu_pbds::detail::bin_search_tree_traits< Key, Mapped, Cmp_Fn,
Node_Update, Node, _Alloc >
Binary search tree traits, primary template. β¨ that's the whole serve.
π Member Typedef Documentation π
node_const_iterator
the full tea, template params and all:
template<typename Key, typename Mapped, class Cmp_Fn, template< typename
Node_CItr, class Node_Itr, class _Cmp_Fn, typename _Alloc > class
Node_Update, class Node, typename _Alloc> typedef
bin_search_tree_const_node_it_< Node, point_const_iterator,
point_iterator, _Alloc> __gnu_pbds::detail::bin_search_tree_traits< Key,
Mapped, Cmp_Fn, Node_Update, Node, _Alloc >::node_const_iterator
This is an iterator to an iterator: it iterates over nodes, and de-referencing it returns one of the tree's iterators. π«Ά read it twice bestie, it is an iterator to an iterator, no cap.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. π€β¨ so yes, a robot wrote this and she ate, honestly.
and that's the whole page, bestie π this one came straight out of libstdc++ (section 3 of the manual β no date on this one, that's just how it arrived, we don't make up dates in this house π). go forth and template responsibly. ππ¦π
π¦ 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