Compartir a través de


type_index (Clase)

La clase type_index contiene un puntero a type_info (Clase) para facilitar la indización de estos objetos.

class type_index { public: type_index(const type_info& tinfo); const char *name() const; size_t hash_code() const; bool operator==(const type_info& right) const; bool operator!=(const type_info& right) const; bool operator<(const type_info& right) const; bool operator<=(const type_info& right) const; bool operator>(const type_info& right) const; bool operator>=(const type_info& right) const; };

El constructor inicializa ptr en &tinfo.

name devuelve ptr->name().

hash_code devuelve ptr->hash_code().

operator== devuelve *ptr == right.ptr.

operator!= devuelve !(*this == right).

operator< devuelve *ptr->before(*right.ptr).

operator<= devuelve !(right < *this).

operator> devuelve right < *this.

operator>= devuelve !(*this < right).

Consulte también

Información de tipos en tiempo de ejecución
<typeindex>