std::experimental::pmr::unsynchronized_pool_resource::unsynchronized_pool_resource
來自 cppreference.com
unsynchronized_pool_resource(); |
(1) | (庫基礎 TS) |
explicit unsynchronized_pool_resource( memory_resource* upstream ); |
(2) | (庫基礎 TS) |
explicit unsynchronized_pool_resource( const pool_options& opts ); |
(3) | (庫基礎 TS) |
unsynchronized_pool_resource( const pool_options& opts, memory_resource* upstream ); |
(4) | (庫基礎 TS) |
unsynchronized_pool_resource( const unsynchronized_pool_resource& ) = delete; |
(5) | (庫基礎 TS) |
構造一個 unsynchronized_pool_resource
。
1-4) 使用指定的上游記憶體資源並根據指定選項進行調整來構造一個
不接受 opts 作為引數的過載使用 pool_options 的預設構造例項作為選項。不接受 upstream 作為引數的過載使用 std::experimental::pmr::get_default_resource() 的返回值作為上游記憶體資源。
unsynchronized_pool_resource
。結果物件持有 upstream 的副本,但不擁有 upstream 所指向的資源。不接受 opts 作為引數的過載使用 pool_options 的預設構造例項作為選項。不接受 upstream 作為引數的過載使用 std::experimental::pmr::get_default_resource() 的返回值作為上游記憶體資源。
5) 複製建構函式被刪除。
[編輯] 引數
opts | - | 一個包含建構函式選項的 pool_options 結構體 |
upstream | - | 要使用的上游記憶體資源 |
[編輯] 異常
1-4) 僅當對上游資源的
allocate()
函式呼叫丟擲異常時才丟擲。是否發生此呼叫以及在何種條件下發生此呼叫是未指定的。