__gnu_cxx:..._allocator(3)

πŸ“¦ version 4.4.0, in nixpkgs unstable

okay bestie, welcome to the Library Functions Manual page for __gnu_cxx:..._allocator(3) β€” yes, that title is doing the absolute most, but we're gonna get through it together πŸ’–


✨ NAME ✨

__gnu_cxx::throw_allocator β€” the allocator class with logging and exception control. that's the whole summary, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

quick vibe check: it Inherits __gnu_cxx::throw_allocator_base.

πŸ’… Public Types πŸ’…

these are the public types, and yes you need every single one, periodt:

  • typedef const value_type * const_pointer
  • typedef const value_type & const_reference
  • typedef ptrdiff_t difference_type
  • typedef value_type * pointer
  • typedef value_type & reference
  • typedef size_t size_type
  • typedef T value_type

πŸ› οΈ Public Member Functions πŸ› οΈ

okay so here's the full roster, bestie β€” no skipping the "boring" ones, because they're all iconic in their own way:

  • pointer allocate (size_type __n, std::allocator< void >::const_pointer hint=0)
  • void check_allocated (size_type label)
  • void check_allocated (pointer __p, size_type __n)
  • template<typename... _Args> void construct (pointer __p, _Args &&...__args)
  • void construct (pointer __p, const T &val)
  • void deallocate (pointer __p, size_type __n)
  • void destroy (pointer __p)
  • void init (unsigned long seed)
  • size_type max_size () const throw ()
  • template<typename U > throw_allocator (const throw_allocator< U > &) throw ()
  • throw_allocator (const throw_allocator &) throw ()

🌟 Static Public Member Functions 🌟

static public energy only, fr fr:

  • static bool empty ()
  • static double get_throw_prob ()
  • static void set_label (size_t l)
  • static void set_throw_prob (double throw_prob)

πŸ”’ Static Protected Member Functions πŸ”’

protected but still main character β€” protect these like your fave hoodie:

  • static void check_allocated (void *, size_t)
  • static void erase (void *, size_t)
  • static void insert (void *, size_t)
  • static void throw_conditionally ()

🌸 Detailed Description 🌸

the detailed tea is this: template<typename T> class __gnu_cxx::throw_allocator< T > is the allocator class with logging and exception control. that's the plot. literally.

and the definition lives right here: Definition at line 189 of file throw_allocator.h.


πŸ’Œ Author πŸ’Œ

the author line is literally Generated automatically by Doxygen for libstdc++ from the source code. β€” no human to tag, just Doxygen doing its thing 🫢


mwah πŸ’‹ that's the page! source/version: libstdc++; date: 21 Apr 2009; footer title: __gnu_cxx:..._allocator(3). byeee πŸ¦‹

πŸ“¦ where this page comes from