type_index 클래스
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)
을(를) 반환합니다.
참고 항목
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기