std::pmr::g...lt_resource(3)
π NAME π
okay so this is the std::pmr::g...lt_resource(3) page from the C++ Standard Libary manual, and we're talking about std::pmr::get_default_resource β the NAME line is literally std::pmr::get_default_resource - std::pmr::get_default_resource. iconic.
β¨ Synopsis β¨
Defined in header <memory_resource>:
std::pmr::memory_resource* get_default_resource() noexcept; (since C++17)
This one gets you the default memory resource pointer. lowkey important.
The default memory resource pointer is what certain facilities use when you don't pass them an explicit memory resource. At the very start, the default memory resource pointer is the return value of std::pmr::new_delete_resource. that's the starting vibe.
This function is thread-safe. A previous call to std::pmr::set_default_resource synchronizes with (see std::memory_order) the subsequent std::pmr::get_default_resource calls. no cap, that ordering detail matters.
π Return value π
It returns the value of the default memory resource pointer. that's it, that's the whole return value bestie π
π See also π
set_default_resourceβ sets the defaultstd::pmr::memory_resource(C++17) (function).new_delete_resourceβ returns a static program-widestd::pmr::memory_resourcethat uses the globaloperator newandoperator deleteto allocate and deallocate memory (C++17) (function).
signing off with the source/version + date, exactly like the footer said: http://cppreference.com, 2024.06.10, and std::pmr::g...lt_resource(3). bye bestie, go allocate something cute π«Άπ
π¦ 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