type_index 类包装的指针 type_info选件类 帮助索引由这些对象。
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;
};
构造函数初始化 ptr 到 &tinfo。
name 返回 ptr->name()。
hash_code 返回了 ptr->hash_code().
operator== 返回 *ptr == right.ptr。
operator!= 返回 !(*this == right)。
operator< 返回 *ptr->before(*right.ptr)。
operator<= 返回了 !(right < *this).
operator>返回 right < *this。
operator>= 返回 !(*this < right)。