owner_less
Разрешает владение- смешанные сравнения на основе общих и слабых указателей.Возвращает true если поле оставить параметр упорядочен перед правым параметром функцией-членом owner_before.
template<class Type>
struct owner_less; // not defined
template<class Type>
struct owner_less<shared_ptr<Type> > {
bool operator()(
const shared_ptr<Type>& _Left,
const shared_ptr<Type>& _Right
);
bool operator()(
const shared_ptr<Type>& _Left,
const weak_ptr<Type>& _Right
);
bool operator()(
const weak_ptr<Type>& _Left,
const shared_ptr<Type>& _Right
);
};
template<class Type>
struct owner_less<weak_ptr<Type> >
bool operator()(
const weak_ptr<Type>& _Left,
const weak_ptr<Type>& _Right
);
bool operator()(
const weak_ptr<Type>& _Left,
const shared_ptr<Ty>& _Right
);
bool operator()(
const shared_ptr<Type>& _Left,
const weak_ptr<Type>& _Right
);
};
Параметры
_left
Общий или простой указатель._Right
Общий или простой указатель.
Значение свойства или возвращаемое значение
Возвращает true если _Left ordered перед _Right функцией-членом owner_before.
Заметки
Классы шаблонов все их операторы определяют член как возвращение _Left.owner_before(_Right).
Требования
заголовок: <memory>
std пространство имен: