__GNU_PBDS::LIST_UPDATE(3)

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

πŸ’– NAME πŸ’–

__gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >

okay so this is the iconic list-update associative container from the GNU pb_ds library (that's the libstdc++ manual btw, the Library Functions Manual one) πŸ’…


✨ SYNOPSIS ✨

bestie, you gotta pull in the header first, no cap:

#include <assoc_container.hpp>

πŸŽ€ Public Types πŸŽ€

  • typedef list_update_tag container_category β€” this is the lil tag that says "hey, I'm a list_update container" 🏷️
  • typedef Eq_Fn eq_fn β€” the equality functor type, living its best life under this name
  • typedef Update_Policy update_policy β€” and here's the update policy type, same energy

πŸ¦‹ Public Member Functions πŸ¦‹

  • list_update (const list_update &other) β€” copy constructor, it copies, that's the vibe πŸ’«
  • template<typename It> list_update (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. like, it just slurps up that whole range into the container, periodt πŸ₯„
  • list_update & operator= (const list_update &other) β€” assignment operator, gives you a list_update & back
  • void swap (list_update &other) β€” swaps stuff with other, returns void, no drama, just vibes πŸ”„

πŸ’… Detailed Description πŸ’…

here's the whole thing, template and all, don't skip a single character:

template<typename Key, typename Mapped, class Eq_Fn = typename
    detail::default_eq_fn<Key>::type, class Update_Policy =
    detail::default_update_policy::type, class _Alloc =
    std::allocator<char>>
class __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >

and the description is literally: "A list-update based associative container." πŸ’–

🌸 Template Parameters 🌸

  • Key β€” Key type. (yes bestie, that's the key πŸ—οΈ)
  • Mapped β€” Map type. (the mapped one, she's mapped πŸ’…)
  • Eq_Fn β€” Equal functor. (she checks if two things are the same, respectfully)
  • Update_Policy β€” Update policy, determines when an element will be moved to the front of the list. (so basically she decides when someone gets promoted to the front of the line, main character energy πŸ‘‘)
  • _Alloc β€” Allocator type. (the allocator, she allocates 🧚)

Base is detail::lu_map. β€” yep, that's the parent, that's where she gets it from 🫢


πŸ”₯ Constructor & Destructor Documentation πŸ”₯

⭐ the iterator-range constructor, she's inline ⭐

okay so here's the full signature, written out exactly, every template param, every default, no shortcuts:

template<typename Key, typename Mapped, class Eq_Fn = typename
    detail::default_eq_fn<Key>::type, class Update_Policy =
    detail::default_update_policy::type, class _Alloc =
    std::allocator<char>> template<typename It> __gnu_pbds::list_update<
    Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::list_update (It first, It
    last) [inline]

and what does she do?? πŸ₯Ί

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.

literally that's it, you hand her first and last and she fills herself up with everything in between, ate and left no crumbs πŸ“


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code.


and that's the whole page bestie!! πŸŽ€βœ¨ no cap, every single detail is in here β€” the tags, the typedefs, the constructors, the operator, the swap, the template params, the detail::lu_map base, the [inline], the #include, all of it. iykyk πŸ’œ

mwah πŸ’‹ β€” this lil manual page comes to you from the libstdc++ manual (the Library Functions Manual, section 3, __gnu_pbds..., _Alloc > style), generated by Doxygen from the libstdc++ source code. go forth and list-update, you gorgeous genius πŸ¦‹

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