std::pmr::memory_resource::do_is_equal
來自 cppreference.com
< cpp | memory | memory resource
| virtual bool do_is_equal( const std::pmr::memory_resource& other ) const noexcept = 0; |
(C++17 起) | |
比較 *this 與 other 的相等性。
兩個 memory_resource 相等,當且僅當從一個 memory_resource 分配的記憶體能由另一個解分配,反之亦然。
[編輯] 注意
other 的最終派生型別可能與 *this 的最終派生型別不匹配。因此,派生類的實現通常必須使用 dynamic_cast 檢查 *this 和 other 的最終派生型別是否匹配,如果轉換失敗則立即返回 false。
[編輯] 參見
與另一個 memory_resource 進行相等比較(公開成員函式) |