__GNU_PBDS::DETAIL::BIN_SEARCH_TREE_TRAITS(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 6 versions
, in arch rolling, fedora 44

πŸ’– 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 for Node. 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