std::experi...lt_resource(3)

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

std::experimental::pmr::get_default_resource πŸ’…

okay bestie, this is the tea from the C++ Standard Libary manual β€” yes, it really says β€œLibary,” and we are not editing the manual’s spelling, we’re just here for the lore. The star of this page is std::experimental::pmr::get_default_resource.

πŸŽ€ NAME πŸŽ€

std::experimental::pmr::get_default_resource β€” std::experimental::pmr::get_default_resource

no cap, the name is listed twice up top. That’s just the manual being extra, iykyk.

πŸ’« Synopsis πŸ’«

Defined in header <experimental/memory_resource>:

memory_resource* get_default_resource() noexcept;

(library fundamentals TS)

Gets the default memory resource pointer. That pointer is the main character for certain facilities when an explicit memory resource is not supplied β€” like, it’s the fallback bestie. The initial default memory resource pointer is the return value of new_delete_resource().

This function is thread-safe, periodt. A previous call to set_default_resource synchronizes with (see std::memory_order) the subsequent get_default_resource calls.

🌸 Return value 🌸

Returns the value of the default memory resource pointer. yep, that’s the whole return-value vibe πŸ’–

πŸ¦‹ See also πŸ¦‹

  • sets the default memory_resource β€” set_default_resource (function).
  • returns a static program-wide memory_resource that uses the global operator new and operator delete to allocate and deallocate memory β€” new_delete_resource (function).

πŸŽ€ Category πŸŽ€

  • * Noindexed pages

xoxo, your favorite manual bestie β€” source/version http://cppreference.com, date 2024.06.10, and the footer tag std::experi...lt_resource(3) 🫢✨

πŸ“¦ where this page comes from