__GNU_CXX::ARRAY_ALLOCATOR(3cxx)
π 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__nof 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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_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 filearray_allocator.h.template<typename _Tp > pointer __gnu_cxx::array_allocator_base< _Tp >::address (reference __x) constβ[inline],[noexcept],[inherited]. Definition at line 66 of filearray_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 filearray_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 filearray_allocator.h.template<typename _Tp > void __gnu_cxx::array_allocator_base< _Tp >::deallocate (pointer, size_type)β[inline],[inherited]. Definition at line 74 of filearray_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 filearray_allocator.h.template<typename _Tp > size_type __gnu_cxx::array_allocator_base< _Tp >::max_size () constβ[inline],[noexcept],[inherited]. Definition at line 80 of filearray_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
- ubuntu noble: libstdc++-9-doc 9.5.0-6ubuntu2
- ubuntu noble: libstdc++-9-doc 9.5.0-6ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms