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 приказано перед _Right функцией-членом owner_before.
Заметки
Классы-шаблоны определяют все их операторы члена как возвращение _Left.owner_before(_Right).
Требования
Заголовок:<memory>
Пространство имен: std