Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::pmr::get_default_resource

      From cppreference.com
      <cpp‎ |memory
       
       
      Memory management library
      (exposition only*)
      Allocators
      Uninitialized memory algorithms
      Constrained uninitialized memory algorithms
      Memory resources
      pmr::get_default_resource
      (C++17)
      Uninitialized storage(until C++20)
      (until C++20*)
      (until C++20*)
      Garbage collector support(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
       
      Defined in header<memory_resource>
      std::pmr::memory_resource* get_default_resource()noexcept;
      (since C++17)

      Gets the default memory resource pointer.

      Thedefault memory resource pointer is used by certain facilities when an explicit memory resource is not supplied. The initial default memory resource pointer is the return value ofstd::pmr::new_delete_resource.

      This function is thread-safe. Previous call tostd::pmr::set_default_resourcesynchronizes with (seestd::memory_order) the subsequentstd::pmr::get_default_resource calls.

      [edit] Return value

      Returns the value of the default memory resource pointer.

      [edit] See also

      sets the defaultstd::pmr::memory_resource
      (function)[edit]
      returns a static program-widestd::pmr::memory_resource that uses the globaloperator new andoperator delete to allocate and deallocate memory
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/get_default_resource&oldid=139761"

      [8]ページ先頭

      ©2009-2025 Movatter.jp