Classe type_index
A classe de type_index envolve um ponteiro para Classe type_info para ajudar na indexação por esses 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;
};
O construtor inicializa ptr a &tinfo.
name retorna ptr->name().
retorna ptr->hash_code().dehash_code
operator== retorna *ptr == right.ptr.
operator!= retorna !(*this == right).
operator< retorna *ptr->before(*right.ptr).
retorna !(right < *this).deoperator<=
retorna right < *thisdeoperator>.
operator>= retorna !(*this < right).