std::pmr::memory_resource::do_is_equal
From cppreference.com
< cpp | memory | memory resource
| virtual bool do_is_equal( const std::pmr::memory_resource& other ) const noexcept = 0; |
(C++17以降) | |
現在のオブジェクト(*this)と other を比較します。
2つの memory_resource が等しいとみなされるのは、一方の memory_resource から割り当てられたメモリが他方から解放でき、かつその逆も可能な場合のみです。
[編集] 注釈
other の最派生型は、*this の最派生型と一致しない場合があります。したがって、派生クラスの実装では、通常、dynamic_cast を使用して *this と other の最派生型が一致するかどうかを確認し、キャストが失敗した場合は直ちに false を返す必要があります。
[編集] 関連項目
別のmemory_resourceとの等価性を比較する(公開メンバー関数) |