owner_less
공유된 포인터와 약한 포인트에 대한 소유권 기반의 혼합된 비교를 허용합니다. Returns true if the left parameter is ordered before right parameter by the member function 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
A shared or weak pointer._Right
A shared or weak pointer.
속성 값/반환 값
Returns true if _Left is ordered before _Right by the member function owner_before.
설명
The template classes define all their member operators as returning _Left.owner_before(_Right).
요구 사항
헤더 <memory>
네임스페이스: std