Export (0) Print
Expand All

shared_ptr::owner_before

Returns true if this shared_ptr is ordered before (or less than) the provided pointer.

template<class Other>
    bool owner_before(const shared_ptr<Other>& ptr);
template<class Other>
    bool owner_before(const weak_ptr<Other>& ptr);

ptr

An lvalue reference to either a shared_ptr or a weak_ptr.

Returns true if this shared_ptr sorts before the pointer parameter, false if not.

The template member function returns true if *this is ordered before ptr.

Header: <memory>

Namespace: std

Show:
© 2015 Microsoft