__GNU_CXX::NEW_ALLOCATOR(3cxx)
π NAME π
okay so bestie, welcome to the __gnu_cxx::new_allocator< _Tp > page from the 3cxx manual β and it is literally An allocator that uses global new, as per C++03 [20.4.1]. periodt π
β¨ SYNOPSIS β¨
#include <ext/new_allocator.h>
Inherits std::__new_allocator< _Tp >.
π Public Types π
typedef std::ptrdiff_t difference_typetypedef std::true_type propagate_on_container_move_assignmenttypedef std::size_t size_typetypedef _Tp value_type
π¦ Public Member Functions π¦
- the copy-constructor cutie:
new_allocator (const new_allocator &) noexcept
- converting constructor from another
new_allocator< _Tp1 >:
template<typename _Tp1 > new_allocator (const new_allocator< _Tp1 > &)
noexcept
- the
allocatemember β exact signature, no cap:
_Tp * allocate (size_type __n, const void *=static_cast< const void *
>(0))
- the
deallocatemember:void deallocate (_Tp *__p, size_type __n)
π Detailed Description π
template<typename _Tp>
class __gnu_cxx::new_allocator< _Tp >
This one is described as: An allocator that uses global new, as per C++03 [20.4.1].
It is precisely the allocator defined in the C++ Standard. like, exactly that one π
- all allocation calls
operator new - all deallocation calls
operator delete
π¨ caveat bestie: this is a non-standard extension that can be used to guarantee allocation fromneweven if the library has been configured to use a different implementation forstd::allocator. highkey important, don't sleep on that π
π Template Parameters π
_Tpβ Type of allocated object.
π«Ά Author π«Ά
Generated automatically by Doxygen for libstdc++ from the source code.
source/version: libstdc++; footer tag: __gnu_cxx::new_allocator< _Tp >(3cxx); date: not shown on the page. that's the whole manual-page slay, bestie β mwah πβ¨π¦
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms