__GNU_PBDS::DETAIL::COND_DEALTOR(3cxx)

πŸ’… __gnu_pbds::detail::cond_dealtor< Entry, _Alloc > πŸ’…

okay so bestie, welcome to the cxx manual page for this little libstdc++ icon β€” pull up a chair, we're getting into it. This page is your group chat receipts for __gnu_pbds::detail::cond_dealtor< Entry, _Alloc >, which honestly is a whole mouthful but we love her anyway. πŸŽ€


✨ NAME ✨

__gnu_pbds::detail::cond_dealtor< Entry, _Alloc > β€” conditional deallocate constructor argument. that's the vibe. she deallocates, but conditionally, y'know? main character energy fr. πŸ’…


✨ SYNOPSIS ✨

the way you get to her is literally just this:

#include <cond_key_dtor_entry_dealtor.hpp>

no cap, that's the whole include. slay. 🌸

🌈 Public Types

  • typedef HT_Map::entry entry β€” the entry type, straight from HT_Map. iconic.
  • typedef HT_Map::entry_allocator entry_allocator β€” the allocator for entries, courtesy of HT_Map.
  • typedef alloc_traits::allocator_type entry_allocator β€” and yes bestie, entry_allocator shows up a second time, this time as alloc_traits::allocator_type. the page lists both fr fr, we don't question it, we just vibe. πŸ’€
  • typedef alloc_traits::pointer entry_pointer β€” a pointer for entries, courtesy of alloc_traits.
  • typedef HT_Map::key_type key_type β€” the key type from HT_Map. the key to my heart honestly. 🫢

πŸ¦‹ Public Member Functions

  • cond_dealtor (entry_allocator *p_a, entry *p_e) β€” constructor that takes a pointer to the entry allocator (p_a) plus a pointer to the entry (p_e). two-arg queen.
  • cond_dealtor (entry_pointer p_e) β€” constructor that takes just an entry_pointer (p_e). minimalist era. ✨
  • void set_key_destruct () β€” flips on the key-destruct setting. do it, bestie.
  • void set_no_action () β€” sets it to no action. sometimes the move is literally doing nothing, and that's valid. πŸ’œ
  • void set_no_action_destructor () β€” sets the no-action destructor. different from the above, don't @ me.

🧚 Protected Attributes

  • bool m_key_destruct β€” a bool keeping track of the key-destruct situation.
  • entry_allocator *const m_p_a β€” a const pointer to the entry_allocator. she's const, she's committed.
  • entry *const m_p_e β€” a const pointer to the entry. also committed. no take-backs. πŸ”₯

πŸ‘‘ Detailed Description πŸ‘‘

template<typename Entry, typename _Alloc>
    class __gnu_pbds::detail::cond_dealtor< Entry, _Alloc >

she's a template, obviously β€” Entry and _Alloc, both in the building. πŸ’–

the official lore: "Conditional deallocate constructor argument."

and the extra little note from the source: "Conditional dey destructor, cc_hash."

ok so "dey" is literally how it's written on the page β€” I'm not fixing it, it's giving me everything and I refuse to correct a legend. 😭

🌟 Author 🌟

generated automatically by Doxygen for libstdc++ from the source code. so nobody wrote this, the robot did. still ate tho. πŸ€–βœ¨


that's the whole page, bestie β€” go forth and conditionally deallocate. πŸŽ€

sign-off tea: this page comes from the libstdc++ docs and the cxx manual (that's the (3cxx) in the header, iykyk), and the one and only source of all this text is Doxygen, which generated it straight from the source code. bye bestie, drink water, free your pointers responsibly πŸ’œπŸ¦‹πŸŒΈ