std::pmr::operator==, std::pmr::operator!=
來自 cppreference.com
< cpp | memory | memory resource
定義於標頭檔案 <memory_resource> |
||
bool operator==( const std::pmr::memory_resource& a, const std::pmr::memory_resource& b ) noexcept; |
(1) | (C++17 起) |
bool operator!=( const std::pmr::memory_resource& a, const std::pmr::memory_resource& b ) noexcept; |
(2) | (C++17 起) (C++20 前) |
比較 memory_resource
a 和 b 是否相等。兩個 memory_resource
相等當且僅當從一個 memory_resource
分配的記憶體可以從另一個釋放,反之亦然。
|
(C++20 起) |
[編輯] 返回值
1) &a == &b || a.is_equal(b)
2) !(a == b)
[編輯] 參閱
與另一個 memory_resource 進行相等比較(public 成員函式) |