owner_less

共有の割り当ての所有権ベースの混合比較とウィーク ポインター。左のパラメーターがメンバー関数 owner_beforeすることによって、右の順序とパラメーター true を返します。

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
    共有したり、ウィーク ポインター。

  • _Right
    共有したり、ウィーク ポインター。

プロパティ値/戻り値

_Left がメンバー関数 owner_beforeで事前に _Right 順序と true を返します。

解説

このテンプレート クラスは _Left.owner_before(_Right)を返すようにすべてのメンバー演算子を定義します。

必要条件

ヘッダー : <memory>

名前空間: std

参照

関連項目

shared_ptr::owner_before

weak_ptr::owner_before

<memory>