__GNU_PBDS::BASIC_BRANCH(3)

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

πŸ’– NAME πŸ’–

__gnu_pbds::basic_branch< Key, Mapped, Tag, Node_Update, Policy_Tl, _Alloc > β€” bestie, this is the branched, tree-ish container abstraction from the GNU PBDS corner of libstdc++. It lives in the Library Functions Manual, and yes she's iconic. πŸ‘‘


✨ SYNOPSIS ✨

Okay so first things first, you gotta pull her in:

#include <assoc_container.hpp>

She inherits from:

__gnu_pbds::detail::type< Key, Mapped, _Alloc, Tag, Policy_Tl >

And she's inherited by:

  • __gnu_pbds::tree< Key, Mapped, Cmp_Fn, Tag, Node_Update, _Alloc >
  • __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >

So basically the whole family tree is giving main character energy. 🌳


🌸 Public Types 🌸

  • typedef Node_Update node_update β€” that's the one public type she's serving, no notes. πŸ’…

πŸŽ€ Protected Member Functions πŸŽ€

These are the constructors, and they are protected, so lowkey you can't just call them from the outside β€” that's for the derived besties to handle. πŸ™ˆ

  • basic_branch (const basic_branch &other) β€” the copy constructor, literally just copies other.
  • template<typename T0> basic_branch (T0 t0) β€” one arg, one vibe.
  • template<typename T0, typename T1> basic_branch (T0 t0, T1 t1) β€” two args, still chill.
  • template<typename T0, typename T1, typename T2> basic_branch (T0 t0, T1 t1, T2 t2) β€” three args, we're building.
  • template<typename T0, typename T1, typename T2, typename T3> basic_branch (T0 t0, T1 t1, T2 t2, T3 t3) β€” four args, obsessed.
  • template<typename T0, typename T1, typename T2, typename T3, typename T4> basic_branch (T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) β€” five args, she ate.
  • template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5> basic_branch (T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) β€” six args, no cap.
  • template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> basic_branch (T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) β€” seven args, periodt.

πŸ¦‹ Detailed Description πŸ¦‹

So the actual declaration is this whole situation:

template<typename Key, typename Mapped, typename Tag, typename Node_Update, typename Policy_Tl, typename _Alloc>
class __gnu_pbds::basic_branch< Key, Mapped, Tag, Node_Update, Policy_Tl, _Alloc >

And the official tagline is: "A branched, tree-like (tree, trie) container abstraction." It's giving both tree and trie, iykyk. 🌈

⭐ Template Parameters ⭐

  • Key β€” the Key type, bestie.
  • Mapped β€” the Map type.
  • Tag β€” the instantiating data structure type, peep container_tag.
  • Node_Update β€” updates nodes, restores invariants. She keeps things cute and consistent. ✨
  • Policy_TL β€” the policy typelist.
  • _Alloc β€” the allocator type.

Base is dispatched at compile time via Tag, picked from these choices: tree_tag, trie_tag, and their descendants. πŸ‘‘

And the base choices themselves are:

  • detail::ov_tree_map
  • detail::rb_tree_map
  • detail::splay_tree_map
  • detail::pat_trie_map

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. Not me hand-writing it, the robot did it. πŸ’€


Okay that's the whole page, bestie β€” shoutout to the <strong>Library Functions Manual</strong> and to <strong>libstdc++</strong> for bringing us this absolute queen of a container abstraction. Go read the source, slay, and remember: Tag decides your destiny at compile time. πŸ«ΆπŸ’–

πŸ“¦ 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