__GNU_CXX::ARRAY_ALLOCATOR(3cxx)

πŸ“¦
version 9.5.0 Β· 3 versions
, in ubuntu noble

πŸ’– NAME πŸ’–

okay bestie, meet __gnu_cxx::array_allocator< _Tp, _Array > β€” an allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated. ✨

(She lives in the libstdc++ 3cxx manual, so that's the vibe we're working with today.)


πŸŽ€ SYNOPSIS πŸŽ€

#include <array_allocator.h>

Inherits __gnu_cxx::array_allocator_base< _Tp >.


🌸 Public Types 🌸

  • typedef _Array array_type β€” the array type she's working with, literally.
  • typedef const _Tp * const_pointer β€” a pointer you're not allowed to poke at, periodt.
  • typedef const _Tp & const_reference β€” a reference that stays unbothered and unchangeable.
  • typedef ptrdiff_t difference_type β€” the type for measuring the gap between two pointers.
  • typedef std::true_type is_always_equal β€” no cap, she's always equal. Always.
  • typedef _Tp * pointer β€” a good old regular pointer. iconic.
  • typedef std::true_type propagate_on_container_move_assignment β€” move-assigning the container does carry this allocator along for the ride, fr fr.
  • typedef _Tp & reference β€” a reference you can mess with.
  • typedef size_t size_type β€” sizes, as nature intended.
  • typedef _Tp value_type β€” the value type, the main character of the whole template.

πŸ¦‹ Public Member Functions πŸ¦‹

  • array_allocator (array_type *__array=0) noexcept β€” build one from a pointer to an array, defaults to nothing.
  • array_allocator (const array_allocator &__o) noexcept β€” copy constructor, chill and non-throwing.
  • template<typename _Tp1 , typename _Array1 > array_allocator (const array_allocator< _Tp1, _Array1 > &) noexcept β€” the converting copy constructor, so one flavour can turn into another. cute.
  • const_pointer address (const_reference __x) const noexcept β€” hand me the address of this const thing.
  • pointer address (reference __x) const noexcept β€” hand me the address of this thing.
  • _GLIBCXX_NODISCARD pointer allocate (size_type __n, const void *=0) β€” gimme __n of them. ⚠️ She's _GLIBCXX_NODISCARD, so bestie, use the return value, don't just leave it hanging.
  • template<typename _Up , typename... _Args> void construct (_Up *__p, _Args &&... __args) β€” build a thing in place with a lil' variadic arg pack.
  • void deallocate (pointer, size_type) β€” give it back.
  • template<typename _Up > void destroy (_Up *__p) β€” tear that thing down.
  • size_type max_size () const noexcept β€” how big can she go? this tells you.

πŸ’… Detailed Description πŸ’…

template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1>>
class __gnu_cxx::array_allocator< _Tp, _Array >

"An allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated."

Definition at line 110 of file array_allocator.h.


🌈 Member Typedef Documentation 🌈

Every one of these beauties, with receipts:

  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef _Array __gnu_cxx::array_allocator< _Tp, _Array >::array_type β€” Definition at line 120 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef const _Tp* __gnu_cxx::array_allocator< _Tp, _Array >::const_pointer β€” Definition at line 116 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef const _Tp& __gnu_cxx::array_allocator< _Tp, _Array >::const_reference β€” Definition at line 118 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef ptrdiff_t __gnu_cxx::array_allocator< _Tp, _Array >::difference_type β€” Definition at line 114 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef std::true_type __gnu_cxx::array_allocator< _Tp, _Array >::is_always_equal β€” Definition at line 127 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef _Tp* __gnu_cxx::array_allocator< _Tp, _Array >::pointer β€” Definition at line 115 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef std::true_type __gnu_cxx::array_allocator< _Tp, _Array >::propagate_on_container_move_assignment β€” Definition at line 125 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef _Tp& __gnu_cxx::array_allocator< _Tp, _Array >::reference β€” Definition at line 117 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef size_t __gnu_cxx::array_allocator< _Tp, _Array >::size_type β€” Definition at line 113 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> typedef _Tp __gnu_cxx::array_allocator< _Tp, _Array >::value_type β€” Definition at line 119 of file array_allocator.h.

🧚 Constructor & Destructor Documentation 🧚

  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> __gnu_cxx::array_allocator< _Tp, _Array >::array_allocator (array_type * __array = 0) β€” [inline], [noexcept]. Definition at line 141 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> __gnu_cxx::array_allocator< _Tp, _Array >::array_allocator (const array_allocator< _Tp, _Array > & __o) β€” [inline], [noexcept]. Definition at line 144 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> template<typename _Tp1 , typename _Array1 > __gnu_cxx::array_allocator< _Tp, _Array >::array_allocator (const array_allocator< _Tp1, _Array1 > &) β€” [inline], [noexcept]. Definition at line 148 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> __gnu_cxx::array_allocator< _Tp, _Array >::~array_allocator () β€” [inline], [noexcept]. Definition at line 152 of file array_allocator.h.

πŸ‘‘ Member Function Documentation πŸ‘‘

  • template<typename _Tp > const_pointer __gnu_cxx::array_allocator_base< _Tp >::address (const_reference __x) const β€” [inline], [noexcept], [inherited]. Definition at line 70 of file array_allocator.h.
  • template<typename _Tp > pointer __gnu_cxx::array_allocator_base< _Tp >::address (reference __x) const β€” [inline], [noexcept], [inherited]. Definition at line 66 of file array_allocator.h.
  • template<typename _Tp , typename _Array = std::tr1::array<_Tp, 1>> _GLIBCXX_NODISCARD pointer __gnu_cxx::array_allocator< _Tp, _Array >::allocate (size_type __n, const void * = 0) β€” [inline]. Definition at line 155 of file array_allocator.h.
  • template<typename _Tp > template<typename _Up , typename... _Args> void __gnu_cxx::array_allocator_base< _Tp >::construct (_Up * __p, _Args &&... __args) β€” [inline], [inherited]. Definition at line 86 of file array_allocator.h.
  • template<typename _Tp > void __gnu_cxx::array_allocator_base< _Tp >::deallocate (pointer, size_type) β€” [inline], [inherited]. Definition at line 74 of file array_allocator.h.
  • template<typename _Tp > template<typename _Up > void __gnu_cxx::array_allocator_base< _Tp >::destroy (_Up * __p) β€” [inline], [inherited]. Definition at line 91 of file array_allocator.h.
  • template<typename _Tp > size_type __gnu_cxx::array_allocator_base< _Tp >::max_size () const β€” [inline], [noexcept], [inherited]. Definition at line 80 of file array_allocator.h.

⭐ Author ⭐

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


okay that's the whole thing, bestie, you ate 🫢 this page is from the libstdc++ __gnu_cxx::array_allocator< _Tp, _Array >(3cxx) manual β€” go be iconic with it πŸ’œβœ¨

πŸ“¦ where this page comes from