weak_ptr::owner_before
傳回 true ,如果這個 weak_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 ,否則為 weak_ptr 排在指標參數之前,則為 false 。
備註
如果 *this 為 ordered before ,則為 ptr,樣板成員函式會傳回 true 。
需求
標頭: <memory>
命名空間: std