std::genera...ratordelete(3)
π NAME π
okay bestie, this page is about std::generator::promise_type::operatordelete β and yes, the NAME section literally says std::generator::promise_type::operatordelete - std::generator::promise_type::operatordelete, so we're saying it twice because that's what the page does. π
This is from the C++ Standard Libary manual, and the manpage tag is std::genera...ratordelete(3).
β¨ Synopsis β¨
Here's the signature, no cap:
void operator delete( void* ptr, std::size_t n ) noexcept;
since C++23 β¨
so the way that this works: it deallocates the storage pointed to by ptr using an allocator equivalent to that used to allocate this memory. π«Ά
β οΈ important vibe check: theptrpassed to this function must be the one returned from an invocation of one of theoperator newoverloads with a size argument equal ton. Otherwise the behavior is undefined. like, do not play with that. π
πΈ Parameters πΈ
ptrβ a pointer obtained from the previous call tooperator new.nβ the size of the storage to be deallocated.
π«Ά Return value π«Ά
(none) β literally no return value, bestie. iconic.
mwah π β source: http://cppreference.com, version/date: 2024.06.10
π¦ 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