std::pmr::p...or::destroy(3)
β¨ NAME β¨
Okay so bestie, this is the std::pmr::polymorphic_allocator::destroy(3) page from the C++ Standard Library (the header literally says βLibaryβ and honestly? iconic typo energy π). The NAME is std::pmr::polymorphic_allocator::destroy β yes, again: std::pmr::polymorphic_allocator::destroy. We love a repetitive queen. π
π Synopsis
template< class U > (since C++17)
void destroy( U* p ); (deprecated in C++20)
(undeprecated in C++26)
It destroys the object pointed to by p, as if by calling p->~U(). Thatβs the whole move. Slay. π
π Parameters
pβ pointer to the object being destroyed. Thatβs it, thatβs the parameter. π«Ά
π Notes
This function is deprecated via LWG issue 3036, because its functionality can be provided by the default implementation of std::allocator_traits::destroy and hence extraneous. So yeah, the committee was like βwe donβt need this extra,β no cap.
This function is undeprecated via P2875R3. The glow-up is real. β¨
π See also
destroyβ destructs an object stored in the allocated storage.[static](function template)
Cute little sign-off: source is http://cppreference.com, dated 2024.06.10, and the footer title vibe is std::pmr::p...or::destroy(3). Bye bestie, go destroy responsibly ππ
π¦ 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