std::scoped...::deallocate(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

hey bestie πŸ’– welcome to std::scoped...::deallocate(3) from the C++ Standard Libary man pages. yes, the title has ... in it and yes, we are keeping it exactly like that. let’s get into it 🫢

πŸ’– NAME πŸ’–

std::scoped_allocator_adaptor::deallocate β€” std::scoped_allocator_adaptor::deallocate

like, it’s literally the same thing twice. iconic behavior, no notes πŸ’…


πŸ¦‹ Synopsis πŸ¦‹

Defined in header <scoped_allocator>
void deallocate( pointer p, size_type n ) noexcept;  (since C++11)

so what’s the vibe? this one uses the outer allocator to deallocate the storage referenced by p, by calling:

std::allocator_traits<OuterAlloc>::deallocate(outer_allocator(), p, n)

that’s the whole move, fr fr. also notice that noexcept in the signature β€” that’s part of the whole look, don’t drop it ✨


🌸 Parameters 🌸

  • p β€” pointer to the previously allocated memory 🫢
  • n β€” the number of objects for which the memory was allocated

πŸ’€ Return value πŸ’€

(none)

literally nothing comes back. the return value is giving invisible main character energy πŸ™ˆ


πŸ‘‘ See also πŸ‘‘

  • deallocate β€” deallocates storage (public member function of std::allocator<T>)
  • deallocate β€” deallocates storage using the allocator [static] (public static member function of std::allocator_traits<Alloc>)

source: http://cppreference.com Β· version/date: 2024.06.10 β€” mwah, bye bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from