Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2010
Visual Studio
Visual C++
C/C++ Languages
Expressions (C++)
Casting
 type_index Class
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
Visual Studio 2010 - Visual C++
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).

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker