__GNU_PBDS::LIST_UPDATE(3)
π 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 nametypedef 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 ofvalue_types. Thevalue_typesbetweenfirst_itandlast_itwill 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 alist_update &backvoid swap (list_update &other)β swaps stuff withother, returnsvoid, 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