__GNU_PBDS::DETAIL::LU_MAP(3cxx)

πŸ’… __gnu_pbds::detail::lu_map< Key, Mapped, Eq_Fn, _Alloc, Update_Policy > β€” NAME energy ✨

okay so this is straight out of the libstdc++ 3cxx manual pages (yes bestie, the Doxygen-generated ones), and we're talking about:

__gnu_pbds::detail::lu_map< Key, Mapped, Eq_Fn, _Alloc, Update_Policy > β€” a list-based (with updates) associative container. Skip to the lu, my darling. πŸ’…


✨ SYNOPSIS ✨

#include <lu_map_.hpp>

It inherits __gnu_pbds::detail::types_traits< Key, Mapped, _Alloc, false >. like, that's its whole ancestry, no cap 🧬

πŸŽ€ Public Types πŸŽ€

bestie there are SO many typedefs and I am listing every single one, we don't skip πŸ’–

  • _Alloc allocator_type β€” the allocator, obviously
  • std::pair< size_type, size_type > comp_hash β€” a lil pair of sizes, doing hash-adjacent things
  • const_iterator_ const_iterator β€” the const iterator, the one that won't let you touch anything
  • traits_base::const_pointer const_pointer β€” const pointer from traits
  • traits_base::const_reference const_reference β€” const reference from traits
  • _Alloc::difference_type difference_type β€” the difference type, courtesy of _Alloc
  • Eq_Fn eq_fn β€” your equality function
  • iterator_ iterator β€” the regular iterator, the main character
  • traits_base::key_const_pointer key_const_pointer β€” const pointer to a key
  • traits_base::key_const_reference key_const_reference β€” const reference to a key
  • traits_base::key_pointer key_pointer β€” pointer to a key
  • traits_base::key_reference key_reference β€” reference to a key
  • traits_base::key_type key_type β€” the key type itself
  • traits_base::mapped_const_pointer mapped_const_pointer β€” const pointer to a mapped value
  • traits_base::mapped_const_reference mapped_const_reference β€” const reference to a mapped value
  • traits_base::mapped_pointer mapped_pointer β€” pointer to a mapped value
  • traits_base::mapped_reference mapped_reference β€” reference to a mapped value
  • traits_base::mapped_type mapped_type β€” the mapped type itself
  • __nothrowcopy::indicator no_throw_indicator β€” indicator that says "this copy doesn't throw" 🫢
  • point_const_iterator_ point_const_iterator β€” const "point" iterator
  • point_iterator_ point_iterator β€” "point" iterator, very demure
  • traits_base::pointer pointer β€” plain old pointer
  • traits_base::reference reference β€” plain old reference
  • _Alloc::size_type size_type β€” the size type, from _Alloc
  • integral_constant< int, Store_Hash > store_extra β€” integral constant wrapping Store_Hash
  • stored_data< value_type, size_type, Store_Hash > stored_data_type β€” the stored-data type, built from value_type, size_type and Store_Hash
  • Update_Policy::metadata_type update_metadata β€” the update policy's metadata type
  • Update_Policy update_policy β€” the update policy itself, iconic
  • traits_base::value_type value_type β€” the value type, the moment

πŸ”₯ Public Member Functions πŸ”₯

  • lu_map (const lu_map< Key, Mapped, Eq_Fn, _Alloc, Update_Policy > &) β€” copy constructor, it copies the whole thing
  • template<typename It > lu_map (It, It) β€” construct from a range of iterators, from It to It
  • iterator begin () β€” start of the non-const iterators
  • const_iterator begin () const β€” start of the const iterators
  • void clear () β€” wipes it, empty, gone, πŸ’€
  • bool empty () const β€” is it empty? tells you
  • iterator end () β€” end of the non-const iterators
  • const_iterator end () const β€” end of the const iterators
  • bool erase (key_const_reference) β€” erase by key, returns a bool
  • template<typename Pred > size_type erase_if (Pred) β€” erase everything matching Pred, returns how many you nuked
  • point_iterator find (key_const_reference r_key) β€” find by r_key, gives you a point_iterator
  • point_const_iterator find (key_const_reference r_key) const β€” const find by r_key, gives you a point_const_iterator
  • std::pair< point_iterator, bool > insert (const_reference) β€” insert a const_reference, get back a pair of iterator + bool
  • size_type max_size () const β€” the biggest it can be
  • mapped_reference operator[] (key_const_reference r_key) β€” bracket access with r_key, the classic 🌸
  • size_type size () const β€” how many you got
  • void swap (lu_map< Key, Mapped, Eq_Fn, _Alloc, Update_Policy > &) β€” swap with another lu_map of the exact same shape

πŸ¦‹ Public Attributes πŸ¦‹

  • no_throw_indicator m_no_throw_copies_indicator β€” the public indicator member for no-throw copies
  • store_extra m_store_extra_indicator β€” the public store_extra member

🌈 Protected Member Functions 🌈

  • template<typename It > void copy_from_range (It, It) β€” protected, copies in from an iterator range, It to It 🧚

⭐ Friends ⭐

  • class const_iterator_ β€” friend 🫢
  • class iterator_ β€” friend 🫢

πŸ‘‘ Detailed Description πŸ‘‘

template<typename Key, typename Mapped, typename Eq_Fn, typename _Alloc,
    typename Update_Policy>
    class __gnu_pbds::detail::lu_map< Key, Mapped, Eq_Fn, _Alloc,
    Update_Policy >

"list-based (with updates) associative container. Skip to the lu, my darling." β€” that's the whole vibe, literally the description. it's giving mysterious but charming ✨


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for libstdc++ from the source code. not a human, not me, a robot did this πŸ€–


ok that's the whole thing bestie, no details skipped, we ate and left no crumbs πŸ“

this has been the libstdc++ 3cxx manual page for __gnu_pbds::detail::lu_map< Key, Mapped, Eq_Fn, _Alloc, Update_Policy > β€” mwah, go build something iconic πŸ’…βœ¨