Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The latest version of this topic can be found at type_index Class.
The type_index class wraps a pointer to type_info Class to assist in indexing by such objects.
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; };
The constructor initializes ptr to &tinfo.
name returns ptr->name().
hash_code returns ptr->hash_code().
operator== returns *ptr == right.ptr.
operator!= returns !(*this == right).
operator< returns *ptr->before(*right.ptr).
operator<= returns !(right < *this).
operator> returns right < *this.
operator>= returns !(*this < right).