다음을 통해 공유


shared_ptr::owner_before

shared_ptr 개체가 제공된 포인터 이전(또는 이하)에 주문될 경우, true를 반환합니다.

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.

요구 사항

헤더 <memory>

네임스페이스: std

참고 항목

참조

shared_ptr::owner_before