std::pmr::g...lt_resource(3)

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

πŸ’– 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 default std::pmr::memory_resource (C++17) (function).
  • new_delete_resource β€” returns a static program-wide std::pmr::memory_resource that uses the global operator new and operator delete to 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