Sdílet prostřednictvím


owner_less

Umožňuje základě vlastnictví smíšené porovnání ukazatelů sdílené a slabé.Vrátí true -li parametr levé dříve parametrů objednané členské funkce owner_before.

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
);
};

Parametry

  • _left
    Sdílené nebo malý ukazatel.

  • _Right
    Sdílené nebo malý ukazatel.

Hodnota/Návratová hodnota vlastnosti

Vrátí true -li _Left je objednáno před _Right členské funkce owner_before.

Poznámky

Šablona třídy definovat jako vykazujících svým subjektům členských _Left.owner_before(_Right).

Požadavky

Záhlaví: <memory>

Obor názvů: std

Viz také

Referenční dokumentace

shared_ptr::owner_before

weak_ptr::owner_before

<memory>