[util.smartptr.ownerless] (original) (raw)
The class template owner_less allows ownership-based mixed comparisons of shared and weak pointers.
namespace std { template struct owner_less;
template struct owner_less<shared_ptr> { bool operator()(const shared_ptr&, const shared_ptr&) const noexcept; bool operator()(const shared_ptr&, const weak_ptr&) const noexcept; bool operator()(const weak_ptr&, const shared_ptr&) const noexcept; };
template struct owner_less<weak_ptr> { bool operator()(const weak_ptr&, const weak_ptr&) const noexcept; bool operator()(const shared_ptr&, const weak_ptr&) const noexcept; bool operator()(const weak_ptr&, const shared_ptr&) const noexcept; };
template<> struct owner_less { template<class T, class U> bool operator()(const shared_ptr&, const shared_ptr&) const noexcept; template<class T, class U> bool operator()(const shared_ptr&, const weak_ptr&) const noexcept; template<class T, class U> bool operator()(const weak_ptr&, const shared_ptr&) const noexcept; template<class T, class U> bool operator()(const weak_ptr&, const weak_ptr&) const noexcept;
using is_transparent = unspecified;}; }