__GNU_CXX::ARRAY_ALLOCATOR_BASE(3cxx)
π __gnu_cxx::array_allocator_base< _Tp > β the 3cxx glow-up π
okay bestie, sit down, hydrate, and let's talk about __gnu_cxx::array_allocator_base< _Tp >. This is a page from section 3cxx, which is the C++ corner of the manual, and yes it's giving "template meta brain rot" but it's actually so cute when you get it. π
β¨ NAME β¨
__gnu_cxx::array_allocator_base< _Tp > β literally just the Base class. that's the whole vibe. it's the foundation, the groundwork, the mother of the family. π
πΈ SYNOPSIS πΈ
first things first, you gotta pull it in:
#include <array_allocator.h>
and here's the tea: it's Inherited by __gnu_cxx::array_allocator< _Tp, _Array >. so it's not out here doing the main character thing solo, it's the parent, the blueprint, the one who raised them. π«Ά
π Public Types
these are the little nickname aliases the class hands out, all of them, no skips:
typedef const _Tp * const_pointertypedef const _Tp & const_referencetypedef ptrdiff_t difference_typetypedef _Tp * pointertypedef _Tp & referencetypedef size_t size_typetypedef _Tp value_type
seven of them. iconic. seven little typedef besties. π¦
π Public Member Functions
every single one, in order, exactly as written, because we do NOT leave the girls behind:
const_pointer address (const_reference __x) const noexceptpointer address (reference __x) const noexcepttemplate<typename _Up , typename... _Args> void construct (_Up *__p, _Args &&... __args)void deallocate (pointer, size_type)template<typename _Up > void destroy (_Up *__p)size_type max_size () const noexcept
look at those variadic templates. chef's kiss. the ... is doing so much work and never gets credit. π
π Detailed Description π
so like, the whole class declaration is:
template<typename _Tp>
class __gnu_cxx::array_allocator_base< _Tp >
and its entire personality is: Base class. that's it. that's the description. short, sweet, humble, knows its place. queen behavior honestly.
Definition at line54of filearray_allocator.h.
like, remember that. line 54. it's important later, iykyk. π
π Member Typedef Documentation π
here's where every single typedef gets its own little spotlight moment, with its line number so you can go visit it:
template<typename _Tp > typedef const _Tp* __gnu_cxx::array_allocator_base< _Tp >::const_pointer- Definition at line
60of filearray_allocator.h.
- Definition at line
template<typename _Tp > typedef const _Tp& __gnu_cxx::array_allocator_base< _Tp >::const_reference- Definition at line
62of filearray_allocator.h.
- Definition at line
template<typename _Tp > typedef ptrdiff_t __gnu_cxx::array_allocator_base< _Tp >::difference_type- Definition at line
58of filearray_allocator.h.
- Definition at line
template<typename _Tp > typedef _Tp* __gnu_cxx::array_allocator_base< _Tp >::pointer- Definition at line
59of filearray_allocator.h.
- Definition at line
template<typename _Tp > typedef _Tp& __gnu_cxx::array_allocator_base< _Tp >::reference- Definition at line
61of filearray_allocator.h.
- Definition at line
template<typename _Tp > typedef size_t __gnu_cxx::array_allocator_base< _Tp >::size_type- Definition at line
57of filearray_allocator.h.
- Definition at line
template<typename _Tp > typedef _Tp __gnu_cxx::array_allocator_base< _Tp >::value_type- Definition at line
63of filearray_allocator.h.
- Definition at line
note the line numbers bouncing around (60, 62, 58, 59, 61, 57, 63) β that's just how the source file is laid out, not me being chaotic. the file is the chaotic one. π
π₯ Member Function Documentation π₯
now the actual functions, and yes, we're keeping the [inline] and [noexcept] tags because they're part of the fit:
template<typename _Tp > const_pointer __gnu_cxx::array_allocator_base< _Tp >::address (const_reference __x) const [inline], [noexcept]- Definition at line
70of filearray_allocator.h.
- Definition at line
template<typename _Tp > pointer __gnu_cxx::array_allocator_base< _Tp >::address (reference __x) const [inline], [noexcept]- Definition at line
66of filearray_allocator.h.
- Definition at line
template<typename _Tp > template<typename _Up , typename... _Args> void __gnu_cxx::array_allocator_base< _Tp >::construct (_Up * __p, _Args &&... __args) [inline]- Definition at line
86of filearray_allocator.h.
- Definition at line
template<typename _Tp > void __gnu_cxx::array_allocator_base< _Tp >::deallocate (pointer, size_type) [inline]- Definition at line
74of filearray_allocator.h.
- Definition at line
template<typename _Tp > template<typename _Up > void __gnu_cxx::array_allocator_base< _Tp >::destroy (_Up * __p) [inline]- Definition at line
91of filearray_allocator.h.
- Definition at line
template<typename _Tp > size_type __gnu_cxx::array_allocator_base< _Tp >::max_size () const [inline], [noexcept]- Definition at line
80of filearray_allocator.h.
- Definition at line
okay notice how address shows up twice β one for const_reference and one for plain reference, both const, both [inline], both [noexcept]. that's not a typo, that's overload β¨slayβ¨. and construct and destroy are the template-in-template girlies, they contain multitudes (and typename... _Args). π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.</purl>
(that's not a person, bestie, that's a tool. Doxygen wrote this page. nobody hand-typed it. it's machine-generated and still ate. π€π)
and that's the whole page!! π go forth and allocate, or like, don't, since this is the base class and it's just chilling there being foundational. no cap, you understood this, i'm so proud. π«ΆπΈ
this lil tour was brought to you by libstdc++, section 3cxx β mwah, catch you in the next manpage, bestie!! π
β¨
π¦ 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