std::experi...ete_resource(3)

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

hey bestie, welcome to the std::experi...ete_resource(3) page from the C++ Standard Libary manual πŸ’– β€” yes, that's the manual name, typo and all, and we're keeping it. This one is short but iconic, so let's get into it. 🫢


🌈 NAME 🌈

std::experimental::pmr::new_delete_resource β€” that's the name, bestie. The original NAME section repeats it as std::experimental::pmr::new_delete_resource, so here's your double confirmation. πŸ’…

✨ Synopsis ✨

Okay so this is defined in the header <experimental/memory_resource>:

Defined in header <experimental/memory_resource>
memory_resource* new_delete_resource() noexcept;  (library fundamentals TS)

It's giving library fundamentals TS energy, periodt. πŸ”₯

And what does it do? It returns a pointer to a memory_resource that uses the global operator new and operator delete to allocate memory. No cap.

πŸ’– Return value πŸ’–

Returns a pointer p to a static storage duration object of a type derived from std::experimental::pmr::memory_resource, with these properties:

  • its allocate() function uses ::operator new to allocate memory;
  • its deallocate() function uses ::operator delete to deallocate memory;
  • for any memory_resource r, p->is_equal(r) returns &r == p.

And the same value is returned every time this function is called. Literally every single time. ⭐

πŸŽ€ Category πŸŽ€

  • Noindexed pages

okay byeee πŸ’– β€” source: http://cppreference.com, version/date: 2024.06.10. mwah πŸ§šπŸ’œ

πŸ“¦ where this page comes from