std::type_info - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::type_info

From cppreference.com
< cpp‎ | types

Defined in header `<typeinfo>` |  |
class type_info; |  |

The class `type_info` holds implementation-specific information about a type, including the name of the type and means to compare two types for equality or collating order. This is the class returned by the `typeid` operator.

The `type_info` class is neither `CopyConstructible` nor `CopyAssignable`.

### [edit] Member functions

(constructor) [deleted] | has neither default nor copy constructors (public member function)
(destructor) [virtual] | derived objects are safe to delete through pointer-to-base (virtual public member function)
operator= [deleted] | can not be copy-assigned (public member function)
operator==operator!= | checks whether the objects refer to the same type (public member function) [edit]
before | checks whether the referred type precedes referred type of another `type_index` object in the implementation defined order, i.e. orders the referred types (public member function) [edit]
hash_code (C++11) | returns a value which is identical for the same types (public member function) [edit]
name | implementation defined name of the type (public member function) [edit]

### [edit] See also

type_index (C++11) | wrapper around a `type_info` object, that can be used as index in associative and unordered associative containers (class) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/types/type_info&oldid=59488"