__GNU_PBDS::BASIC_BRANCH(3)
π 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 copiesother.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, peepcontainer_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_mapdetail::rb_tree_mapdetail::splay_tree_mapdetail::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