__GNU_CXX::THROW_ALLOCATOR_BASE(3cxx)

πŸ’– NAME

okay so bestie, this is the 3cxx manual page for __gnu_cxx::throw_allocator_base< _Tp, _Cond > β€” the allocator class with logging and exception generation control, meant to be used as an allocator_type in templatized code. iconic allocator behavior ✨

✨ SYNOPSIS

#include <throw_allocator.h>

Inherits __gnu_cxx::annotate_base, and _Cond.

πŸŽ€ Public Types

  • typedef const value_type * const_pointer β€” the const pointer type flex πŸ’…
  • typedef const value_type & const_reference β€” the const reference type vibe
  • typedef std::ptrdiff_t difference_type β€” the difference type, slay
  • typedef value_type * pointer β€” the regular pointer type
  • typedef std::true_type propagate_on_container_move_assignment β€” the move-assignment propagation type, and yes it’s std::true_type 🫢
  • typedef value_type & reference β€” the reference type
  • typedef std::size_t size_type β€” the size type, periodt
  • typedef _Tp value_type β€” the value type is literally _Tp πŸ’–

🫢 Public Member Functions

  • const_pointer address (const_reference __x) const noexcept β€” gives you const_pointer for a const_reference __x, and it’s noexcept
  • pointer address (reference __x) const noexcept β€” gives you pointer for a reference __x, also noexcept
  • pointer allocate (size_type __n, const void *__hint=0) β€” allocate with size_type __n; the __hint defaults to 0
  • void check (size_t label) β€” check with size_t label
  • void check (size_type __n) β€” check with size_type __n
  • void check_allocated (pointer __p, size_type __n) β€” check_allocated with pointer __p and size_type __n
  • map_alloc_type::iterator check_allocated (void *p, size_t size) β€” the other check_allocated, returning map_alloc_type::iterator, with void *p and size_t size
  • void check_constructed (size_t label) β€” check_constructed with size_t label
  • map_construct_type::iterator check_constructed (void *p) β€” the other check_constructed, returning map_construct_type::iterator, with void *p
  • template<typename _Up , typename... _Args> void construct (_Up *__p, _Args &&... __args) β€” template construct with _Up, _Args..., _Up *__p, and _Args &&... __args
  • void deallocate (pointer __p, size_type __n) β€” deallocate with pointer __p and size_type __n
  • template<typename _Up > void destroy (_Up *__p) β€” template destroy with _Up and _Up *__p
  • void erase (void *p, size_t size) β€” erase with void *p and size_t size
  • void erase_construct (void *p) β€” erase_construct with void *p
  • void insert (void *p, size_t size) β€” insert with void *p and size_t size
  • void insert_construct (void *p) β€” insert_construct with void *p
  • size_type max_size () const noexcept β€” max_size, const, and noexcept πŸ’…

πŸ‘‘ Static Public Member Functions

  • static void check () β€” static check ()
  • static size_t get_label () β€” static get_label ()
  • static void set_label (size_t l) β€” static set_label (size_t l)

🌸 Detailed Description

The class signature is literally:

template<typename _Tp, typename _Cond> class __gnu_cxx::throw_allocator_base< _Tp, _Cond >

and the description is giving: "Allocator class with logging and exception generation control. Intended to be used as an allocator_type in templatized code."

⚠️ Note: Deallocate not allowed to throw. That is a hard no on throwing from deallocation, bestie 😭

✍️ Author

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


and that’s the whole page, bestie πŸ’–πŸ¦‹. The footer/source/version/date sign-off is libstd__gnu_cxx::thr...e< _Tp, _Cond >(3cxx) β€” periodt ✨