__GNU_PBDS::DETAIL::BIN_SEARCH_TREE_TRAITS(3cxx)

🌸 NAME 🌸

__gnu_pbds::detail::bin_search_tree_traits< Key, Mapped, Cmp_Fn, Node_Update, Node, _Alloc > β€” bestie, it's the binary search tree traits, primary template. And yes, this is the 3cxx manual, so you know it's coming straight out of libstdc++ land πŸ’…


✨ SYNOPSIS ✨

#include <traits.hpp>

πŸ‘‘ Public Types

Okay so this struct is basically a little wardrobe of typedefs and every single one is doing its job, no skips πŸ’–

  • const_reverse_iterator
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 typedef Node node. Short, sweet, iconic ✨
typedef Node node
  • node_const_iterator
typedef bin_search_tree_const_node_it_< Node, point_const_iterator,
    point_iterator, _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. (inception vibes fr fr πŸŒ€)
  • node_iterator
typedef bin_search_tree_node_it_< Node, point_const_iterator,
    point_iterator, _Alloc > node_iterator
  • node_update
typedef Node_Update< node_const_iterator, node_iterator, Cmp_Fn, _Alloc
    > node_update
  • null_node_update_pointer
typedef __gnu_pbds::null_node_update< node_const_iterator,
    node_iterator, Cmp_Fn, _Alloc > * null_node_update_pointer
  • point_const_iterator
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
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
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

So the whole thing is a template, and here's the exact shape of it, no cap 🫢

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 tagline, and honestly? It ate. πŸŽ€

πŸ¦‹ Member Typedef Documentation

πŸ’œ node_const_iterator

Grab the full template signature first, because it's a whole paragraph of parameters:

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 >

Then, for __gnu_pbds::detail::bin_search_tree_traits< Key, Mapped, Cmp_Fn, Node_Update, Node, _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. Lowkey the most main-character typedef in here πŸ‘‘

πŸ’€ Author

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, just a robot doing its little robot thing πŸ€–βœ¨


And that's the page, bestie β€” sign-off time: this beauty came from libstdc++'s auto-generated docs, living in the 3cxx manual, courtesy of Doxygen and the source code. Go forth and typedef responsibly πŸ’…πŸŽ€

πŸ“¦ where this page comes from