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)을(를) 반환합니다.