Compartir a través de


owner_less

allows posesión-basó comparaciones mezcladas de punteros compartidos y débiles.Devuelve true si el parámetro izquierdo es pedido antes de que el parámetro correcto para la función owner_beforemiembro.

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

Parámetros

  • _left
    un puntero compartido o débil.

  • _Right
    un puntero compartido o débil.

Valor de propiedad y valor devuelto

Devuelve true si _Left se ordenan antes de que _Right por la función owner_beforemiembro.

Comentarios

Las clases de plantillas definen todos los operadores de miembro como devolver _Left.owner_before(_Right).

Requisitos

encabezado: <memoria>

espacio de nombres: std

Vea también

Referencia

shared_ptr::owner_before

weak_ptr::owner_before

<memory>