__GNU_PBDS::DETAIL::LEFT_CHILD_NEXT_SIBLING_HEAP(3cxx)
libstdc++ manual, section 3cxx — okay bestie, we are deep in the C++ headers and the vibes are structural. 💖
NAME
__gnu_pbds::detail::left_child_next_sibling_heap< Value_Type, Cmp_Fn, Node_Metadata, _Alloc > — base class for a basic heap. That’s the whole NAME moment, and yes, it’s a whole template situation. 🫶
SYNOPSIS
First things first: you pull in this header, and then the class inherits Cmp_Fn. No cap.
#include <left_child_next_sibling_heap_.hpp>
Inherits Cmp_Fn.
Public Types
The full type cast, no skips, no “oops I forgot one” energy:
typedef _Alloc allocator_typetypedef Cmp_Fn cmp_fntypedef left_child_next_sibling_heap_const_iterator_< node, _Alloc > const_iteratortypedef __rebind_v::const_pointer const_pointertypedef __rebind_v::const_reference const_referencetypedef _Alloc::difference_type difference_typetypedef const_iterator iteratortypedef left_child_next_sibling_heap_node_< Value_Type, Node_Metadata, _Alloc > nodetypedef left_child_next_sibling_heap_node_point_const_iterator_< node, _Alloc > point_const_iteratortypedef point_const_iterator point_iteratortypedef __rebind_v::pointer pointertypedef __rebind_v::reference referencetypedef _Alloc::size_type size_typetypedef Value_Type value_type
Public Member Functions
These are the public-facing main characters ✨ — every single one, exactly as listed:
left_child_next_sibling_heap (const Cmp_Fn &)left_child_next_sibling_heap (const left_child_next_sibling_heap &)iterator begin ()const_iterator begin () constvoid clear ()bool empty () constiterator end ()const_iterator end () constCmp_Fn & get_cmp_fn ()const Cmp_Fn & get_cmp_fn () constsize_type max_size () constsize_type size () constvoid swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, Node_Metadata, _Alloc > &)
Protected Types
Backstage types, still invited to the group chat 💅:
typedef alloc_traits::allocator_type node_allocatortypedef alloc_traits::const_pointer node_const_pointertypedef Node_Metadata node_metadatatypedef alloc_traits::pointer node_pointertypedef std::pair< node_pointer, node_pointer > node_pointer_pair
Protected Member Functions
Protected function lore, in full, because we do not gatekeep here:
void actual_erase_node (node_pointer)void bubble_to_top (node_pointer)void clear_imp (node_pointer)node_pointer get_new_node_for_insert (const_reference)template<typename Pred > node_pointer prune (Pred)void swap_with_parent (node_pointer, node_pointer)void to_linked_list ()void value_swap (left_child_next_sibling_heap &)
Static Protected Member Functions
The static protected duo, serving looks 🌸:
static void make_child_of (node_pointer, node_pointer)static node_pointer parent (node_pointer)
Protected Attributes
The protected attributes shelf, literally just these two:
node_pointer m_p_rootsize_type m_size
Detailed Description
Okay so the whole template declaration is giving very “we live in a header” realness:
template<typename Value_Type, typename Cmp_Fn, typename Node_Metadata,
typename _Alloc>
class __gnu_pbds::detail::left_child_next_sibling_heap< Value_Type,
Cmp_Fn, Node_Metadata, _Alloc >
And the description is literally: Base class for a basic heap. Periodt. 🦋
Author
Author line, word for word: Generated automatically by Doxygen for libstdc++ from the source code.
Bye bestie 💜 — source/version: libstdc++; manual section: 3cxx; footer date: not shown in the copy we got, so this is the cute sign-off instead. Stay heaped, stay iconic. 🎀
📦 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