__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 justtypedef 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
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms