std::scoped...or::destroy(3)
π std::scoped...or::destroy(3) π
okay so bestie, this is a page from the C++ Standard Libary β their spelling, not mine π β and it's all about std::scoped_allocator_adaptor::destroy. she's lowkey a tiny little destructor gremlin with main character energy, and the vibe check is: the outer allocator does the destroying. periodt. π
π NAME π
std::scoped_allocator_adaptor::destroy - std::scoped_allocator_adaptor::destroy
ngl the NAME section is serving the same name twice and honestly? iconic. β¨
β¨ Synopsis β¨
Defined in header <scoped_allocator>.
template< class T > (since C++11)
void destroy( T* p );
Uses the outer allocator to call the destructor of the object pointed to by p, by calling:
std::allocator_traits<OUTERMOST>::destroy(OUTERMOST(*this), p)
where OUTERMOST is the type that would be returned by calling this->outer_allocator(), and then calling the outer_allocator() member function recursively on the result of this call until reaching the type that has no such member function. yes bestie, it keeps climbing the allocator ladder until it finds the one with no outer_allocator() member function β that's the whole recursive vibe. π¦
πΈ Parameters πΈ
pβ pointer to the object that is going to be destroyed. literally just a pointer to the object that's about to get its destructor moment. π
π¦ Return value π¦
(none) β no return value, she's not giving you anything back. just destruction and vibes. π
π₯ See also π₯
destroyβ destructs an object stored in the allocated storage;[static](function template)destroyβ destructs an object in allocated storage;(until C++20)(public member function ofstd::allocator<T>)
mwah π this cutie came from http://cppreference.com, version/date 2024.06.10, and the page tag is std::scoped...or::destroy(3). byeee bestie, go forth and destroy π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms