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