std::experi...lt_resource(3)
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_resourcethat uses the globaloperator newandoperator deleteto 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
- 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