__GNU_PBDS::TRIE(3)

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

πŸ’– __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc > πŸ’–

okay so bestie, welcome to the Library Functions Manual for libstdc++ β€” this one's a whole vibe, it's the trie container from __gnu_pbds, and yes she's fancy πŸ’…


✨ NAME ✨

__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc > β€” the trie-based container, no cap πŸŽ€


🌸 SYNOPSIS 🌸

#include <assoc_container.hpp>

Inherits __gnu_pbds::basic_branch< Key, Mapped, Tag, Node_Update, Policy_Tl, _Alloc > β€” so she's got that basic_branch bloodline, iconic πŸ‘‘

🌈 Public Types

  • access_traits β€” a typedef for _ATraits, aka the element access traits type ✨
  • node_update β€” a typedef for Node_Update

πŸ¦‹ Public Member Functions

  • trie(const access_traits &t) β€” constructor that takes some policy objects. r_access_traits will be copied by the _ATraits object of the container object. 🫢
  • trie(const trie &other) β€” the copy constructor, she's copying the whole girl πŸ’œ
  • template<typename It> trie(It first, It last) β€” constructor taking __iterators to a range of value_types. The value_types between first_it and last_it will be inserted into the container object.
  • template<typename It> trie(It first, It last, const access_traits &t) β€” constructor taking __iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object. ✨
  • trie & operator=(const trie &other) β€” assignment, she's swapping her whole personality πŸŽ€
  • void swap(trie &other) β€” swaps with other, trading places like it's nothing πŸ’…

πŸ‘‘ Detailed Description πŸ‘‘

template<typename Key, typename Mapped, typename _ATraits = typename
    detail::default_trie_access_traits<Key>::type, typename Tag =
    pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename
    _ATraits_, typename _Alloc_ > class Node_Update = null_node_update,
    typename _Alloc = std::allocator<char>>
class __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >

"A trie-based container." β€” that's the whole pitch, periodt 🌟

πŸ“ Template Parameters

  • Key β€” the Key type.
  • Mapped β€” the Map type.
  • _ATraits β€” the Element access traits.
  • Tag β€” the instantiating data structure type, see container_tag.
  • Node_Update β€” updates trie internal-nodes, restores invariants when invalidated. XXX See design::tree-based-containersnode invariants.
  • _Alloc β€” the Allocator type.

Base tag choice is pat_trie_tag.

Base is basic_branch. 🫢


🧚 Member Typedef Documentation 🧚

template<typename Key, typename Mapped, typename _ATraits = typename
    detail::default_trie_access_traits<Key>::type, typename Tag =
    pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename
    _ATraits_, typename _Alloc_ > class Node_Update = null_node_update,
    typename _Alloc = std::allocator<char>>
typedef _ATraits __gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update,
    _Alloc >::access_traits

access_traits is just the element access traits type. That's it, that's the girl πŸ’–


πŸ’œ Constructor & Destructor Documentation πŸ’œ

🌸 trie(const access_traits &t) β€” [inline]

template<typename Key, typename Mapped, typename _ATraits = typename
    detail::default_trie_access_traits<Key>::type, typename Tag =
    pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename
    _ATraits_, typename _Alloc_ > class Node_Update = null_node_update,
    typename _Alloc = std::allocator<char>>
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::trie
    (const access_traits & t)

Constructor taking some policy objects. r_access_traits will be copied by the _ATraits object of the container object. she's taking notes from her policy besties πŸ“

πŸ¦‹ trie(It first, It last) β€” [inline]

template<typename Key, typename Mapped, typename _ATraits = typename
    detail::default_trie_access_traits<Key>::type, typename Tag =
    pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename
    _ATraits_, typename _Alloc_ > class Node_Update = null_node_update,
    typename _Alloc = std::allocator<char>>
template<typename It>
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::trie
    (It first, It last)

Constructor taking __iterators to a range of value_types. The value_types between first_it and last_it will be inserted into the container object. πŸŽ€

✨ trie(It first, It last, const access_traits &t) β€” [inline]

template<typename Key, typename Mapped, typename _ATraits = typename
    detail::default_trie_access_traits<Key>::type, typename Tag =
    pat_trie_tag, template< typename Node_CItr, typename Node_Itr, typename
    _ATraits_, typename _Alloc_ > class Node_Update = null_node_update,
    typename _Alloc = std::allocator<char>>
template<typename It>
__gnu_pbds::trie< Key, Mapped, _ATraits, Tag, Node_Update, _Alloc >::trie
    (It first, It last, const access_traits & t)

Constructor taking __iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object. both at once?? she's multi-tasking, we love to see it πŸ’…


πŸ’– Author πŸ’–

Generated automatically by Doxygen for libstdc++ from the source code. so like, no human wrote this, it's giving robot autopilot πŸ€–βœ¨


fr fr bestie, this page came straight out of the Library Functions Manual for libstdc++ β€” mwah, no notes, obsessed πŸ«ΆπŸ’œπŸŽ€
πŸ“¦ 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