shared_ptr::owner_before
傳回 true,則 shared_ptr 在 (或) 所提供的指標才能排序。
template<class Other>
bool owner_before(const shared_ptr<Other>& ptr);
template<class Other>
bool owner_before(const weak_ptr<Other>& ptr);
參數
- ptr
在 shared_ptr 或 weak_ptr的 lvalue 參考。
屬性值/傳回值
傳回 true,則 shared_ptr 排序在指標參數之前,錯誤,否則為。
備註
如果是, *thisordered beforeptr,樣板成員函式會傳回 true。
需求
標題: <memory>
命名空間: std