cpp/memory/owner less void

is a specialization of std with parameter types deduced.

Member functions
{{member|{{small|std::owner_less ::}}operator| {{dcl begin}} {{dcl|since=c++17| template bool operator( const std::shared_ptr& lhs,                 const std::shared_ptr& rhs ) const noexcept; }} {{dcl|since=c++17| template bool operator( const std::shared_ptr& lhs,                 const std::weak_ptr& rhs ) const noexcept; }} {{dcl|since=c++17| template bool operator( const std::weak_ptr& lhs,                 const std::shared_ptr& rhs ) const noexcept; }} {{dcl|since=c++17| template bool operator( const std::weak_ptr& lhs,                 const std::weak_ptr& rhs ) const noexcept; }} {{dcl end}}

Compares {{c|lhs}} and {{c|rhs}} using owner-based semantics. Effectively calls {{c|lhs.owner_before(rhs)}}.

The ordering is strict weak ordering relation.

{{c|lhs}} and {{c|rhs}} are equivalent only if they are both empty or share ownership.

Return value
if is less than  as determined by the owner-based ordering. }}