STD::__ALLOCATED_PTR(3cxx)
πΈ NAME πΈ
std::__allocated_ptr< _Alloc > β it's giving non-standard RAII type for managing pointers obtained from allocators. yes bestie, it's a libstdc++ exclusive, section 3cxx, iykyk π
β¨ SYNOPSIS β¨
#include <allocated_ptr.h>
π Public Types π
using pointer = typename allocator_traits< _Alloc >::pointerβ the allocator's pointer type, just vibing under an alias πusing value_type = typename allocator_traits< _Alloc >::value_typeβ the allocator's value type, same energy β¨
π«Ά Public Member Functions π«Ά
__allocated_ptr (__allocated_ptr &&__gd) noexceptβ transfer ownership of the owned pointer. move it, don't copy it, no cap π₯template<typename _Ptr , typename _Req = _Require<is_same<_Ptr, value_type*>>> __allocated_ptr (_Alloc &__a, _Ptr __ptr)β convert__ptrto allocator's pointer type and take ownership of it π¦__allocated_ptr (_Alloc &__a, pointer __ptr) noexceptβ take ownership of__ptrπ~__allocated_ptr ()β deallocate the owned pointer. the era ends πvalue_type * get ()β get the address that the owned pointer refers to π__allocated_ptr & operator= (std::nullptr_t) noexceptβ release ownership of the owned pointer. bye bestie, go be free π§
π Detailed Description π
template<typename _Alloc>
struct std::__allocated_ptr< _Alloc >
"Non-standard RAII type for managing pointers obtained from allocators." periodt. that's the whole vibe. it holds your pointer, it cleans up after your pointer, it does the most so you don't have to πβ¨
π Constructor & Destructor Documentation π
template<typename _Alloc > std::__allocated_ptr< _Alloc >::__allocated_ptr (_Alloc & __a, pointer __ptr) [inline], [noexcept]
Take ownership of __ptr. simple as that, she's yours now π«Ά
template<typename _Alloc > template<typename _Ptr , typename _Req = _Require<is_same<_Ptr, value_type*>>> std::__allocated_ptr< _Alloc >::__allocated_ptr (_Alloc & __a, _Ptr __ptr) [inline]
Convert __ptr to allocator's pointer type and take ownership of it. glow-up transformation fr fr π¦β¨
template<typename _Alloc > std::__allocated_ptr< _Alloc >::__allocated_ptr (__allocated_ptr< _Alloc > && __gd) [inline], [noexcept]
Transfer ownership of the owned pointer. handoff, main character style π
template<typename _Alloc > std::__allocated_ptr< _Alloc >::~__allocated_ptr () [inline]
Deallocate the owned pointer. she's done, she's resting π
References std::allocator_traits< _Alloc >::deallocate().
β Member Function Documentation β
template<typename _Alloc > value_type * std::__allocated_ptr< _Alloc >::get () [inline]
Get the address that the owned pointer refers to. here's the address bestie, take it π
template<typename _Alloc > __allocated_ptr & std::__allocated_ptr< _Alloc >::operator= (std::nullptr_t) [inline], [noexcept]
Release ownership of the owned pointer. not me setting it to nullptr and walking away π
πΈ Author πΈ
Generated automatically by Doxygen for libstdc++ from the source code. the robots did this one, not me π€π
okay that's the whole page bestie!! every option, every signature, every reference β all of it, untouched, just β¨glowifiedβ¨. this came out of libstdc++ for std::__allocated_ptr< _Alloc >, section 3cxx, and yeah the footer's the same as the header because manpages are like that π love u, go deallocate responsibly π«Άπ
π¦ where this page comes from
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms