class
<typeinfo>
std::type_infoType information type
Stores information about a type.An object of this class is returned by the typeid
operator (as a const-qualified lvalue). Although its actual dynamic type may be of a derived class.
It can be used to compare two types or to retrieve information identifying a type.
typeid
can be applied to any type or any expression that has a type.
const
or volatile
qualified type is identified as its unqualified equivalent.
A typedef
type is considered the same as its aliased type.
When typeid
is applied to a reference or dereferenced pointer to an object of a polymorphic class type (a class declaring or inheriting a virtual function), it considers its dynamic type (i.e., the type of the most derived object). This requires the RTTI (Run-time type information) to be available.
When typeid
is applied to a dereferenced null pointer, a bad_typeid exception is thrown.
The lifetime of the object returned by typeid
extends to the end of the program.
The copy and assignment operators of type_info
are private: objects of this type cannot be copied.
The copy and assignment operators of
type_info
are deleted: objects of this type cannot be copied.
See
type_indexfor a wrapper class that adapts
type_infovalues to make them copyable and indexable with standard hash values.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4